/* Generated by Cython 0.29.15 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [],
        "name": "pyrosm_proto",
        "sources": [
            "pyrobuf/_proto\\pyrosm_proto.pyx"
        ]
    },
    "module_name": "pyrosm_proto"
}
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_29_15"
#define CYTHON_HEX_VERSION 0x001D0FF0
#define CYTHON_FUTURE_DIVISION 0
#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
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 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
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #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 (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #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
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

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

#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"
#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #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 || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
  #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__pyrosm_proto
#define __PYX_HAVE_API__pyrosm_proto
/* Early includes */
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include "pythread.h"
#include <stdlib.h>
#include "pystate.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

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

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


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

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


static const char *__pyx_f[] = {
  "pyrobuf\\_proto\\pyrosm_proto.pyx",
  "pyrobuf\\_proto\\pyrosm_proto.pxd",
  "stringsource",
  "type.pxd",
  "bool.pxd",
  "complex.pxd",
  "pyrobuf_list.pxd",
};
/* MemviewSliceStruct.proto */
struct __pyx_memoryview_obj;
typedef struct {
  struct __pyx_memoryview_obj *memview;
  char *data;
  Py_ssize_t shape[8];
  Py_ssize_t strides[8];
  Py_ssize_t suboffsets[8];
} __Pyx_memviewslice;
#define __Pyx_MemoryView_Len(m)  (m.shape[0])

/* Atomics.proto */
#include <pythread.h>
#ifndef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 1
#endif
#define __pyx_atomic_int_type int
#if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
                    (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
                    !defined(__i386__)
    #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using GNU atomics"
    #endif
#elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
    #include <Windows.h>
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type LONG
    #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
    #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
    #ifdef __PYX_DEBUG_ATOMICS
        #pragma message ("Using MSVC atomics")
    #endif
#elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
    #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
    #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using Intel atomics"
    #endif
#else
    #undef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 0
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Not using atomics"
    #endif
#endif
typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
#if CYTHON_ATOMICS
    #define __pyx_add_acquisition_count(memview)\
             __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
    #define __pyx_sub_acquisition_count(memview)\
            __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
#else
    #define __pyx_add_acquisition_count(memview)\
            __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
    #define __pyx_sub_acquisition_count(memview)\
            __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
#endif

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

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

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


/*--- Type declarations ---*/
struct __pyx_obj_12pyrobuf_list_NullListener;
struct __pyx_obj_12pyrobuf_list_TypedList;
struct __pyx_obj_12pyrobuf_list_BytesList;
struct __pyx_obj_12pyrobuf_list_StringList;
struct __pyx_obj_12pyrobuf_list_DoubleList;
struct __pyx_obj_12pyrobuf_list_FloatList;
struct __pyx_obj_12pyrobuf_list_IntList;
struct __pyx_obj_12pyrobuf_list_Int32List;
struct __pyx_obj_12pyrobuf_list_Uint32List;
struct __pyx_obj_12pyrobuf_list_Int64List;
struct __pyx_obj_12pyrobuf_list_Uint64List;
struct __pyx_obj_12pyrobuf_list_CharList;
struct __pyx_obj_12pyrosm_proto_Blob;
struct __pyx_obj_12pyrosm_proto_BlobHeader;
struct __pyx_obj_12pyrosm_proto_HeaderBlock;
struct __pyx_obj_12pyrosm_proto_HeaderBBox;
struct __pyx_obj_12pyrosm_proto_PrimitiveBlock;
struct __pyx_obj_12pyrosm_proto_PrimitiveGroup;
struct __pyx_obj_12pyrosm_proto_StringTable;
struct __pyx_obj_12pyrosm_proto_Info;
struct __pyx_obj_12pyrosm_proto_DenseInfo;
struct __pyx_obj_12pyrosm_proto_ChangeSet;
struct __pyx_obj_12pyrosm_proto_Node;
struct __pyx_obj_12pyrosm_proto_DenseNodes;
struct __pyx_obj_12pyrosm_proto_Way;
struct __pyx_obj_12pyrosm_proto_Relation;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values;
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters;
struct __pyx_array_obj;
struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
struct __pyx_memoryviewslice_obj;
struct __pyx_opt_args_12pyrosm_proto_4Blob_MergeFromString;
struct __pyx_opt_args_12pyrosm_proto_4Blob_ParseFromString;
struct __pyx_opt_args_12pyrosm_proto_4Blob_SerializeToString;
struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_MergeFromString;
struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_ParseFromString;
struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_SerializeToString;
struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_MergeFromString;
struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_ParseFromString;
struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_SerializeToString;
struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_MergeFromString;
struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_ParseFromString;
struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_SerializeToString;
struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_MergeFromString;
struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_ParseFromString;
struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_SerializeToString;
struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_MergeFromString;
struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_ParseFromString;
struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_SerializeToString;
struct __pyx_opt_args_12pyrosm_proto_11StringTable_MergeFromString;
struct __pyx_opt_args_12pyrosm_proto_11StringTable_ParseFromString;
struct __pyx_opt_args_12pyrosm_proto_11StringTable_SerializeToString;
struct __pyx_opt_args_12pyrosm_proto_4Info_MergeFromString;
struct __pyx_opt_args_12pyrosm_proto_4Info_ParseFromString;
struct __pyx_opt_args_12pyrosm_proto_4Info_SerializeToString;
struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_MergeFromString;
struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_ParseFromString;
struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_SerializeToString;
struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_MergeFromString;
struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_ParseFromString;
struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_SerializeToString;
struct __pyx_opt_args_12pyrosm_proto_4Node_MergeFromString;
struct __pyx_opt_args_12pyrosm_proto_4Node_ParseFromString;
struct __pyx_opt_args_12pyrosm_proto_4Node_SerializeToString;
struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_MergeFromString;
struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_ParseFromString;
struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_SerializeToString;
struct __pyx_opt_args_12pyrosm_proto_3Way_MergeFromString;
struct __pyx_opt_args_12pyrosm_proto_3Way_ParseFromString;
struct __pyx_opt_args_12pyrosm_proto_3Way_SerializeToString;
struct __pyx_opt_args_12pyrosm_proto_8Relation_MergeFromString;
struct __pyx_opt_args_12pyrosm_proto_8Relation_ParseFromString;
struct __pyx_opt_args_12pyrosm_proto_8Relation_SerializeToString;

/* "pyrosm_proto.pxd":512
 *     cpdef void _Modified(self)
 * 
 * cdef enum _RelationMemberType:             # <<<<<<<<<<<<<<
 *     _RelationMemberType_NODE = 0
 *     _RelationMemberType_WAY = 1
 */
enum __pyx_t_12pyrosm_proto__RelationMemberType {
  __pyx_e_12pyrosm_proto__RelationMemberType_NODE = 0,
  __pyx_e_12pyrosm_proto__RelationMemberType_WAY = 1,
  __pyx_e_12pyrosm_proto__RelationMemberType_RELATION = 2
};

/* "pyrosm_proto.pxd":35
 *     cpdef bint IsInitialized(self)
 *     cpdef void MergeFrom(self, Blob other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)
 */
struct __pyx_opt_args_12pyrosm_proto_4Blob_MergeFromString {
  int __pyx_n;
  PyObject *size;
};

/* "pyrosm_proto.pxd":36
 *     cpdef void MergeFrom(self, Blob other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializeToString(self, bint cache=*)
 *     cpdef bytes SerializePartialToString(self)
 */
struct __pyx_opt_args_12pyrosm_proto_4Blob_ParseFromString {
  int __pyx_n;
  PyObject *size;
  int reset;
  int cache;
};

/* "pyrosm_proto.pxd":37
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializePartialToString(self)
 * 
 */
struct __pyx_opt_args_12pyrosm_proto_4Blob_SerializeToString {
  int __pyx_n;
  int cache;
};

/* "pyrosm_proto.pxd":69
 *     cpdef bint IsInitialized(self)
 *     cpdef void MergeFrom(self, BlobHeader other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)
 */
struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_MergeFromString {
  int __pyx_n;
  PyObject *size;
};

/* "pyrosm_proto.pxd":70
 *     cpdef void MergeFrom(self, BlobHeader other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializeToString(self, bint cache=*)
 *     cpdef bytes SerializePartialToString(self)
 */
struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_ParseFromString {
  int __pyx_n;
  PyObject *size;
  int reset;
  int cache;
};

/* "pyrosm_proto.pxd":71
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializePartialToString(self)
 * 
 */
struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_SerializeToString {
  int __pyx_n;
  int cache;
};

/* "pyrosm_proto.pxd":108
 *     cpdef bint IsInitialized(self)
 *     cpdef void MergeFrom(self, HeaderBlock other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)
 */
struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_MergeFromString {
  int __pyx_n;
  PyObject *size;
};

/* "pyrosm_proto.pxd":109
 *     cpdef void MergeFrom(self, HeaderBlock other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializeToString(self, bint cache=*)
 *     cpdef bytes SerializePartialToString(self)
 */
struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_ParseFromString {
  int __pyx_n;
  PyObject *size;
  int reset;
  int cache;
};

/* "pyrosm_proto.pxd":110
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializePartialToString(self)
 * 
 */
struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_SerializeToString {
  int __pyx_n;
  int cache;
};

/* "pyrosm_proto.pxd":143
 *     cpdef bint IsInitialized(self)
 *     cpdef void MergeFrom(self, HeaderBBox other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)
 */
struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_MergeFromString {
  int __pyx_n;
  PyObject *size;
};

/* "pyrosm_proto.pxd":144
 *     cpdef void MergeFrom(self, HeaderBBox other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializeToString(self, bint cache=*)
 *     cpdef bytes SerializePartialToString(self)
 */
struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_ParseFromString {
  int __pyx_n;
  PyObject *size;
  int reset;
  int cache;
};

/* "pyrosm_proto.pxd":145
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializePartialToString(self)
 * 
 */
struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_SerializeToString {
  int __pyx_n;
  int cache;
};

/* "pyrosm_proto.pxd":180
 *     cpdef bint IsInitialized(self)
 *     cpdef void MergeFrom(self, PrimitiveBlock other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)
 */
struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_MergeFromString {
  int __pyx_n;
  PyObject *size;
};

/* "pyrosm_proto.pxd":181
 *     cpdef void MergeFrom(self, PrimitiveBlock other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializeToString(self, bint cache=*)
 *     cpdef bytes SerializePartialToString(self)
 */
struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_ParseFromString {
  int __pyx_n;
  PyObject *size;
  int reset;
  int cache;
};

/* "pyrosm_proto.pxd":182
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializePartialToString(self)
 * 
 */
struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_SerializeToString {
  int __pyx_n;
  int cache;
};

/* "pyrosm_proto.pxd":216
 *     cpdef bint IsInitialized(self)
 *     cpdef void MergeFrom(self, PrimitiveGroup other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)
 */
struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_MergeFromString {
  int __pyx_n;
  PyObject *size;
};

/* "pyrosm_proto.pxd":217
 *     cpdef void MergeFrom(self, PrimitiveGroup other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializeToString(self, bint cache=*)
 *     cpdef bytes SerializePartialToString(self)
 */
struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_ParseFromString {
  int __pyx_n;
  PyObject *size;
  int reset;
  int cache;
};

/* "pyrosm_proto.pxd":218
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializePartialToString(self)
 * 
 */
struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_SerializeToString {
  int __pyx_n;
  int cache;
};

/* "pyrosm_proto.pxd":248
 *     cpdef bint IsInitialized(self)
 *     cpdef void MergeFrom(self, StringTable other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)
 */
struct __pyx_opt_args_12pyrosm_proto_11StringTable_MergeFromString {
  int __pyx_n;
  PyObject *size;
};

/* "pyrosm_proto.pxd":249
 *     cpdef void MergeFrom(self, StringTable other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializeToString(self, bint cache=*)
 *     cpdef bytes SerializePartialToString(self)
 */
struct __pyx_opt_args_12pyrosm_proto_11StringTable_ParseFromString {
  int __pyx_n;
  PyObject *size;
  int reset;
  int cache;
};

/* "pyrosm_proto.pxd":250
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializePartialToString(self)
 * 
 */
struct __pyx_opt_args_12pyrosm_proto_11StringTable_SerializeToString {
  int __pyx_n;
  int cache;
};

/* "pyrosm_proto.pxd":285
 *     cpdef bint IsInitialized(self)
 *     cpdef void MergeFrom(self, Info other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)
 */
struct __pyx_opt_args_12pyrosm_proto_4Info_MergeFromString {
  int __pyx_n;
  PyObject *size;
};

/* "pyrosm_proto.pxd":286
 *     cpdef void MergeFrom(self, Info other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializeToString(self, bint cache=*)
 *     cpdef bytes SerializePartialToString(self)
 */
struct __pyx_opt_args_12pyrosm_proto_4Info_ParseFromString {
  int __pyx_n;
  PyObject *size;
  int reset;
  int cache;
};

/* "pyrosm_proto.pxd":287
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializePartialToString(self)
 * 
 */
struct __pyx_opt_args_12pyrosm_proto_4Info_SerializeToString {
  int __pyx_n;
  int cache;
};

/* "pyrosm_proto.pxd":322
 *     cpdef bint IsInitialized(self)
 *     cpdef void MergeFrom(self, DenseInfo other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)
 */
struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_MergeFromString {
  int __pyx_n;
  PyObject *size;
};

/* "pyrosm_proto.pxd":323
 *     cpdef void MergeFrom(self, DenseInfo other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializeToString(self, bint cache=*)
 *     cpdef bytes SerializePartialToString(self)
 */
struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_ParseFromString {
  int __pyx_n;
  PyObject *size;
  int reset;
  int cache;
};

/* "pyrosm_proto.pxd":324
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializePartialToString(self)
 * 
 */
struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_SerializeToString {
  int __pyx_n;
  int cache;
};

/* "pyrosm_proto.pxd":354
 *     cpdef bint IsInitialized(self)
 *     cpdef void MergeFrom(self, ChangeSet other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)
 */
struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_MergeFromString {
  int __pyx_n;
  PyObject *size;
};

/* "pyrosm_proto.pxd":355
 *     cpdef void MergeFrom(self, ChangeSet other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializeToString(self, bint cache=*)
 *     cpdef bytes SerializePartialToString(self)
 */
struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_ParseFromString {
  int __pyx_n;
  PyObject *size;
  int reset;
  int cache;
};

/* "pyrosm_proto.pxd":356
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializePartialToString(self)
 * 
 */
struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_SerializeToString {
  int __pyx_n;
  int cache;
};

/* "pyrosm_proto.pxd":391
 *     cpdef bint IsInitialized(self)
 *     cpdef void MergeFrom(self, Node other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)
 */
struct __pyx_opt_args_12pyrosm_proto_4Node_MergeFromString {
  int __pyx_n;
  PyObject *size;
};

/* "pyrosm_proto.pxd":392
 *     cpdef void MergeFrom(self, Node other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializeToString(self, bint cache=*)
 *     cpdef bytes SerializePartialToString(self)
 */
struct __pyx_opt_args_12pyrosm_proto_4Node_ParseFromString {
  int __pyx_n;
  PyObject *size;
  int reset;
  int cache;
};

/* "pyrosm_proto.pxd":393
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializePartialToString(self)
 * 
 */
struct __pyx_opt_args_12pyrosm_proto_4Node_SerializeToString {
  int __pyx_n;
  int cache;
};

/* "pyrosm_proto.pxd":427
 *     cpdef bint IsInitialized(self)
 *     cpdef void MergeFrom(self, DenseNodes other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)
 */
struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_MergeFromString {
  int __pyx_n;
  PyObject *size;
};

/* "pyrosm_proto.pxd":428
 *     cpdef void MergeFrom(self, DenseNodes other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializeToString(self, bint cache=*)
 *     cpdef bytes SerializePartialToString(self)
 */
struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_ParseFromString {
  int __pyx_n;
  PyObject *size;
  int reset;
  int cache;
};

/* "pyrosm_proto.pxd":429
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializePartialToString(self)
 * 
 */
struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_SerializeToString {
  int __pyx_n;
  int cache;
};

/* "pyrosm_proto.pxd":463
 *     cpdef bint IsInitialized(self)
 *     cpdef void MergeFrom(self, Way other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)
 */
struct __pyx_opt_args_12pyrosm_proto_3Way_MergeFromString {
  int __pyx_n;
  PyObject *size;
};

/* "pyrosm_proto.pxd":464
 *     cpdef void MergeFrom(self, Way other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializeToString(self, bint cache=*)
 *     cpdef bytes SerializePartialToString(self)
 */
struct __pyx_opt_args_12pyrosm_proto_3Way_ParseFromString {
  int __pyx_n;
  PyObject *size;
  int reset;
  int cache;
};

/* "pyrosm_proto.pxd":465
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializePartialToString(self)
 * 
 */
struct __pyx_opt_args_12pyrosm_proto_3Way_SerializeToString {
  int __pyx_n;
  int cache;
};

/* "pyrosm_proto.pxd":501
 *     cpdef bint IsInitialized(self)
 *     cpdef void MergeFrom(self, Relation other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)
 */
struct __pyx_opt_args_12pyrosm_proto_8Relation_MergeFromString {
  int __pyx_n;
  PyObject *size;
};

/* "pyrosm_proto.pxd":502
 *     cpdef void MergeFrom(self, Relation other_msg)
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializeToString(self, bint cache=*)
 *     cpdef bytes SerializePartialToString(self)
 */
struct __pyx_opt_args_12pyrosm_proto_8Relation_ParseFromString {
  int __pyx_n;
  PyObject *size;
  int reset;
  int cache;
};

/* "pyrosm_proto.pxd":503
 *     cpdef int MergeFromString(self, data, size=*) except -1
 *     cpdef int ParseFromString(self, data, size=*, bint reset=*, bint cache=*) except -1
 *     cpdef bytes SerializeToString(self, bint cache=*)             # <<<<<<<<<<<<<<
 *     cpdef bytes SerializePartialToString(self)
 * 
 */
struct __pyx_opt_args_12pyrosm_proto_8Relation_SerializeToString {
  int __pyx_n;
  int cache;
};

/* "pyrobuf_list.pxd":6
 * 
 * 
 * cdef class NullListener:             # <<<<<<<<<<<<<<
 *     cpdef void _Modified(self)
 * 
 */
struct __pyx_obj_12pyrobuf_list_NullListener {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_NullListener *__pyx_vtab;
};


/* "pyrobuf_list.pxd":12
 * 
 * 
 * cdef class TypedList(list):             # <<<<<<<<<<<<<<
 * 
 *     cdef type _list_type
 */
struct __pyx_obj_12pyrobuf_list_TypedList {
  PyListObject __pyx_base;
  PyTypeObject *_list_type;
  PyObject *_listener;
};


/* "pyrobuf_list.pxd":18
 * 
 * 
 * cdef class BytesList(list):             # <<<<<<<<<<<<<<
 * 
 *     cdef PyObject *_listener
 */
struct __pyx_obj_12pyrobuf_list_BytesList {
  PyListObject __pyx_base;
  PyObject *_listener;
};


/* "pyrobuf_list.pxd":23
 * 
 * 
 * cdef class StringList(list):             # <<<<<<<<<<<<<<
 * 
 *     cdef PyObject *_listener
 */
struct __pyx_obj_12pyrobuf_list_StringList {
  PyListObject __pyx_base;
  PyObject *_listener;
};


/* "pyrobuf_list.pxd":32
 * 
 * 
 * cdef class DoubleList:             # <<<<<<<<<<<<<<
 * 
 *     cdef double *_data
 */
struct __pyx_obj_12pyrobuf_list_DoubleList {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_DoubleList *__pyx_vtab;
  double *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrobuf_list.pxd":53
 * 
 * 
 * cdef class FloatList:             # <<<<<<<<<<<<<<
 * 
 *     cdef float *_data
 */
struct __pyx_obj_12pyrobuf_list_FloatList {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_FloatList *__pyx_vtab;
  float *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrobuf_list.pxd":74
 * 
 * 
 * cdef class IntList:             # <<<<<<<<<<<<<<
 * 
 *     cdef int *_data
 */
struct __pyx_obj_12pyrobuf_list_IntList {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_IntList *__pyx_vtab;
  int *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrobuf_list.pxd":95
 * 
 * 
 * cdef class Int32List:             # <<<<<<<<<<<<<<
 * 
 *     cdef int32_t *_data
 */
struct __pyx_obj_12pyrobuf_list_Int32List {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_Int32List *__pyx_vtab;
  int32_t *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrobuf_list.pxd":116
 * 
 * 
 * cdef class Uint32List:             # <<<<<<<<<<<<<<
 * 
 *     cdef uint32_t *_data
 */
struct __pyx_obj_12pyrobuf_list_Uint32List {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *__pyx_vtab;
  uint32_t *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrobuf_list.pxd":137
 * 
 * 
 * cdef class Int64List:             # <<<<<<<<<<<<<<
 * 
 *     cdef int64_t *_data
 */
struct __pyx_obj_12pyrobuf_list_Int64List {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_Int64List *__pyx_vtab;
  int64_t *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrobuf_list.pxd":158
 * 
 * 
 * cdef class Uint64List:             # <<<<<<<<<<<<<<
 * 
 *     cdef uint64_t *_data
 */
struct __pyx_obj_12pyrobuf_list_Uint64List {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_Uint64List *__pyx_vtab;
  uint64_t *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrobuf_list.pxd":179
 * 
 * 
 * cdef class CharList:             # <<<<<<<<<<<<<<
 * 
 *     cdef char *_data
 */
struct __pyx_obj_12pyrobuf_list_CharList {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_CharList *__pyx_vtab;
  char *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrosm_proto.pxd":10
 * import json
 * 
 * cdef class Blob:             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_12pyrosm_proto_Blob {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrosm_proto_Blob *__pyx_vtab;
  PyObject *_raw;
  int32_t _raw_size;
  PyObject *_zlib_data;
  PyObject *_lzma_data;
  PyObject *_OBSOLETE_bzip2_data;
  uint64_t __pyx___field_bitmap0;
  int _is_present_in_parent;
  PyObject *_cached_serialization;
  PyObject *_listener;
};


/* "pyrosm_proto.pxd":46
 *     cpdef void _Modified(self)
 * 
 * cdef class BlobHeader:             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_12pyrosm_proto_BlobHeader {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *__pyx_vtab;
  PyObject *_type;
  PyObject *_indexdata;
  int32_t _datasize;
  uint64_t __pyx___field_bitmap0;
  int _is_present_in_parent;
  PyObject *_cached_serialization;
  PyObject *_listener;
};


/* "pyrosm_proto.pxd":80
 *     cpdef void _Modified(self)
 * 
 * cdef class HeaderBlock:             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_12pyrosm_proto_HeaderBlock {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *__pyx_vtab;
  struct __pyx_obj_12pyrosm_proto_HeaderBBox *_bbox;
  struct __pyx_obj_12pyrobuf_list_StringList *_required_features;
  struct __pyx_obj_12pyrobuf_list_StringList *_optional_features;
  PyObject *_writingprogram;
  PyObject *_source;
  int64_t _osmosis_replication_timestamp;
  int64_t _osmosis_replication_sequence_number;
  PyObject *_osmosis_replication_base_url;
  uint64_t __pyx___field_bitmap0;
  int _is_present_in_parent;
  PyObject *_cached_serialization;
  PyObject *_listener;
};


/* "pyrosm_proto.pxd":119
 *     cpdef void _Modified(self)
 * 
 * cdef class HeaderBBox:             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_12pyrosm_proto_HeaderBBox {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *__pyx_vtab;
  int64_t _left;
  int64_t _right;
  int64_t _top;
  int64_t _bottom;
  uint64_t __pyx___field_bitmap0;
  int _is_present_in_parent;
  PyObject *_cached_serialization;
  PyObject *_listener;
};


/* "pyrosm_proto.pxd":154
 *     cpdef void _Modified(self)
 * 
 * cdef class PrimitiveBlock:             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_12pyrosm_proto_PrimitiveBlock {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *__pyx_vtab;
  struct __pyx_obj_12pyrosm_proto_StringTable *_stringtable;
  struct __pyx_obj_12pyrobuf_list_TypedList *_primitivegroup;
  int32_t _granularity;
  int32_t _date_granularity;
  int64_t _lat_offset;
  int64_t _lon_offset;
  uint64_t __pyx___field_bitmap0;
  int _is_present_in_parent;
  PyObject *_cached_serialization;
  PyObject *_listener;
};


/* "pyrosm_proto.pxd":191
 *     cpdef void _Modified(self)
 * 
 * cdef class PrimitiveGroup:             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_12pyrosm_proto_PrimitiveGroup {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *__pyx_vtab;
  struct __pyx_obj_12pyrobuf_list_TypedList *_nodes;
  struct __pyx_obj_12pyrosm_proto_DenseNodes *_dense;
  struct __pyx_obj_12pyrobuf_list_TypedList *_ways;
  struct __pyx_obj_12pyrobuf_list_TypedList *_relations;
  struct __pyx_obj_12pyrobuf_list_TypedList *_changesets;
  uint64_t __pyx___field_bitmap0;
  int _is_present_in_parent;
  PyObject *_cached_serialization;
  PyObject *_listener;
};


/* "pyrosm_proto.pxd":227
 *     cpdef void _Modified(self)
 * 
 * cdef class StringTable:             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_12pyrosm_proto_StringTable {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrosm_proto_StringTable *__pyx_vtab;
  struct __pyx_obj_12pyrobuf_list_BytesList *_s;
  uint64_t __pyx___field_bitmap0;
  int _is_present_in_parent;
  PyObject *_cached_serialization;
  PyObject *_listener;
};


/* "pyrosm_proto.pxd":259
 *     cpdef void _Modified(self)
 * 
 * cdef class Info:             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_12pyrosm_proto_Info {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrosm_proto_Info *__pyx_vtab;
  int32_t _version;
  int64_t _timestamp;
  int64_t _changeset;
  int32_t _uid;
  uint32_t _user_sid;
  uint32_t _visible;
  uint64_t __pyx___field_bitmap0;
  int _is_present_in_parent;
  PyObject *_cached_serialization;
  PyObject *_listener;
};


/* "pyrosm_proto.pxd":296
 *     cpdef void _Modified(self)
 * 
 * cdef class DenseInfo:             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_12pyrosm_proto_DenseInfo {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *__pyx_vtab;
  struct __pyx_obj_12pyrobuf_list_Int32List *_version;
  struct __pyx_obj_12pyrobuf_list_Int64List *_timestamp;
  struct __pyx_obj_12pyrobuf_list_Int64List *_changeset;
  struct __pyx_obj_12pyrobuf_list_Int32List *_uid;
  struct __pyx_obj_12pyrobuf_list_Int32List *_user_sid;
  struct __pyx_obj_12pyrobuf_list_Uint32List *_visible;
  uint64_t __pyx___field_bitmap0;
  int _is_present_in_parent;
  PyObject *_cached_serialization;
  PyObject *_listener;
};


/* "pyrosm_proto.pxd":333
 *     cpdef void _Modified(self)
 * 
 * cdef class ChangeSet:             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_12pyrosm_proto_ChangeSet {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *__pyx_vtab;
  int64_t _id;
  uint64_t __pyx___field_bitmap0;
  int _is_present_in_parent;
  PyObject *_cached_serialization;
  PyObject *_listener;
};


/* "pyrosm_proto.pxd":365
 *     cpdef void _Modified(self)
 * 
 * cdef class Node:             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_12pyrosm_proto_Node {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrosm_proto_Node *__pyx_vtab;
  int64_t _id;
  struct __pyx_obj_12pyrobuf_list_Uint32List *_keys;
  struct __pyx_obj_12pyrobuf_list_Uint32List *_vals;
  struct __pyx_obj_12pyrosm_proto_Info *_info;
  int64_t _lat;
  int64_t _lon;
  uint64_t __pyx___field_bitmap0;
  int _is_present_in_parent;
  PyObject *_cached_serialization;
  PyObject *_listener;
};


/* "pyrosm_proto.pxd":402
 *     cpdef void _Modified(self)
 * 
 * cdef class DenseNodes:             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_12pyrosm_proto_DenseNodes {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *__pyx_vtab;
  struct __pyx_obj_12pyrobuf_list_Int64List *_id;
  struct __pyx_obj_12pyrosm_proto_DenseInfo *_denseinfo;
  struct __pyx_obj_12pyrobuf_list_Int64List *_lat;
  struct __pyx_obj_12pyrobuf_list_Int64List *_lon;
  struct __pyx_obj_12pyrobuf_list_Int32List *_keys_vals;
  uint64_t __pyx___field_bitmap0;
  int _is_present_in_parent;
  PyObject *_cached_serialization;
  PyObject *_listener;
};


/* "pyrosm_proto.pxd":438
 *     cpdef void _Modified(self)
 * 
 * cdef class Way:             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_12pyrosm_proto_Way {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrosm_proto_Way *__pyx_vtab;
  int64_t _id;
  struct __pyx_obj_12pyrobuf_list_Uint32List *_keys;
  struct __pyx_obj_12pyrobuf_list_Uint32List *_vals;
  struct __pyx_obj_12pyrosm_proto_Info *_info;
  struct __pyx_obj_12pyrobuf_list_Int64List *_refs;
  uint64_t __pyx___field_bitmap0;
  int _is_present_in_parent;
  PyObject *_cached_serialization;
  PyObject *_listener;
};


/* "pyrosm_proto.pxd":474
 *     cpdef void _Modified(self)
 * 
 * cdef class Relation:             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_12pyrosm_proto_Relation {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrosm_proto_Relation *__pyx_vtab;
  int64_t _id;
  struct __pyx_obj_12pyrobuf_list_Uint32List *_keys;
  struct __pyx_obj_12pyrobuf_list_Uint32List *_vals;
  struct __pyx_obj_12pyrosm_proto_Info *_info;
  struct __pyx_obj_12pyrobuf_list_Int32List *_roles_sid;
  struct __pyx_obj_12pyrobuf_list_Int64List *_memids;
  struct __pyx_obj_12pyrobuf_list_Int32List *_types;
  uint64_t __pyx___field_bitmap0;
  int _is_present_in_parent;
  PyObject *_cached_serialization;
  PyObject *_listener;
};


/* "pyrosm_proto.pyx":519
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self;
};


/* "pyrosm_proto.pyx":532
 *         yield 'OBSOLETE_bzip2_data', self.OBSOLETE_bzip2_data
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self;
};


/* "pyrosm_proto.pyx":545
 *         yield 'OBSOLETE_bzip2_data'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self;
};


/* "pyrosm_proto.pyx":560
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self;
  PyObject *__pyx_v_setter;
};


/* "pyrosm_proto.pyx":1024
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self;
};


/* "pyrosm_proto.pyx":1035
 *         yield 'datasize', self.datasize
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self;
};


/* "pyrosm_proto.pyx":1046
 *         yield 'datasize'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self;
};


/* "pyrosm_proto.pyx":1059
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self;
  PyObject *__pyx_v_setter;
};


/* "pyrosm_proto.pyx":1776
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self;
};


/* "pyrosm_proto.pyx":1792
 *         yield 'osmosis_replication_base_url', self.osmosis_replication_base_url
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self;
};


/* "pyrosm_proto.pyx":1808
 *         yield 'osmosis_replication_base_url'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self;
};


/* "pyrosm_proto.pyx":1826
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self;
  PyObject *__pyx_v_setter;
};


/* "pyrosm_proto.pyx":2334
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self;
};


/* "pyrosm_proto.pyx":2346
 *         yield 'bottom', self.bottom
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self;
};


/* "pyrosm_proto.pyx":2358
 *         yield 'bottom'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self;
};


/* "pyrosm_proto.pyx":2372
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self;
  PyObject *__pyx_v_setter;
};


/* "pyrosm_proto.pyx":3005
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self;
};


/* "pyrosm_proto.pyx":3019
 *         yield 'lon_offset', self.lon_offset
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self;
};


/* "pyrosm_proto.pyx":3033
 *         yield 'lon_offset'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self;
};


/* "pyrosm_proto.pyx":3049
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self;
  PyObject *__pyx_v_setter;
};


/* "pyrosm_proto.pyx":3799
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self;
};


/* "pyrosm_proto.pyx":3812
 *         yield 'changesets', self.changesets
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self;
};


/* "pyrosm_proto.pyx":3825
 *         yield 'changesets'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self;
};


/* "pyrosm_proto.pyx":3840
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self;
  PyObject *__pyx_v_setter;
};


/* "pyrosm_proto.pyx":4220
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self;
};


/* "pyrosm_proto.pyx":4229
 *         yield 's', self.s
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self;
};


/* "pyrosm_proto.pyx":4238
 *         yield 's'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self;
};


/* "pyrosm_proto.pyx":4249
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self;
  PyObject *__pyx_v_setter;
};


/* "pyrosm_proto.pyx":4776
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self;
};


/* "pyrosm_proto.pyx":4790
 *         yield 'visible', self.visible
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self;
};


/* "pyrosm_proto.pyx":4804
 *         yield 'visible'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self;
};


/* "pyrosm_proto.pyx":4820
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self;
  PyObject *__pyx_v_setter;
};


/* "pyrosm_proto.pyx":5554
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self;
};


/* "pyrosm_proto.pyx":5568
 *         yield 'visible', self.visible
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self;
};


/* "pyrosm_proto.pyx":5582
 *         yield 'visible'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self;
};


/* "pyrosm_proto.pyx":5598
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self;
  PyObject *__pyx_v_setter;
};


/* "pyrosm_proto.pyx":5968
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self;
};


/* "pyrosm_proto.pyx":5977
 *         yield 'id', self.id
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self;
};


/* "pyrosm_proto.pyx":5986
 *         yield 'id'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self;
};


/* "pyrosm_proto.pyx":5997
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self;
  PyObject *__pyx_v_setter;
};


/* "pyrosm_proto.pyx":6656
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self;
};


/* "pyrosm_proto.pyx":6670
 *         yield 'lon', self.lon
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self;
};


/* "pyrosm_proto.pyx":6684
 *         yield 'lon'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self;
};


/* "pyrosm_proto.pyx":6700
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self;
  PyObject *__pyx_v_setter;
};


/* "pyrosm_proto.pyx":7376
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self;
};


/* "pyrosm_proto.pyx":7389
 *         yield 'keys_vals', self.keys_vals
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self;
};


/* "pyrosm_proto.pyx":7402
 *         yield 'keys_vals'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self;
};


/* "pyrosm_proto.pyx":7417
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self;
  PyObject *__pyx_v_setter;
};


/* "pyrosm_proto.pyx":8067
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self;
};


/* "pyrosm_proto.pyx":8080
 *         yield 'refs', self.refs
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self;
};


/* "pyrosm_proto.pyx":8093
 *         yield 'refs'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self;
};


/* "pyrosm_proto.pyx":8108
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self;
  PyObject *__pyx_v_setter;
};


/* "pyrosm_proto.pyx":8902
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self;
};


/* "pyrosm_proto.pyx":8917
 *         yield 'types', self.types
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self;
};


/* "pyrosm_proto.pyx":8932
 *         yield 'types'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self;
};


/* "pyrosm_proto.pyx":8954
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */
struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters {
  PyObject_HEAD
  struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self;
  PyObject *__pyx_v_setter;
};


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


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


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


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



/* "pyrobuf_list.pxd":6
 * 
 * 
 * cdef class NullListener:             # <<<<<<<<<<<<<<
 *     cpdef void _Modified(self)
 * 
 */

struct __pyx_vtabstruct_12pyrobuf_list_NullListener {
  void (*_Modified)(struct __pyx_obj_12pyrobuf_list_NullListener *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_NullListener *__pyx_vtabptr_12pyrobuf_list_NullListener;


/* "pyrobuf_list.pxd":32
 * 
 * 
 * cdef class DoubleList:             # <<<<<<<<<<<<<<
 * 
 *     cdef double *_data
 */

struct __pyx_vtabstruct_12pyrobuf_list_DoubleList {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_DoubleList *, double);
  PyObject *(*_equal)(struct __pyx_obj_12pyrobuf_list_DoubleList *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_DoubleList *, double, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_DoubleList *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_DoubleList *, int, double, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_DoubleList *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_DoubleList *, double, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_DoubleList *__pyx_vtabptr_12pyrobuf_list_DoubleList;


/* "pyrobuf_list.pxd":53
 * 
 * 
 * cdef class FloatList:             # <<<<<<<<<<<<<<
 * 
 *     cdef float *_data
 */

struct __pyx_vtabstruct_12pyrobuf_list_FloatList {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_FloatList *, float);
  PyObject *(*_equal)(struct __pyx_obj_12pyrobuf_list_FloatList *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_FloatList *, float, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_FloatList *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_FloatList *, int, float, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_FloatList *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_FloatList *, float, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_FloatList *__pyx_vtabptr_12pyrobuf_list_FloatList;


/* "pyrobuf_list.pxd":74
 * 
 * 
 * cdef class IntList:             # <<<<<<<<<<<<<<
 * 
 *     cdef int *_data
 */

struct __pyx_vtabstruct_12pyrobuf_list_IntList {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_IntList *, int);
  PyObject *(*_equal)(struct __pyx_obj_12pyrobuf_list_IntList *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_IntList *, int, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_IntList *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_IntList *, int, int, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_IntList *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_IntList *, int, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_IntList *__pyx_vtabptr_12pyrobuf_list_IntList;


/* "pyrobuf_list.pxd":95
 * 
 * 
 * cdef class Int32List:             # <<<<<<<<<<<<<<
 * 
 *     cdef int32_t *_data
 */

struct __pyx_vtabstruct_12pyrobuf_list_Int32List {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_Int32List *, int32_t);
  PyObject *(*_equal)(struct __pyx_obj_12pyrobuf_list_Int32List *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_Int32List *, int32_t, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_Int32List *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_Int32List *, int, int32_t, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_Int32List *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_Int32List *, int32_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_Int32List *__pyx_vtabptr_12pyrobuf_list_Int32List;


/* "pyrobuf_list.pxd":116
 * 
 * 
 * cdef class Uint32List:             # <<<<<<<<<<<<<<
 * 
 *     cdef uint32_t *_data
 */

struct __pyx_vtabstruct_12pyrobuf_list_Uint32List {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_Uint32List *, uint32_t);
  PyObject *(*_equal)(struct __pyx_obj_12pyrobuf_list_Uint32List *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_Uint32List *, uint32_t, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_Uint32List *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_Uint32List *, int, uint32_t, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_Uint32List *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_Uint32List *, uint32_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *__pyx_vtabptr_12pyrobuf_list_Uint32List;


/* "pyrobuf_list.pxd":137
 * 
 * 
 * cdef class Int64List:             # <<<<<<<<<<<<<<
 * 
 *     cdef int64_t *_data
 */

struct __pyx_vtabstruct_12pyrobuf_list_Int64List {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_Int64List *, int64_t);
  PyObject *(*_equal)(struct __pyx_obj_12pyrobuf_list_Int64List *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_Int64List *, int64_t, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_Int64List *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_Int64List *, int, int64_t, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_Int64List *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_Int64List *, int64_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_Int64List *__pyx_vtabptr_12pyrobuf_list_Int64List;


/* "pyrobuf_list.pxd":158
 * 
 * 
 * cdef class Uint64List:             # <<<<<<<<<<<<<<
 * 
 *     cdef uint64_t *_data
 */

struct __pyx_vtabstruct_12pyrobuf_list_Uint64List {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_Uint64List *, uint64_t);
  PyObject *(*_equal)(struct __pyx_obj_12pyrobuf_list_Uint64List *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_Uint64List *, uint64_t, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_Uint64List *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_Uint64List *, int, uint64_t, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_Uint64List *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_Uint64List *, uint64_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_Uint64List *__pyx_vtabptr_12pyrobuf_list_Uint64List;


/* "pyrobuf_list.pxd":179
 * 
 * 
 * cdef class CharList:             # <<<<<<<<<<<<<<
 * 
 *     cdef char *_data
 */

struct __pyx_vtabstruct_12pyrobuf_list_CharList {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_CharList *, char);
  PyObject *(*_equal)(struct __pyx_obj_12pyrobuf_list_CharList *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_CharList *, char, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_CharList *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_CharList *, int, char, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_CharList *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_CharList *, char, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_CharList *__pyx_vtabptr_12pyrobuf_list_CharList;


/* "pyrosm_proto.pyx":15
 *     pass
 * 
 * cdef class Blob:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */

struct __pyx_vtabstruct_12pyrosm_proto_Blob {
  void (*reset)(struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch);
  void (*Clear)(struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch);
  void (*ClearField)(struct __pyx_obj_12pyrosm_proto_Blob *, PyObject *, int __pyx_skip_dispatch);
  void (*CopyFrom)(struct __pyx_obj_12pyrosm_proto_Blob *, struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch);
  int (*HasField)(struct __pyx_obj_12pyrosm_proto_Blob *, PyObject *, int __pyx_skip_dispatch);
  int (*IsInitialized)(struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch);
  void (*MergeFrom)(struct __pyx_obj_12pyrosm_proto_Blob *, struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch);
  int (*MergeFromString)(struct __pyx_obj_12pyrosm_proto_Blob *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Blob_MergeFromString *__pyx_optional_args);
  int (*ParseFromString)(struct __pyx_obj_12pyrosm_proto_Blob *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Blob_ParseFromString *__pyx_optional_args);
  PyObject *(*SerializeToString)(struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Blob_SerializeToString *__pyx_optional_args);
  PyObject *(*SerializePartialToString)(struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch);
  int (*_protobuf_deserialize)(struct __pyx_obj_12pyrosm_proto_Blob *, unsigned char const *, int, int);
  void (*_protobuf_serialize)(struct __pyx_obj_12pyrosm_proto_Blob *, PyObject *, int);
  void (*_Modified)(struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrosm_proto_Blob *__pyx_vtabptr_12pyrosm_proto_Blob;


/* "pyrosm_proto.pyx":586
 * 
 * 
 * cdef class BlobHeader:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */

struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader {
  void (*reset)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch);
  void (*Clear)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch);
  void (*ClearField)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, PyObject *, int __pyx_skip_dispatch);
  void (*CopyFrom)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch);
  int (*HasField)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, PyObject *, int __pyx_skip_dispatch);
  int (*IsInitialized)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch);
  void (*MergeFrom)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch);
  int (*MergeFromString)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_MergeFromString *__pyx_optional_args);
  int (*ParseFromString)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_ParseFromString *__pyx_optional_args);
  PyObject *(*SerializeToString)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_SerializeToString *__pyx_optional_args);
  PyObject *(*SerializePartialToString)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch);
  int (*_protobuf_deserialize)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, unsigned char const *, int, int);
  void (*_protobuf_serialize)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, PyObject *, int);
  void (*_Modified)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *__pyx_vtabptr_12pyrosm_proto_BlobHeader;


/* "pyrosm_proto.pyx":1079
 * 
 * 
 * cdef class HeaderBlock:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */

struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock {
  void (*reset)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch);
  void (*Clear)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch);
  void (*ClearField)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, PyObject *, int __pyx_skip_dispatch);
  void (*CopyFrom)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch);
  int (*HasField)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, PyObject *, int __pyx_skip_dispatch);
  int (*IsInitialized)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch);
  void (*MergeFrom)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch);
  int (*MergeFromString)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_MergeFromString *__pyx_optional_args);
  int (*ParseFromString)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_ParseFromString *__pyx_optional_args);
  PyObject *(*SerializeToString)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_SerializeToString *__pyx_optional_args);
  PyObject *(*SerializePartialToString)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch);
  int (*_protobuf_deserialize)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, unsigned char const *, int, int);
  void (*_protobuf_serialize)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, PyObject *, int);
  void (*_Modified)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *__pyx_vtabptr_12pyrosm_proto_HeaderBlock;


/* "pyrosm_proto.pyx":1861
 * 
 * 
 * cdef class HeaderBBox:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */

struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox {
  void (*reset)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch);
  void (*Clear)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch);
  void (*ClearField)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, PyObject *, int __pyx_skip_dispatch);
  void (*CopyFrom)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch);
  int (*HasField)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, PyObject *, int __pyx_skip_dispatch);
  int (*IsInitialized)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch);
  void (*MergeFrom)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch);
  int (*MergeFromString)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_MergeFromString *__pyx_optional_args);
  int (*ParseFromString)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_ParseFromString *__pyx_optional_args);
  PyObject *(*SerializeToString)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_SerializeToString *__pyx_optional_args);
  PyObject *(*SerializePartialToString)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch);
  int (*_protobuf_deserialize)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, unsigned char const *, int, int);
  void (*_protobuf_serialize)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, PyObject *, int);
  void (*_Modified)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *__pyx_vtabptr_12pyrosm_proto_HeaderBBox;


/* "pyrosm_proto.pyx":2395
 * 
 * 
 * cdef class PrimitiveBlock:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */

struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock {
  void (*reset)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch);
  void (*Clear)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch);
  void (*ClearField)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, PyObject *, int __pyx_skip_dispatch);
  void (*CopyFrom)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch);
  int (*HasField)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, PyObject *, int __pyx_skip_dispatch);
  int (*IsInitialized)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch);
  void (*MergeFrom)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch);
  int (*MergeFromString)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_MergeFromString *__pyx_optional_args);
  int (*ParseFromString)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_ParseFromString *__pyx_optional_args);
  PyObject *(*SerializeToString)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_SerializeToString *__pyx_optional_args);
  PyObject *(*SerializePartialToString)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch);
  int (*_protobuf_deserialize)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, unsigned char const *, int, int);
  void (*_protobuf_serialize)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, PyObject *, int);
  void (*_Modified)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *__pyx_vtabptr_12pyrosm_proto_PrimitiveBlock;


/* "pyrosm_proto.pyx":3078
 * 
 * 
 * cdef class PrimitiveGroup:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */

struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup {
  void (*reset)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch);
  void (*Clear)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch);
  void (*ClearField)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, PyObject *, int __pyx_skip_dispatch);
  void (*CopyFrom)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch);
  int (*HasField)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, PyObject *, int __pyx_skip_dispatch);
  int (*IsInitialized)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch);
  void (*MergeFrom)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch);
  int (*MergeFromString)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_MergeFromString *__pyx_optional_args);
  int (*ParseFromString)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_ParseFromString *__pyx_optional_args);
  PyObject *(*SerializeToString)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_SerializeToString *__pyx_optional_args);
  PyObject *(*SerializePartialToString)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch);
  int (*_protobuf_deserialize)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, unsigned char const *, int, int);
  void (*_protobuf_serialize)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, PyObject *, int);
  void (*_Modified)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *__pyx_vtabptr_12pyrosm_proto_PrimitiveGroup;


/* "pyrosm_proto.pyx":3866
 * 
 * 
 * cdef class StringTable:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */

struct __pyx_vtabstruct_12pyrosm_proto_StringTable {
  void (*reset)(struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch);
  void (*Clear)(struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch);
  void (*ClearField)(struct __pyx_obj_12pyrosm_proto_StringTable *, PyObject *, int __pyx_skip_dispatch);
  void (*CopyFrom)(struct __pyx_obj_12pyrosm_proto_StringTable *, struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch);
  int (*HasField)(struct __pyx_obj_12pyrosm_proto_StringTable *, PyObject *, int __pyx_skip_dispatch);
  int (*IsInitialized)(struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch);
  void (*MergeFrom)(struct __pyx_obj_12pyrosm_proto_StringTable *, struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch);
  int (*MergeFromString)(struct __pyx_obj_12pyrosm_proto_StringTable *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11StringTable_MergeFromString *__pyx_optional_args);
  int (*ParseFromString)(struct __pyx_obj_12pyrosm_proto_StringTable *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11StringTable_ParseFromString *__pyx_optional_args);
  PyObject *(*SerializeToString)(struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11StringTable_SerializeToString *__pyx_optional_args);
  PyObject *(*SerializePartialToString)(struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch);
  int (*_protobuf_deserialize)(struct __pyx_obj_12pyrosm_proto_StringTable *, unsigned char const *, int, int);
  void (*_protobuf_serialize)(struct __pyx_obj_12pyrosm_proto_StringTable *, PyObject *, int);
  void (*_Modified)(struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrosm_proto_StringTable *__pyx_vtabptr_12pyrosm_proto_StringTable;


/* "pyrosm_proto.pyx":4263
 * 
 * 
 * cdef class Info:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */

struct __pyx_vtabstruct_12pyrosm_proto_Info {
  void (*reset)(struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch);
  void (*Clear)(struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch);
  void (*ClearField)(struct __pyx_obj_12pyrosm_proto_Info *, PyObject *, int __pyx_skip_dispatch);
  void (*CopyFrom)(struct __pyx_obj_12pyrosm_proto_Info *, struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch);
  int (*HasField)(struct __pyx_obj_12pyrosm_proto_Info *, PyObject *, int __pyx_skip_dispatch);
  int (*IsInitialized)(struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch);
  void (*MergeFrom)(struct __pyx_obj_12pyrosm_proto_Info *, struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch);
  int (*MergeFromString)(struct __pyx_obj_12pyrosm_proto_Info *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Info_MergeFromString *__pyx_optional_args);
  int (*ParseFromString)(struct __pyx_obj_12pyrosm_proto_Info *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Info_ParseFromString *__pyx_optional_args);
  PyObject *(*SerializeToString)(struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Info_SerializeToString *__pyx_optional_args);
  PyObject *(*SerializePartialToString)(struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch);
  int (*_protobuf_deserialize)(struct __pyx_obj_12pyrosm_proto_Info *, unsigned char const *, int, int);
  void (*_protobuf_serialize)(struct __pyx_obj_12pyrosm_proto_Info *, PyObject *, int);
  void (*_Modified)(struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrosm_proto_Info *__pyx_vtabptr_12pyrosm_proto_Info;


/* "pyrosm_proto.pyx":4849
 * 
 * 
 * cdef class DenseInfo:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */

struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo {
  void (*reset)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch);
  void (*Clear)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch);
  void (*ClearField)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, PyObject *, int __pyx_skip_dispatch);
  void (*CopyFrom)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch);
  int (*HasField)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, PyObject *, int __pyx_skip_dispatch);
  int (*IsInitialized)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch);
  void (*MergeFrom)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch);
  int (*MergeFromString)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_MergeFromString *__pyx_optional_args);
  int (*ParseFromString)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_ParseFromString *__pyx_optional_args);
  PyObject *(*SerializeToString)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_SerializeToString *__pyx_optional_args);
  PyObject *(*SerializePartialToString)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch);
  int (*_protobuf_deserialize)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, unsigned char const *, int, int);
  void (*_protobuf_serialize)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, PyObject *, int);
  void (*_Modified)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *__pyx_vtabptr_12pyrosm_proto_DenseInfo;


/* "pyrosm_proto.pyx":5627
 * 
 * 
 * cdef class ChangeSet:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */

struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet {
  void (*reset)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch);
  void (*Clear)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch);
  void (*ClearField)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, PyObject *, int __pyx_skip_dispatch);
  void (*CopyFrom)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch);
  int (*HasField)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, PyObject *, int __pyx_skip_dispatch);
  int (*IsInitialized)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch);
  void (*MergeFrom)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch);
  int (*MergeFromString)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_MergeFromString *__pyx_optional_args);
  int (*ParseFromString)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_ParseFromString *__pyx_optional_args);
  PyObject *(*SerializeToString)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_SerializeToString *__pyx_optional_args);
  PyObject *(*SerializePartialToString)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch);
  int (*_protobuf_deserialize)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, unsigned char const *, int, int);
  void (*_protobuf_serialize)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, PyObject *, int);
  void (*_Modified)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *__pyx_vtabptr_12pyrosm_proto_ChangeSet;


/* "pyrosm_proto.pyx":6011
 * 
 * 
 * cdef class Node:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */

struct __pyx_vtabstruct_12pyrosm_proto_Node {
  void (*reset)(struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch);
  void (*Clear)(struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch);
  void (*ClearField)(struct __pyx_obj_12pyrosm_proto_Node *, PyObject *, int __pyx_skip_dispatch);
  void (*CopyFrom)(struct __pyx_obj_12pyrosm_proto_Node *, struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch);
  int (*HasField)(struct __pyx_obj_12pyrosm_proto_Node *, PyObject *, int __pyx_skip_dispatch);
  int (*IsInitialized)(struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch);
  void (*MergeFrom)(struct __pyx_obj_12pyrosm_proto_Node *, struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch);
  int (*MergeFromString)(struct __pyx_obj_12pyrosm_proto_Node *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Node_MergeFromString *__pyx_optional_args);
  int (*ParseFromString)(struct __pyx_obj_12pyrosm_proto_Node *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Node_ParseFromString *__pyx_optional_args);
  PyObject *(*SerializeToString)(struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Node_SerializeToString *__pyx_optional_args);
  PyObject *(*SerializePartialToString)(struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch);
  int (*_protobuf_deserialize)(struct __pyx_obj_12pyrosm_proto_Node *, unsigned char const *, int, int);
  void (*_protobuf_serialize)(struct __pyx_obj_12pyrosm_proto_Node *, PyObject *, int);
  void (*_Modified)(struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrosm_proto_Node *__pyx_vtabptr_12pyrosm_proto_Node;


/* "pyrosm_proto.pyx":6729
 * 
 * 
 * cdef class DenseNodes:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */

struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes {
  void (*reset)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch);
  void (*Clear)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch);
  void (*ClearField)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, PyObject *, int __pyx_skip_dispatch);
  void (*CopyFrom)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch);
  int (*HasField)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, PyObject *, int __pyx_skip_dispatch);
  int (*IsInitialized)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch);
  void (*MergeFrom)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch);
  int (*MergeFromString)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_MergeFromString *__pyx_optional_args);
  int (*ParseFromString)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_ParseFromString *__pyx_optional_args);
  PyObject *(*SerializeToString)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_SerializeToString *__pyx_optional_args);
  PyObject *(*SerializePartialToString)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch);
  int (*_protobuf_deserialize)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, unsigned char const *, int, int);
  void (*_protobuf_serialize)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, PyObject *, int);
  void (*_Modified)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *__pyx_vtabptr_12pyrosm_proto_DenseNodes;


/* "pyrosm_proto.pyx":7443
 * 
 * 
 * cdef class Way:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */

struct __pyx_vtabstruct_12pyrosm_proto_Way {
  void (*reset)(struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch);
  void (*Clear)(struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch);
  void (*ClearField)(struct __pyx_obj_12pyrosm_proto_Way *, PyObject *, int __pyx_skip_dispatch);
  void (*CopyFrom)(struct __pyx_obj_12pyrosm_proto_Way *, struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch);
  int (*HasField)(struct __pyx_obj_12pyrosm_proto_Way *, PyObject *, int __pyx_skip_dispatch);
  int (*IsInitialized)(struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch);
  void (*MergeFrom)(struct __pyx_obj_12pyrosm_proto_Way *, struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch);
  int (*MergeFromString)(struct __pyx_obj_12pyrosm_proto_Way *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_3Way_MergeFromString *__pyx_optional_args);
  int (*ParseFromString)(struct __pyx_obj_12pyrosm_proto_Way *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_3Way_ParseFromString *__pyx_optional_args);
  PyObject *(*SerializeToString)(struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_3Way_SerializeToString *__pyx_optional_args);
  PyObject *(*SerializePartialToString)(struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch);
  int (*_protobuf_deserialize)(struct __pyx_obj_12pyrosm_proto_Way *, unsigned char const *, int, int);
  void (*_protobuf_serialize)(struct __pyx_obj_12pyrosm_proto_Way *, PyObject *, int);
  void (*_Modified)(struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrosm_proto_Way *__pyx_vtabptr_12pyrosm_proto_Way;


/* "pyrosm_proto.pyx":8134
 * 
 * 
 * cdef class Relation:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */

struct __pyx_vtabstruct_12pyrosm_proto_Relation {
  void (*reset)(struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch);
  void (*Clear)(struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch);
  void (*ClearField)(struct __pyx_obj_12pyrosm_proto_Relation *, PyObject *, int __pyx_skip_dispatch);
  void (*CopyFrom)(struct __pyx_obj_12pyrosm_proto_Relation *, struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch);
  int (*HasField)(struct __pyx_obj_12pyrosm_proto_Relation *, PyObject *, int __pyx_skip_dispatch);
  int (*IsInitialized)(struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch);
  void (*MergeFrom)(struct __pyx_obj_12pyrosm_proto_Relation *, struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch);
  int (*MergeFromString)(struct __pyx_obj_12pyrosm_proto_Relation *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_8Relation_MergeFromString *__pyx_optional_args);
  int (*ParseFromString)(struct __pyx_obj_12pyrosm_proto_Relation *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_8Relation_ParseFromString *__pyx_optional_args);
  PyObject *(*SerializeToString)(struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_8Relation_SerializeToString *__pyx_optional_args);
  PyObject *(*SerializePartialToString)(struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch);
  int (*_protobuf_deserialize)(struct __pyx_obj_12pyrosm_proto_Relation *, unsigned char const *, int, int);
  void (*_protobuf_serialize)(struct __pyx_obj_12pyrosm_proto_Relation *, PyObject *, int);
  void (*_Modified)(struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrosm_proto_Relation *__pyx_vtabptr_12pyrosm_proto_Relation;


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

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


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

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


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

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

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

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

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

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

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

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

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

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

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

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#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

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

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

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

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

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

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

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

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

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(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

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

/* StringJoin.proto */
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyString_Join __Pyx_PyBytes_Join
#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
#else
#define __Pyx_PyString_Join PyUnicode_Join
#define __Pyx_PyBaseString_Join PyUnicode_Join
#endif
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION < 3
    #define __Pyx_PyBytes_Join _PyString_Join
    #else
    #define __Pyx_PyBytes_Join _PyBytes_Join
    #endif
#else
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
#endif

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

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

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

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

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

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

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

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

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

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

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

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

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

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

/* 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_Check(obj)  (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
#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);

/* tp_new.proto */
#define __Pyx_tp_new(type_obj, args) __Pyx_tp_new_kwargs(type_obj, args, NULL)
static CYTHON_INLINE PyObject* __Pyx_tp_new_kwargs(PyObject* type_obj, PyObject* args, PyObject* kwargs) {
    return (PyObject*) (((PyTypeObject*)type_obj)->tp_new((PyTypeObject*)type_obj, args, kwargs));
}

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

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

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

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

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

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

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

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

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

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

/* None.proto */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);

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

static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
/* 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

/* 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_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

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

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

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

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

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

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

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

/* None.proto */
static CYTHON_INLINE long __Pyx_div_long(long, long);

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

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

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

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum __Pyx_ImportType_CheckSize {
   __Pyx_ImportType_CheckSize_Error = 0,
   __Pyx_ImportType_CheckSize_Warn = 1,
   __Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
#endif

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

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

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

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

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

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

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

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

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


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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_12pyrosm_proto__RelationMemberType(enum __pyx_t_12pyrosm_proto__RelationMemberType value);

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value);

/* MemviewDtypeToObject.proto */
static CYTHON_INLINE PyObject *__pyx_memview_get_nn_int32_t(const char *itemp);
static CYTHON_INLINE int __pyx_memview_set_nn_int32_t(const char *itemp, PyObject *obj);

/* MemviewDtypeToObject.proto */
static CYTHON_INLINE PyObject *__pyx_memview_get_nn_int64_t(const char *itemp);
static CYTHON_INLINE int __pyx_memview_set_nn_int64_t(const char *itemp, PyObject *obj);

/* MemviewDtypeToObject.proto */
static CYTHON_INLINE PyObject *__pyx_memview_get_nn_uint32_t(const char *itemp);
static CYTHON_INLINE int __pyx_memview_set_nn_uint32_t(const char *itemp, PyObject *obj);

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

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

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

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

/* CIntFromPy.proto */
static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* 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 void __pyx_f_12pyrosm_proto_4Blob_reset(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_4Blob__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, CYTHON_UNUSED int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_4Blob_Clear(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_4Blob_ClearField(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_4Blob_CopyFrom(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_4Blob_HasField(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_4Blob_IsInitialized(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_4Blob_MergeFrom(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_4Blob_MergeFromString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Blob_MergeFromString *__pyx_optional_args); /* proto*/
static int __pyx_f_12pyrosm_proto_4Blob_ParseFromString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Blob_ParseFromString *__pyx_optional_args); /* proto*/
static void __pyx_f_12pyrosm_proto_4Blob__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_buf, CYTHON_UNUSED int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_4Blob__Modified(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_4Blob_SerializeToString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Blob_SerializeToString *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_4Blob_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_10BlobHeader_reset(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_10BlobHeader__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, CYTHON_UNUSED int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_10BlobHeader_Clear(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_10BlobHeader_ClearField(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_10BlobHeader_CopyFrom(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_10BlobHeader_HasField(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_10BlobHeader_IsInitialized(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_10BlobHeader_MergeFrom(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_10BlobHeader_MergeFromString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_MergeFromString *__pyx_optional_args); /* proto*/
static int __pyx_f_12pyrosm_proto_10BlobHeader_ParseFromString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_ParseFromString *__pyx_optional_args); /* proto*/
static void __pyx_f_12pyrosm_proto_10BlobHeader__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_buf, CYTHON_UNUSED int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_10BlobHeader__Modified(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_10BlobHeader_SerializeToString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_SerializeToString *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_10BlobHeader_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_11HeaderBlock_reset(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_11HeaderBlock__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_11HeaderBlock_Clear(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_11HeaderBlock_ClearField(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_11HeaderBlock_CopyFrom(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_11HeaderBlock_HasField(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_11HeaderBlock_IsInitialized(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_11HeaderBlock_MergeFrom(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_11HeaderBlock_MergeFromString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_MergeFromString *__pyx_optional_args); /* proto*/
static int __pyx_f_12pyrosm_proto_11HeaderBlock_ParseFromString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_ParseFromString *__pyx_optional_args); /* proto*/
static void __pyx_f_12pyrosm_proto_11HeaderBlock__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_11HeaderBlock__Modified(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_11HeaderBlock_SerializeToString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_SerializeToString *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_11HeaderBlock_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_10HeaderBBox_reset(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_10HeaderBBox__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, CYTHON_UNUSED int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_10HeaderBBox_Clear(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_10HeaderBBox_ClearField(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_10HeaderBBox_CopyFrom(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_10HeaderBBox_HasField(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_10HeaderBBox_IsInitialized(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_10HeaderBBox_MergeFrom(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_10HeaderBBox_MergeFromString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_MergeFromString *__pyx_optional_args); /* proto*/
static int __pyx_f_12pyrosm_proto_10HeaderBBox_ParseFromString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_ParseFromString *__pyx_optional_args); /* proto*/
static void __pyx_f_12pyrosm_proto_10HeaderBBox__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_buf, CYTHON_UNUSED int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_10HeaderBBox__Modified(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_10HeaderBBox_SerializeToString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_SerializeToString *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_10HeaderBBox_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveBlock_reset(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveBlock__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveBlock_Clear(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveBlock_ClearField(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveBlock_CopyFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveBlock_HasField(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveBlock_IsInitialized(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveBlock_MergeFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveBlock_MergeFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_MergeFromString *__pyx_optional_args); /* proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveBlock_ParseFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_ParseFromString *__pyx_optional_args); /* proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveBlock__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveBlock__Modified(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_14PrimitiveBlock_SerializeToString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_SerializeToString *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_14PrimitiveBlock_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveGroup_reset(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveGroup__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveGroup_Clear(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveGroup_ClearField(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveGroup_CopyFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveGroup_HasField(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveGroup_IsInitialized(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveGroup_MergeFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveGroup_MergeFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_MergeFromString *__pyx_optional_args); /* proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveGroup_ParseFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_ParseFromString *__pyx_optional_args); /* proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveGroup__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveGroup__Modified(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_14PrimitiveGroup_SerializeToString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_SerializeToString *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_14PrimitiveGroup_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_11StringTable_reset(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_11StringTable__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, CYTHON_UNUSED int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_11StringTable_Clear(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_11StringTable_ClearField(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_11StringTable_CopyFrom(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_11StringTable_HasField(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_11StringTable_IsInitialized(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_11StringTable_MergeFrom(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_11StringTable_MergeFromString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11StringTable_MergeFromString *__pyx_optional_args); /* proto*/
static int __pyx_f_12pyrosm_proto_11StringTable_ParseFromString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11StringTable_ParseFromString *__pyx_optional_args); /* proto*/
static void __pyx_f_12pyrosm_proto_11StringTable__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_buf, CYTHON_UNUSED int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_11StringTable__Modified(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_11StringTable_SerializeToString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11StringTable_SerializeToString *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_11StringTable_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_4Info_reset(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_4Info__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, CYTHON_UNUSED int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_4Info_Clear(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_4Info_ClearField(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_4Info_CopyFrom(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_4Info_HasField(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_4Info_IsInitialized(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_4Info_MergeFrom(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_4Info_MergeFromString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Info_MergeFromString *__pyx_optional_args); /* proto*/
static int __pyx_f_12pyrosm_proto_4Info_ParseFromString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Info_ParseFromString *__pyx_optional_args); /* proto*/
static void __pyx_f_12pyrosm_proto_4Info__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_buf, CYTHON_UNUSED int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_4Info__Modified(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_4Info_SerializeToString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Info_SerializeToString *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_4Info_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_9DenseInfo_reset(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_9DenseInfo__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, CYTHON_UNUSED int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_9DenseInfo_Clear(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_9DenseInfo_ClearField(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_9DenseInfo_CopyFrom(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_9DenseInfo_HasField(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_9DenseInfo_IsInitialized(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_9DenseInfo_MergeFrom(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_9DenseInfo_MergeFromString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_MergeFromString *__pyx_optional_args); /* proto*/
static int __pyx_f_12pyrosm_proto_9DenseInfo_ParseFromString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_ParseFromString *__pyx_optional_args); /* proto*/
static void __pyx_f_12pyrosm_proto_9DenseInfo__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_buf, CYTHON_UNUSED int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_9DenseInfo__Modified(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_9DenseInfo_SerializeToString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_SerializeToString *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_9DenseInfo_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_9ChangeSet_reset(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_9ChangeSet__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, CYTHON_UNUSED int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_9ChangeSet_Clear(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_9ChangeSet_ClearField(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_9ChangeSet_CopyFrom(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_9ChangeSet_HasField(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_9ChangeSet_IsInitialized(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_9ChangeSet_MergeFrom(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_9ChangeSet_MergeFromString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_MergeFromString *__pyx_optional_args); /* proto*/
static int __pyx_f_12pyrosm_proto_9ChangeSet_ParseFromString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_ParseFromString *__pyx_optional_args); /* proto*/
static void __pyx_f_12pyrosm_proto_9ChangeSet__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_buf, CYTHON_UNUSED int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_9ChangeSet__Modified(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_9ChangeSet_SerializeToString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_SerializeToString *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_9ChangeSet_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_4Node_reset(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_4Node__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_4Node_Clear(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_4Node_ClearField(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_4Node_CopyFrom(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_4Node_HasField(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_4Node_IsInitialized(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_4Node_MergeFrom(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_4Node_MergeFromString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Node_MergeFromString *__pyx_optional_args); /* proto*/
static int __pyx_f_12pyrosm_proto_4Node_ParseFromString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Node_ParseFromString *__pyx_optional_args); /* proto*/
static void __pyx_f_12pyrosm_proto_4Node__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_4Node__Modified(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_4Node_SerializeToString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Node_SerializeToString *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_4Node_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_10DenseNodes_reset(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_10DenseNodes__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_10DenseNodes_Clear(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_10DenseNodes_ClearField(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_10DenseNodes_CopyFrom(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_10DenseNodes_HasField(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_10DenseNodes_IsInitialized(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_10DenseNodes_MergeFrom(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_10DenseNodes_MergeFromString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_MergeFromString *__pyx_optional_args); /* proto*/
static int __pyx_f_12pyrosm_proto_10DenseNodes_ParseFromString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_ParseFromString *__pyx_optional_args); /* proto*/
static void __pyx_f_12pyrosm_proto_10DenseNodes__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_10DenseNodes__Modified(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_10DenseNodes_SerializeToString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_SerializeToString *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_10DenseNodes_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_3Way_reset(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_3Way__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_3Way_Clear(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_3Way_ClearField(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_3Way_CopyFrom(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_3Way_HasField(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_3Way_IsInitialized(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_3Way_MergeFrom(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_3Way_MergeFromString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_3Way_MergeFromString *__pyx_optional_args); /* proto*/
static int __pyx_f_12pyrosm_proto_3Way_ParseFromString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_3Way_ParseFromString *__pyx_optional_args); /* proto*/
static void __pyx_f_12pyrosm_proto_3Way__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_3Way__Modified(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_3Way_SerializeToString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_3Way_SerializeToString *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_3Way_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_8Relation_reset(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_8Relation__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_8Relation_Clear(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_8Relation_ClearField(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_8Relation_CopyFrom(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_8Relation_HasField(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_8Relation_IsInitialized(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrosm_proto_8Relation_MergeFrom(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_other_msg, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_12pyrosm_proto_8Relation_MergeFromString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_8Relation_MergeFromString *__pyx_optional_args); /* proto*/
static int __pyx_f_12pyrosm_proto_8Relation_ParseFromString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_8Relation_ParseFromString *__pyx_optional_args); /* proto*/
static void __pyx_f_12pyrosm_proto_8Relation__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_cache); /* proto*/
static void __pyx_f_12pyrosm_proto_8Relation__Modified(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_8Relation_SerializeToString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_8Relation_SerializeToString *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_12pyrosm_proto_8Relation_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/

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

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

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

/* Module declarations from '__builtin__' */

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

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

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

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

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

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

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

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

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

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

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

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

/* Module declarations from '__builtin__' */

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

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

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

/* Module declarations from '__builtin__' */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Module declarations from 'cpython' */

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

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

/* Module declarations from 'pyrobuf_list' */
static PyTypeObject *__pyx_ptype_12pyrobuf_list_NullListener = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_TypedList = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_BytesList = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_StringList = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_DoubleList = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_FloatList = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_IntList = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_Int32List = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_Uint32List = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_Int64List = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_Uint64List = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_CharList = 0;
static struct __pyx_obj_12pyrobuf_list_NullListener **__pyx_vp_12pyrobuf_list_null_listener = 0;
#define __pyx_v_12pyrobuf_list_null_listener (*__pyx_vp_12pyrobuf_list_null_listener)

/* Module declarations from 'pyrobuf_util' */
static int32_t (*__pyx_f_12pyrobuf_util_get_varint32)(unsigned char const *, int *); /*proto*/
static int64_t (*__pyx_f_12pyrobuf_util_get_varint64)(unsigned char const *, int *); /*proto*/
static int32_t (*__pyx_f_12pyrobuf_util_get_signed_varint32)(unsigned char const *, int *); /*proto*/
static int64_t (*__pyx_f_12pyrobuf_util_get_signed_varint64)(unsigned char const *, int *); /*proto*/
static int (*__pyx_f_12pyrobuf_util_set_varint32)(int32_t, PyObject *); /*proto*/
static int (*__pyx_f_12pyrobuf_util_set_varint64)(int64_t, PyObject *); /*proto*/
static int (*__pyx_f_12pyrobuf_util_set_signed_varint32)(int32_t, PyObject *); /*proto*/
static int (*__pyx_f_12pyrobuf_util_set_signed_varint64)(int64_t, PyObject *); /*proto*/
static int (*__pyx_f_12pyrobuf_util_skip_generic)(unsigned char const *, int *, int, int); /*proto*/

/* Module declarations from 'pyrosm_proto' */
static PyTypeObject *__pyx_ptype_12pyrosm_proto_Blob = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto_BlobHeader = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto_HeaderBlock = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto_HeaderBBox = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto_PrimitiveBlock = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto_PrimitiveGroup = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto_StringTable = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto_Info = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto_DenseInfo = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto_ChangeSet = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto_Node = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto_DenseNodes = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto_Way = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto_Relation = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct__Items = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_1_Fields = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_2_Values = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_3_Setters = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_4_Items = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_5_Fields = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_6_Values = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_7_Setters = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_8_Items = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_9_Fields = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_10_Values = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_11_Setters = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_12_Items = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_13_Fields = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_14_Values = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_15_Setters = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_16_Items = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_17_Fields = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_18_Values = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_19_Setters = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_20_Items = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_21_Fields = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_22_Values = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_23_Setters = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_24_Items = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_25_Fields = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_26_Values = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_27_Setters = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_28_Items = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_29_Fields = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_30_Values = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_31_Setters = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_32_Items = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_33_Fields = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_34_Values = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_35_Setters = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_36_Items = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_37_Fields = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_38_Values = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_39_Setters = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_40_Items = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_41_Fields = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_42_Values = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_43_Setters = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_44_Items = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_45_Fields = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_46_Values = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_47_Setters = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_48_Items = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_49_Fields = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_50_Values = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_51_Setters = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_52_Items = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_53_Fields = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_54_Values = 0;
static PyTypeObject *__pyx_ptype_12pyrosm_proto___pyx_scope_struct_55_Setters = 0;
static PyTypeObject *__pyx_array_type = 0;
static PyTypeObject *__pyx_MemviewEnum_type = 0;
static PyTypeObject *__pyx_memoryview_type = 0;
static PyTypeObject *__pyx_memoryviewslice_type = 0;
static PyObject *generic = 0;
static PyObject *strided = 0;
static PyObject *indirect = 0;
static PyObject *contiguous = 0;
static PyObject *indirect_contiguous = 0;
static int __pyx_memoryview_thread_locks_used;
static PyThread_type_lock __pyx_memoryview_thread_locks[8];
static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
static void *__pyx_align_pointer(void *, size_t); /*proto*/
static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
static PyObject *_unellipsify(PyObject *, int); /*proto*/
static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
static __Pyx_TypeInfo __Pyx_TypeInfo_nn_int32_t = { "int32_t", NULL, sizeof(int32_t), { 0 }, 0, IS_UNSIGNED(int32_t) ? 'U' : 'I', IS_UNSIGNED(int32_t), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn_int64_t = { "int64_t", NULL, sizeof(int64_t), { 0 }, 0, IS_UNSIGNED(int64_t) ? 'U' : 'I', IS_UNSIGNED(int64_t), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn_uint32_t = { "uint32_t", NULL, sizeof(uint32_t), { 0 }, 0, IS_UNSIGNED(uint32_t) ? 'U' : 'I', IS_UNSIGNED(uint32_t), 0 };
#define __Pyx_MODULE_NAME "pyrosm_proto"
extern int __pyx_module_is_main_pyrosm_proto;
int __pyx_module_is_main_pyrosm_proto = 0;

/* Implementation of 'pyrosm_proto' */
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_DeprecationWarning;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_NameError;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_Ellipsis;
static PyObject *__pyx_builtin_id;
static PyObject *__pyx_builtin_IndexError;
static const char __pyx_k_[] = "\n";
static const char __pyx_k_0[] = "{0}: {{";
    static const char __pyx_k_O[] = "O";
    static const char __pyx_k_c[] = "c";
    static const char __pyx_k_d[] = "d";
    static const char __pyx_k_s[] = "s";
  static const char __pyx_k__2[] = "}";
  static const char __pyx_k__3[] = "";
  static const char __pyx_k_id[] = "id";
  static const char __pyx_k_0_1[] = "{0}: {1}";
  static const char __pyx_k_0_2[] = "  {0}";
  static const char __pyx_k_WAY[] = "WAY";
  static const char __pyx_k_Way[] = "Way";
  static const char __pyx_k_doc[] = "__doc__";
  static const char __pyx_k_lat[] = "lat";
  static const char __pyx_k_lon[] = "lon";
  static const char __pyx_k_new[] = "__new__";
  static const char __pyx_k_obj[] = "obj";
  static const char __pyx_k_raw[] = "raw";
  static const char __pyx_k_top[] = "top";
  static const char __pyx_k_uid[] = "uid";
  static const char __pyx_k_Blob[] = "Blob";
  static const char __pyx_k_Info[] = "Info";
  static const char __pyx_k_NODE[] = "NODE";
  static const char __pyx_k_Node[] = "Node";
  static const char __pyx_k_args[] = "args";
  static const char __pyx_k_base[] = "base";
  static const char __pyx_k_bbox[] = "bbox";
  static const char __pyx_k_data[] = "data";
  static const char __pyx_k_dict[] = "__dict__";
  static const char __pyx_k_info[] = "info";
  static const char __pyx_k_join[] = "join";
  static const char __pyx_k_json[] = "json";
  static const char __pyx_k_keys[] = "keys";
  static const char __pyx_k_left[] = "left";
  static const char __pyx_k_main[] = "__main__";
  static const char __pyx_k_mode[] = "mode";
  static const char __pyx_k_name[] = "name";
  static const char __pyx_k_ndim[] = "ndim";
  static const char __pyx_k_pack[] = "pack";
  static const char __pyx_k_refs[] = "refs";
  static const char __pyx_k_send[] = "send";
  static const char __pyx_k_size[] = "size";
  static const char __pyx_k_step[] = "step";
  static const char __pyx_k_stop[] = "stop";
  static const char __pyx_k_test[] = "__test__";
  static const char __pyx_k_type[] = "type";
  static const char __pyx_k_vals[] = "vals";
  static const char __pyx_k_warn[] = "warn";
  static const char __pyx_k_ways[] = "ways";
  static const char __pyx_k_ASCII[] = "ASCII";
  static const char __pyx_k_Clear[] = "Clear";
  static const char __pyx_k_Items[] = "Items";
  static const char __pyx_k_cache[] = "cache";
  static const char __pyx_k_class[] = "__class__";
  static const char __pyx_k_close[] = "close";
  static const char __pyx_k_dense[] = "dense";
  static const char __pyx_k_dumps[] = "dumps";
  static const char __pyx_k_error[] = "error";
  static const char __pyx_k_flags[] = "flags";
  static const char __pyx_k_items[] = "items";
  static const char __pyx_k_loads[] = "loads";
  static const char __pyx_k_nodes[] = "nodes";
  static const char __pyx_k_range[] = "range";
  static const char __pyx_k_reset[] = "reset";
  static const char __pyx_k_right[] = "right";
  static const char __pyx_k_shape[] = "shape";
  static const char __pyx_k_split[] = "split";
  static const char __pyx_k_start[] = "start";
  static const char __pyx_k_throw[] = "throw";
  static const char __pyx_k_types[] = "types";
  static const char __pyx_k_utf_8[] = "utf-8";
  static const char __pyx_k_value[] = "value";
  static const char __pyx_k_Fields[] = "Fields";
  static const char __pyx_k_Values[] = "Values";
  static const char __pyx_k_append[] = "append";
  static const char __pyx_k_base64[] = "base64";
  static const char __pyx_k_bottom[] = "bottom";
  static const char __pyx_k_decode[] = "decode";
  static const char __pyx_k_encode[] = "encode";
  static const char __pyx_k_extend[] = "extend";
  static const char __pyx_k_format[] = "format";
  static const char __pyx_k_import[] = "__import__";
  static const char __pyx_k_memids[] = "memids";
  static const char __pyx_k_module[] = "__module__";
  static const char __pyx_k_name_2[] = "__name__";
  static const char __pyx_k_pickle[] = "pickle";
  static const char __pyx_k_reduce[] = "__reduce__";
  static const char __pyx_k_setter[] = "setter";
  static const char __pyx_k_source[] = "source";
  static const char __pyx_k_struct[] = "struct";
  static const char __pyx_k_unpack[] = "unpack";
  static const char __pyx_k_update[] = "update";
  static const char __pyx_k_Setters[] = "Setters";
  static const char __pyx_k_fortran[] = "fortran";
  static const char __pyx_k_memview[] = "memview";
  static const char __pyx_k_prepare[] = "__prepare__";
  static const char __pyx_k_version[] = "version";
  static const char __pyx_k_visible[] = "visible";
  static const char __pyx_k_CopyFrom[] = "CopyFrom";
  static const char __pyx_k_Ellipsis[] = "Ellipsis";
  static const char __pyx_k_HasField[] = "HasField";
  static const char __pyx_k_KeyError[] = "KeyError";
  static const char __pyx_k_Modified[] = "_Modified";
  static const char __pyx_k_RELATION[] = "RELATION";
  static const char __pyx_k_Relation[] = "Relation";
  static const char __pyx_k_datasize[] = "datasize";
  static const char __pyx_k_getstate[] = "__getstate__";
  static const char __pyx_k_itemsize[] = "itemsize";
  static const char __pyx_k_listener[] = "listener";
  static const char __pyx_k_pyx_type[] = "__pyx_type";
  static const char __pyx_k_qualname[] = "__qualname__";
  static const char __pyx_k_raw_size[] = "raw_size";
  static const char __pyx_k_setstate[] = "__setstate__";
  static const char __pyx_k_user_sid[] = "user_sid";
  static const char __pyx_k_warnings[] = "warnings";
  static const char __pyx_k_ChangeSet[] = "ChangeSet";
  static const char __pyx_k_DenseInfo[] = "DenseInfo";
  static const char __pyx_k_MergeFrom[] = "MergeFrom";
  static const char __pyx_k_NameError[] = "NameError";
  static const char __pyx_k_TypeError[] = "TypeError";
  static const char __pyx_k_Way_Items[] = "Way.Items";
  static const char __pyx_k_b64decode[] = "b64decode";
  static const char __pyx_k_b64encode[] = "b64encode";
  static const char __pyx_k_changeset[] = "changeset";
  static const char __pyx_k_denseinfo[] = "denseinfo";
  static const char __pyx_k_enumerate[] = "enumerate";
  static const char __pyx_k_indexdata[] = "indexdata";
  static const char __pyx_k_keys_vals[] = "keys_vals";
  static const char __pyx_k_lzma_data[] = "lzma_data";
  static const char __pyx_k_metaclass[] = "__metaclass__";
  static const char __pyx_k_pyx_state[] = "__pyx_state";
  static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
  static const char __pyx_k_relations[] = "relations";
  static const char __pyx_k_roles_sid[] = "roles_sid";
  static const char __pyx_k_timestamp[] = "timestamp";
  static const char __pyx_k_zlib_data[] = "zlib_data";
  static const char __pyx_k_BlobHeader[] = "BlobHeader";
  static const char __pyx_k_Blob_Items[] = "Blob.Items";
  static const char __pyx_k_ClearField[] = "ClearField";
  static const char __pyx_k_DenseNodes[] = "DenseNodes";
  static const char __pyx_k_FromString[] = "FromString";
  static const char __pyx_k_HeaderBBox[] = "HeaderBBox";
  static const char __pyx_k_IndexError[] = "IndexError";
  static const char __pyx_k_Info_Items[] = "Info.Items";
  static const char __pyx_k_Node_Items[] = "Node.Items";
  static const char __pyx_k_ValueError[] = "ValueError";
  static const char __pyx_k_Way_Fields[] = "Way.Fields";
  static const char __pyx_k_Way_Values[] = "Way.Values";
  static const char __pyx_k_changesets[] = "changesets";
  static const char __pyx_k_lat_offset[] = "lat_offset";
  static const char __pyx_k_lon_offset[] = "lon_offset";
  static const char __pyx_k_pyx_result[] = "__pyx_result";
  static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
  static const char __pyx_k_Blob_Fields[] = "Blob.Fields";
  static const char __pyx_k_Blob_Values[] = "Blob.Values";
  static const char __pyx_k_DecodeError[] = "DecodeError";
  static const char __pyx_k_HeaderBlock[] = "HeaderBlock";
  static const char __pyx_k_Info_Fields[] = "Info.Fields";
  static const char __pyx_k_Info_Values[] = "Info.Values";
  static const char __pyx_k_MemoryError[] = "MemoryError";
  static const char __pyx_k_Node_Fields[] = "Node.Fields";
  static const char __pyx_k_Node_Values[] = "Node.Values";
  static const char __pyx_k_PickleError[] = "PickleError";
  static const char __pyx_k_StringTable[] = "StringTable";
  static const char __pyx_k_Way_Setters[] = "Way.Setters";
  static const char __pyx_k_granularity[] = "granularity";
  static const char __pyx_k_stringtable[] = "stringtable";
  static const char __pyx_k_Blob_Setters[] = "Blob.Setters";
  static const char __pyx_k_Info_Setters[] = "Info.Setters";
  static const char __pyx_k_Node_Setters[] = "Node.Setters";
  static const char __pyx_k_pyrosm_proto[] = "pyrosm_proto";
  static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
  static const char __pyx_k_stringsource[] = "stringsource";
  static const char __pyx_k_IsInitialized[] = "IsInitialized";
  static const char __pyx_k_ParseFromDict[] = "ParseFromDict";
  static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
  static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
  static const char __pyx_k_AttributeError[] = "AttributeError";
  static const char __pyx_k_PrimitiveBlock[] = "PrimitiveBlock";
  static const char __pyx_k_PrimitiveGroup[] = "PrimitiveGroup";
  static const char __pyx_k_Relation_Items[] = "Relation.Items";
  static const char __pyx_k_primitivegroup[] = "primitivegroup";
  static const char __pyx_k_writingprogram[] = "writingprogram";
  static const char __pyx_k_ChangeSet_Items[] = "ChangeSet.Items";
  static const char __pyx_k_DenseInfo_Items[] = "DenseInfo.Items";
  static const char __pyx_k_MergeFromString[] = "MergeFromString";
  static const char __pyx_k_ParseFromString[] = "ParseFromString";
  static const char __pyx_k_Relation_Fields[] = "Relation.Fields";
  static const char __pyx_k_Relation_Values[] = "Relation.Values";
  static const char __pyx_k_SerializeToDict[] = "SerializeToDict";
  static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
  static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
  static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
  static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
  static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
  static const char __pyx_k_BlobHeader_Items[] = "BlobHeader.Items";
  static const char __pyx_k_ChangeSet_Fields[] = "ChangeSet.Fields";
  static const char __pyx_k_ChangeSet_Values[] = "ChangeSet.Values";
  static const char __pyx_k_DenseInfo_Fields[] = "DenseInfo.Fields";
  static const char __pyx_k_DenseInfo_Values[] = "DenseInfo.Values";
  static const char __pyx_k_DenseNodes_Items[] = "DenseNodes.Items";
  static const char __pyx_k_HeaderBBox_Items[] = "HeaderBBox.Items";
  static const char __pyx_k_Relation_Setters[] = "Relation.Setters";
  static const char __pyx_k_date_granularity[] = "date_granularity";
  static const char __pyx_k_BlobHeader_Fields[] = "BlobHeader.Fields";
  static const char __pyx_k_BlobHeader_Values[] = "BlobHeader.Values";
  static const char __pyx_k_ChangeSet_Setters[] = "ChangeSet.Setters";
  static const char __pyx_k_DenseInfo_Setters[] = "DenseInfo.Setters";
  static const char __pyx_k_DenseNodes_Fields[] = "DenseNodes.Fields";
  static const char __pyx_k_DenseNodes_Values[] = "DenseNodes.Values";
  static const char __pyx_k_HeaderBBox_Fields[] = "HeaderBBox.Fields";
  static const char __pyx_k_HeaderBBox_Values[] = "HeaderBBox.Values";
  static const char __pyx_k_HeaderBlock_Items[] = "HeaderBlock.Items";
  static const char __pyx_k_SerializeToString[] = "SerializeToString";
  static const char __pyx_k_StringTable_Items[] = "StringTable.Items";
  static const char __pyx_k_Truncated_message[] = "Truncated message";
  static const char __pyx_k_optional_features[] = "optional_features";
  static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
  static const char __pyx_k_required_features[] = "required_features";
  static const char __pyx_k_BlobHeader_Setters[] = "BlobHeader.Setters";
  static const char __pyx_k_DenseNodes_Setters[] = "DenseNodes.Setters";
  static const char __pyx_k_DeprecationWarning[] = "DeprecationWarning";
  static const char __pyx_k_HeaderBBox_Setters[] = "HeaderBBox.Setters";
  static const char __pyx_k_HeaderBlock_Fields[] = "HeaderBlock.Fields";
  static const char __pyx_k_HeaderBlock_Values[] = "HeaderBlock.Values";
  static const char __pyx_k_StringTable_Fields[] = "StringTable.Fields";
  static const char __pyx_k_StringTable_Values[] = "StringTable.Values";
  static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
  static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
  static const char __pyx_k_HeaderBlock_Setters[] = "HeaderBlock.Setters";
  static const char __pyx_k_OBSOLETE_bzip2_data[] = "OBSOLETE_bzip2_data";
  static const char __pyx_k_StringTable_Setters[] = "StringTable.Setters";
  static const char __pyx_k_PrimitiveBlock_Items[] = "PrimitiveBlock.Items";
  static const char __pyx_k_PrimitiveGroup_Items[] = "PrimitiveGroup.Items";
  static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
  static const char __pyx_k_PrimitiveBlock_Fields[] = "PrimitiveBlock.Fields";
  static const char __pyx_k_PrimitiveBlock_Values[] = "PrimitiveBlock.Values";
  static const char __pyx_k_PrimitiveGroup_Fields[] = "PrimitiveGroup.Fields";
  static const char __pyx_k_PrimitiveGroup_Values[] = "PrimitiveGroup.Values";
  static const char __pyx_k_Setters_locals_setter[] = "Setters.<locals>.setter";
  static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
  static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
  static const char __pyx_k_PrimitiveBlock_Setters[] = "PrimitiveBlock.Setters";
  static const char __pyx_k_PrimitiveGroup_Setters[] = "PrimitiveGroup.Setters";
  static const char __pyx_k_SerializePartialToDict[] = "SerializePartialToDict";
  static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
  static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
  static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
  static const char __pyx_k_SerializePartialToString[] = "SerializePartialToString";
  static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
  static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
  static const char __pyx_k_osmosis_replication_base_url[] = "osmosis_replication_base_url";
  static const char __pyx_k_osmosis_replication_timestamp[] = "osmosis_replication_timestamp";
  static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
  static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
  static const char __pyx_k_Message_Way_is_missing_required[] = "Message Way is missing required field: info";
  static const char __pyx_k_Protocol_message_has_no_s_field[] = "Protocol message has no \"%s\" field.";
  static const char __pyx_k_not_a_valid_value_for_enum_Rela[] = "{} not a valid value for enum RelationMemberType";
  static const char __pyx_k_pyrobuf__proto_pyrosm_proto_pyx[] = "pyrobuf\\_proto\\pyrosm_proto.pyx";
  static const char __pyx_k_r_has_type_s_but_expected_one_o[] = "%r has type %s, but expected one of: (%s,)";
  static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
  static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
  static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
  static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
  static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
  static const char __pyx_k_Incompatible_checksums_s_vs_0xb0[] = "Incompatible checksums (%s vs 0xb068931 = (name))";
  static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
  static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
  static const char __pyx_k_Message_DenseNodes_is_missing_re[] = "Message DenseNodes is missing required field: denseinfo";
  static const char __pyx_k_Message_HeaderBlock_is_missing_r[] = "Message HeaderBlock is missing required field: bbox";
  static const char __pyx_k_Message_Node_is_missing_required[] = "Message Node is missing required field: info";
  static const char __pyx_k_Message_PrimitiveBlock_is_missin[] = "Message PrimitiveBlock is missing required field: primitivegroup[%d]";
  static const char __pyx_k_Message_PrimitiveGroup_is_missin[] = "Message PrimitiveGroup is missing required field: dense";
  static const char __pyx_k_Message_Relation_is_missing_requ[] = "Message Relation is missing required field: info";
  static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
  static const char __pyx_k_Protocol_message_has_no_singular[] = "Protocol message has no singular \"%s\" field.";
  static const char __pyx_k_Truncated_message_got_s_expected[] = "Truncated message: got %s expected %s";
  static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
  static const char __pyx_k_field_OBSOLETE_bzip2_data_is_dep[] = "field 'OBSOLETE_bzip2_data' is deprecated";
  static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
  static const char __pyx_k_osmosis_replication_sequence_num[] = "osmosis_replication_sequence_number";
  static const char __pyx_k_required_field_bottom_not_initia[] = "required field 'bottom' not initialized and does not have default";
  static const char __pyx_k_required_field_datasize_not_init[] = "required field 'datasize' not initialized and does not have default";
  static const char __pyx_k_required_field_id_not_initialize[] = "required field 'id' not initialized and does not have default";
  static const char __pyx_k_required_field_lat_not_initializ[] = "required field 'lat' not initialized and does not have default";
  static const char __pyx_k_required_field_left_not_initiali[] = "required field 'left' not initialized and does not have default";
  static const char __pyx_k_required_field_lon_not_initializ[] = "required field 'lon' not initialized and does not have default";
  static const char __pyx_k_required_field_right_not_initial[] = "required field 'right' not initialized and does not have default";
  static const char __pyx_k_required_field_stringtable_not_i[] = "required field 'stringtable' not initialized and does not have default";
  static const char __pyx_k_required_field_top_not_initializ[] = "required field 'top' not initialized and does not have default";
  static const char __pyx_k_required_field_type_not_initiali[] = "required field 'type' not initialized and does not have default";
  static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
  static const char __pyx_k_r_has_type_s_but_expected_one_o_2[] = "%r has type %s, but expected one of: (%s, %s)";
  static const char __pyx_k_Message_PrimitiveGroup_is_missin_2[] = "Message PrimitiveGroup is missing required field: nodes[%d]";
  static const char __pyx_k_Message_PrimitiveGroup_is_missin_3[] = "Message PrimitiveGroup is missing required field: ways[%d]";
  static const char __pyx_k_Message_PrimitiveGroup_is_missin_4[] = "Message PrimitiveGroup is missing required field: relations[%d]";
  static const char __pyx_k_Message_PrimitiveGroup_is_missin_5[] = "Message PrimitiveGroup is missing required field: changesets[%d]";
  static PyObject *__pyx_kp_s_;
  static PyObject *__pyx_kp_s_0;
  static PyObject *__pyx_kp_s_0_1;
  static PyObject *__pyx_kp_s_0_2;
  static PyObject *__pyx_n_s_ASCII;
  static PyObject *__pyx_n_s_AttributeError;
  static PyObject *__pyx_n_s_Blob;
  static PyObject *__pyx_n_s_BlobHeader;
  static PyObject *__pyx_n_s_BlobHeader_Fields;
  static PyObject *__pyx_n_s_BlobHeader_Items;
  static PyObject *__pyx_n_s_BlobHeader_Setters;
  static PyObject *__pyx_n_s_BlobHeader_Values;
  static PyObject *__pyx_n_s_Blob_Fields;
  static PyObject *__pyx_n_s_Blob_Items;
  static PyObject *__pyx_n_s_Blob_Setters;
  static PyObject *__pyx_n_s_Blob_Values;
  static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
  static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
  static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
  static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
  static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
  static PyObject *__pyx_n_s_ChangeSet;
  static PyObject *__pyx_n_s_ChangeSet_Fields;
  static PyObject *__pyx_n_s_ChangeSet_Items;
  static PyObject *__pyx_n_s_ChangeSet_Setters;
  static PyObject *__pyx_n_s_ChangeSet_Values;
  static PyObject *__pyx_n_s_Clear;
  static PyObject *__pyx_n_s_ClearField;
  static PyObject *__pyx_n_s_CopyFrom;
  static PyObject *__pyx_n_s_DecodeError;
  static PyObject *__pyx_n_s_DenseInfo;
  static PyObject *__pyx_n_s_DenseInfo_Fields;
  static PyObject *__pyx_n_s_DenseInfo_Items;
  static PyObject *__pyx_n_s_DenseInfo_Setters;
  static PyObject *__pyx_n_s_DenseInfo_Values;
  static PyObject *__pyx_n_s_DenseNodes;
  static PyObject *__pyx_n_s_DenseNodes_Fields;
  static PyObject *__pyx_n_s_DenseNodes_Items;
  static PyObject *__pyx_n_s_DenseNodes_Setters;
  static PyObject *__pyx_n_s_DenseNodes_Values;
  static PyObject *__pyx_n_s_DeprecationWarning;
  static PyObject *__pyx_n_s_Ellipsis;
  static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
  static PyObject *__pyx_n_s_Fields;
  static PyObject *__pyx_n_s_FromString;
  static PyObject *__pyx_n_s_HasField;
  static PyObject *__pyx_n_s_HeaderBBox;
  static PyObject *__pyx_n_s_HeaderBBox_Fields;
  static PyObject *__pyx_n_s_HeaderBBox_Items;
  static PyObject *__pyx_n_s_HeaderBBox_Setters;
  static PyObject *__pyx_n_s_HeaderBBox_Values;
  static PyObject *__pyx_n_s_HeaderBlock;
  static PyObject *__pyx_n_s_HeaderBlock_Fields;
  static PyObject *__pyx_n_s_HeaderBlock_Items;
  static PyObject *__pyx_n_s_HeaderBlock_Setters;
  static PyObject *__pyx_n_s_HeaderBlock_Values;
  static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb0;
  static PyObject *__pyx_n_s_IndexError;
  static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
  static PyObject *__pyx_n_s_Info;
  static PyObject *__pyx_n_s_Info_Fields;
  static PyObject *__pyx_n_s_Info_Items;
  static PyObject *__pyx_n_s_Info_Setters;
  static PyObject *__pyx_n_s_Info_Values;
  static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
  static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
  static PyObject *__pyx_n_s_IsInitialized;
  static PyObject *__pyx_n_s_Items;
  static PyObject *__pyx_n_s_KeyError;
  static PyObject *__pyx_n_s_MemoryError;
  static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
  static PyObject *__pyx_kp_s_MemoryView_of_r_object;
  static PyObject *__pyx_n_s_MergeFrom;
  static PyObject *__pyx_n_s_MergeFromString;
  static PyObject *__pyx_kp_s_Message_DenseNodes_is_missing_re;
  static PyObject *__pyx_kp_s_Message_HeaderBlock_is_missing_r;
  static PyObject *__pyx_kp_s_Message_Node_is_missing_required;
  static PyObject *__pyx_kp_s_Message_PrimitiveBlock_is_missin;
  static PyObject *__pyx_kp_s_Message_PrimitiveGroup_is_missin;
  static PyObject *__pyx_kp_s_Message_PrimitiveGroup_is_missin_2;
  static PyObject *__pyx_kp_s_Message_PrimitiveGroup_is_missin_3;
  static PyObject *__pyx_kp_s_Message_PrimitiveGroup_is_missin_4;
  static PyObject *__pyx_kp_s_Message_PrimitiveGroup_is_missin_5;
  static PyObject *__pyx_kp_s_Message_Relation_is_missing_requ;
  static PyObject *__pyx_kp_s_Message_Way_is_missing_required;
  static PyObject *__pyx_n_s_Modified;
  static PyObject *__pyx_n_s_NODE;
  static PyObject *__pyx_n_s_NameError;
  static PyObject *__pyx_n_s_Node;
  static PyObject *__pyx_n_s_Node_Fields;
  static PyObject *__pyx_n_s_Node_Items;
  static PyObject *__pyx_n_s_Node_Setters;
  static PyObject *__pyx_n_s_Node_Values;
  static PyObject *__pyx_n_b_O;
  static PyObject *__pyx_n_s_OBSOLETE_bzip2_data;
  static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
  static PyObject *__pyx_n_s_ParseFromDict;
  static PyObject *__pyx_n_s_ParseFromString;
  static PyObject *__pyx_n_s_PickleError;
  static PyObject *__pyx_n_s_PrimitiveBlock;
  static PyObject *__pyx_n_s_PrimitiveBlock_Fields;
  static PyObject *__pyx_n_s_PrimitiveBlock_Items;
  static PyObject *__pyx_n_s_PrimitiveBlock_Setters;
  static PyObject *__pyx_n_s_PrimitiveBlock_Values;
  static PyObject *__pyx_n_s_PrimitiveGroup;
  static PyObject *__pyx_n_s_PrimitiveGroup_Fields;
  static PyObject *__pyx_n_s_PrimitiveGroup_Items;
  static PyObject *__pyx_n_s_PrimitiveGroup_Setters;
  static PyObject *__pyx_n_s_PrimitiveGroup_Values;
  static PyObject *__pyx_kp_s_Protocol_message_has_no_s_field;
  static PyObject *__pyx_kp_s_Protocol_message_has_no_singular;
  static PyObject *__pyx_n_s_RELATION;
  static PyObject *__pyx_n_s_Relation;
  static PyObject *__pyx_n_s_Relation_Fields;
  static PyObject *__pyx_n_s_Relation_Items;
  static PyObject *__pyx_n_s_Relation_Setters;
  static PyObject *__pyx_n_s_Relation_Values;
  static PyObject *__pyx_n_s_SerializePartialToDict;
  static PyObject *__pyx_n_s_SerializePartialToString;
  static PyObject *__pyx_n_s_SerializeToDict;
  static PyObject *__pyx_n_s_SerializeToString;
  static PyObject *__pyx_n_s_Setters;
  static PyObject *__pyx_n_s_Setters_locals_setter;
  static PyObject *__pyx_n_s_StringTable;
  static PyObject *__pyx_n_s_StringTable_Fields;
  static PyObject *__pyx_n_s_StringTable_Items;
  static PyObject *__pyx_n_s_StringTable_Setters;
  static PyObject *__pyx_n_s_StringTable_Values;
  static PyObject *__pyx_kp_s_Truncated_message;
  static PyObject *__pyx_kp_s_Truncated_message_got_s_expected;
  static PyObject *__pyx_n_s_TypeError;
  static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
  static PyObject *__pyx_n_s_ValueError;
  static PyObject *__pyx_n_s_Values;
  static PyObject *__pyx_n_s_View_MemoryView;
  static PyObject *__pyx_n_s_WAY;
  static PyObject *__pyx_n_s_Way;
  static PyObject *__pyx_n_s_Way_Fields;
  static PyObject *__pyx_n_s_Way_Items;
  static PyObject *__pyx_n_s_Way_Setters;
  static PyObject *__pyx_n_s_Way_Values;
  static PyObject *__pyx_kp_s__2;
  static PyObject *__pyx_kp_b__3;
  static PyObject *__pyx_kp_s__3;
  static PyObject *__pyx_n_s_allocate_buffer;
  static PyObject *__pyx_n_s_append;
  static PyObject *__pyx_n_s_args;
  static PyObject *__pyx_n_s_b64decode;
  static PyObject *__pyx_n_s_b64encode;
  static PyObject *__pyx_n_s_base;
  static PyObject *__pyx_n_s_base64;
  static PyObject *__pyx_n_s_bbox;
  static PyObject *__pyx_n_s_bottom;
  static PyObject *__pyx_n_s_c;
  static PyObject *__pyx_n_u_c;
  static PyObject *__pyx_n_s_cache;
  static PyObject *__pyx_n_s_changeset;
  static PyObject *__pyx_n_s_changesets;
  static PyObject *__pyx_n_s_class;
  static PyObject *__pyx_n_s_cline_in_traceback;
  static PyObject *__pyx_n_s_close;
  static PyObject *__pyx_kp_s_contiguous_and_direct;
  static PyObject *__pyx_kp_s_contiguous_and_indirect;
  static PyObject *__pyx_n_s_d;
  static PyObject *__pyx_n_s_data;
  static PyObject *__pyx_n_s_datasize;
  static PyObject *__pyx_n_s_date_granularity;
  static PyObject *__pyx_n_s_decode;
  static PyObject *__pyx_n_s_dense;
  static PyObject *__pyx_n_s_denseinfo;
  static PyObject *__pyx_n_s_dict;
  static PyObject *__pyx_n_s_doc;
  static PyObject *__pyx_n_s_dtype_is_object;
  static PyObject *__pyx_n_s_dumps;
  static PyObject *__pyx_n_s_encode;
  static PyObject *__pyx_n_s_enumerate;
  static PyObject *__pyx_n_s_error;
  static PyObject *__pyx_n_s_extend;
  static PyObject *__pyx_kp_s_field_OBSOLETE_bzip2_data_is_dep;
  static PyObject *__pyx_n_s_flags;
  static PyObject *__pyx_n_s_format;
  static PyObject *__pyx_n_s_fortran;
  static PyObject *__pyx_n_u_fortran;
  static PyObject *__pyx_n_s_getstate;
  static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
  static PyObject *__pyx_n_s_granularity;
  static PyObject *__pyx_n_s_id;
  static PyObject *__pyx_n_s_import;
  static PyObject *__pyx_n_s_indexdata;
  static PyObject *__pyx_n_s_info;
  static PyObject *__pyx_n_s_items;
  static PyObject *__pyx_n_s_itemsize;
  static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
  static PyObject *__pyx_n_s_join;
  static PyObject *__pyx_n_s_json;
  static PyObject *__pyx_n_s_keys;
  static PyObject *__pyx_n_s_keys_vals;
  static PyObject *__pyx_n_s_lat;
  static PyObject *__pyx_n_s_lat_offset;
  static PyObject *__pyx_n_s_left;
  static PyObject *__pyx_n_s_listener;
  static PyObject *__pyx_n_s_loads;
  static PyObject *__pyx_n_s_lon;
  static PyObject *__pyx_n_s_lon_offset;
  static PyObject *__pyx_n_s_lzma_data;
  static PyObject *__pyx_n_s_main;
  static PyObject *__pyx_n_s_memids;
  static PyObject *__pyx_n_s_memview;
  static PyObject *__pyx_n_s_metaclass;
  static PyObject *__pyx_n_s_mode;
  static PyObject *__pyx_n_s_module;
  static PyObject *__pyx_n_s_name;
  static PyObject *__pyx_n_s_name_2;
  static PyObject *__pyx_n_s_ndim;
  static PyObject *__pyx_n_s_new;
  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
  static PyObject *__pyx_n_s_nodes;
  static PyObject *__pyx_kp_s_not_a_valid_value_for_enum_Rela;
  static PyObject *__pyx_n_s_obj;
  static PyObject *__pyx_n_s_optional_features;
  static PyObject *__pyx_n_s_osmosis_replication_base_url;
  static PyObject *__pyx_n_s_osmosis_replication_sequence_num;
  static PyObject *__pyx_n_s_osmosis_replication_timestamp;
  static PyObject *__pyx_n_s_pack;
  static PyObject *__pyx_n_s_pickle;
  static PyObject *__pyx_n_s_prepare;
  static PyObject *__pyx_n_s_primitivegroup;
  static PyObject *__pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx;
  static PyObject *__pyx_n_s_pyrosm_proto;
  static PyObject *__pyx_n_s_pyx_PickleError;
  static PyObject *__pyx_n_s_pyx_checksum;
  static PyObject *__pyx_n_s_pyx_getbuffer;
  static PyObject *__pyx_n_s_pyx_result;
  static PyObject *__pyx_n_s_pyx_state;
  static PyObject *__pyx_n_s_pyx_type;
  static PyObject *__pyx_n_s_pyx_unpickle_Enum;
  static PyObject *__pyx_n_s_pyx_vtable;
  static PyObject *__pyx_n_s_qualname;
  static PyObject *__pyx_kp_s_r_has_type_s_but_expected_one_o;
  static PyObject *__pyx_kp_s_r_has_type_s_but_expected_one_o_2;
  static PyObject *__pyx_n_s_range;
  static PyObject *__pyx_n_s_raw;
  static PyObject *__pyx_n_s_raw_size;
  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_refs;
  static PyObject *__pyx_n_s_relations;
  static PyObject *__pyx_n_s_required_features;
  static PyObject *__pyx_kp_s_required_field_bottom_not_initia;
  static PyObject *__pyx_kp_s_required_field_datasize_not_init;
  static PyObject *__pyx_kp_s_required_field_id_not_initialize;
  static PyObject *__pyx_kp_s_required_field_lat_not_initializ;
  static PyObject *__pyx_kp_s_required_field_left_not_initiali;
  static PyObject *__pyx_kp_s_required_field_lon_not_initializ;
  static PyObject *__pyx_kp_s_required_field_right_not_initial;
  static PyObject *__pyx_kp_s_required_field_stringtable_not_i;
  static PyObject *__pyx_kp_s_required_field_top_not_initializ;
  static PyObject *__pyx_kp_s_required_field_type_not_initiali;
  static PyObject *__pyx_n_s_reset;
  static PyObject *__pyx_n_s_right;
  static PyObject *__pyx_n_s_roles_sid;
  static PyObject *__pyx_n_s_s;
  static PyObject *__pyx_n_s_send;
  static PyObject *__pyx_n_s_setstate;
  static PyObject *__pyx_n_s_setstate_cython;
  static PyObject *__pyx_n_s_setter;
  static PyObject *__pyx_n_s_shape;
  static PyObject *__pyx_n_s_size;
  static PyObject *__pyx_n_s_source;
  static PyObject *__pyx_n_s_split;
  static PyObject *__pyx_n_s_start;
  static PyObject *__pyx_n_s_step;
  static PyObject *__pyx_n_s_stop;
  static PyObject *__pyx_kp_s_strided_and_direct;
  static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
  static PyObject *__pyx_kp_s_strided_and_indirect;
  static PyObject *__pyx_kp_s_stringsource;
  static PyObject *__pyx_n_s_stringtable;
  static PyObject *__pyx_n_s_struct;
  static PyObject *__pyx_n_s_test;
  static PyObject *__pyx_n_s_throw;
  static PyObject *__pyx_n_s_timestamp;
  static PyObject *__pyx_n_s_top;
  static PyObject *__pyx_n_s_type;
  static PyObject *__pyx_n_s_types;
  static PyObject *__pyx_n_s_uid;
  static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
  static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
  static PyObject *__pyx_n_s_unpack;
  static PyObject *__pyx_n_s_update;
  static PyObject *__pyx_n_s_user_sid;
  static PyObject *__pyx_kp_s_utf_8;
  static PyObject *__pyx_n_s_vals;
  static PyObject *__pyx_n_s_value;
  static PyObject *__pyx_n_s_version;
  static PyObject *__pyx_n_s_visible;
  static PyObject *__pyx_n_s_warn;
  static PyObject *__pyx_n_s_warnings;
  static PyObject *__pyx_n_s_ways;
  static PyObject *__pyx_n_s_writingprogram;
  static PyObject *__pyx_n_s_zlib_data;
static int __pyx_pf_12pyrosm_proto_4Blob___cinit__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Blob_2__init__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_4__str__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_6reset(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_3raw___get__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Blob_3raw_2__set__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_8raw_size___get__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Blob_8raw_size_2__set__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_9zlib_data___get__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Blob_9zlib_data_2__set__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_9lzma_data___get__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Blob_9lzma_data_2__set__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_19OBSOLETE_bzip2_data___get__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Blob_19OBSOLETE_bzip2_data_2__set__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_8Clear(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_10ClearField(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_12CopyFrom(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_14HasField(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_16IsInitialized(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_18MergeFrom(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_20MergeFromString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_22ParseFromString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_24FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_26_Modified(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_28SerializeToString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_30SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_32SetInParent(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_34ParseFromJson(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_36SerializeToJson(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_38SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_40ParseFromDict(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_42SerializeToDict(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_44SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_46Items(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_49Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_52Values(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_55Setters(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Blob_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_58__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Blob_60__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_12pyrosm_proto_10BlobHeader___cinit__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10BlobHeader_2__init__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_4__str__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_6reset(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_4type___get__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10BlobHeader_4type_2__set__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_9indexdata___get__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10BlobHeader_9indexdata_2__set__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_8datasize___get__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10BlobHeader_8datasize_2__set__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_8Clear(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_10ClearField(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_12CopyFrom(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_14HasField(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_16IsInitialized(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_18MergeFrom(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_20MergeFromString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_22ParseFromString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_24FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_26_Modified(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_28SerializeToString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_30SerializePartialToString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_32SetInParent(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_34ParseFromJson(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_36SerializeToJson(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_38SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_40ParseFromDict(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_42SerializeToDict(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_44SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_46Items(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_49Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_52Values(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_55Setters(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10BlobHeader_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_58__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_60__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_12pyrosm_proto_11HeaderBlock___cinit__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static void __pyx_pf_12pyrosm_proto_11HeaderBlock_2__dealloc__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_11HeaderBlock_4__init__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_6__str__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_8reset(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_4bbox___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_11HeaderBlock_4bbox_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_17required_features___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_11HeaderBlock_17required_features_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_17optional_features___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_11HeaderBlock_17optional_features_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_14writingprogram___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_11HeaderBlock_14writingprogram_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_6source___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_11HeaderBlock_6source_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_29osmosis_replication_timestamp___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_11HeaderBlock_29osmosis_replication_timestamp_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_35osmosis_replication_sequence_number___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_11HeaderBlock_35osmosis_replication_sequence_number_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_28osmosis_replication_base_url___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_11HeaderBlock_28osmosis_replication_base_url_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_10Clear(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_12ClearField(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_14CopyFrom(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_16HasField(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_18IsInitialized(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_20MergeFrom(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_22MergeFromString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_24ParseFromString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_28_Modified(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_30SerializeToString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_34SetInParent(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_48Items(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_54Values(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_57Setters(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_10setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_12setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_14setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_11HeaderBlock_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_12pyrosm_proto_10HeaderBBox___cinit__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10HeaderBBox_2__init__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_4__str__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_6reset(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_4left___get__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10HeaderBBox_4left_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_5right___get__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10HeaderBBox_5right_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_3top___get__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10HeaderBBox_3top_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_6bottom___get__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10HeaderBBox_6bottom_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_8Clear(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_10ClearField(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_12CopyFrom(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_14HasField(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_16IsInitialized(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_18MergeFrom(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_20MergeFromString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_22ParseFromString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_24FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_26_Modified(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_28SerializeToString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_30SerializePartialToString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_32SetInParent(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_34ParseFromJson(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_36SerializeToJson(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_38SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_40ParseFromDict(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_42SerializeToDict(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_44SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_46Items(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_49Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_52Values(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_55Setters(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10HeaderBBox_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_58__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_60__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock___cinit__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static void __pyx_pf_12pyrosm_proto_14PrimitiveBlock_2__dealloc__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_4__init__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_6__str__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_8reset(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_11stringtable___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_11stringtable_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_14primitivegroup___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_14primitivegroup_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_11granularity___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_11granularity_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_16date_granularity___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_16date_granularity_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_10lat_offset___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_10lat_offset_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_10lon_offset___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_10lon_offset_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_10Clear(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_12ClearField(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_14CopyFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_16HasField(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_18IsInitialized(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_20MergeFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_22MergeFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_24ParseFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_28_Modified(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_30SerializeToString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_34SetInParent(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_48Items(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_54Values(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_57Setters(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_10setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup___cinit__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static void __pyx_pf_12pyrosm_proto_14PrimitiveGroup_2__dealloc__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup_4__init__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_6__str__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_8reset(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_5nodes___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup_5nodes_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_5dense___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup_5dense_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_4ways___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup_4ways_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_9relations___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup_9relations_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_10changesets___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup_10changesets_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_10Clear(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_12ClearField(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_14CopyFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_16HasField(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_18IsInitialized(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_20MergeFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_22MergeFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_24ParseFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_28_Modified(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_30SerializeToString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_34SetInParent(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_48Items(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_54Values(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_57Setters(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_12pyrosm_proto_11StringTable___cinit__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static void __pyx_pf_12pyrosm_proto_11StringTable_2__dealloc__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_11StringTable_4__init__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_6__str__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_8reset(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_1s___get__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_11StringTable_1s_2__set__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_10Clear(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_12ClearField(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_14CopyFrom(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_16HasField(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_18IsInitialized(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_20MergeFrom(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_22MergeFromString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_24ParseFromString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_28_Modified(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_30SerializeToString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_34SetInParent(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_48Items(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_54Values(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_57Setters(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_11StringTable_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_12pyrosm_proto_4Info___cinit__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Info_2__init__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_4__str__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_6reset(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_7version___get__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Info_7version_2__set__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_9timestamp___get__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Info_9timestamp_2__set__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_9changeset___get__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Info_9changeset_2__set__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_3uid___get__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Info_3uid_2__set__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_8user_sid___get__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Info_8user_sid_2__set__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_7visible___get__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Info_7visible_2__set__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_8Clear(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_10ClearField(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_12CopyFrom(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_14HasField(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_16IsInitialized(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_18MergeFrom(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_20MergeFromString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_22ParseFromString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_24FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_26_Modified(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_28SerializeToString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_30SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_32SetInParent(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_34ParseFromJson(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_36SerializeToJson(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_38SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_40ParseFromDict(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_42SerializeToDict(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_44SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_46Items(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_49Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_52Values(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_55Setters(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_7Setters_10setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Info_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_58__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Info_60__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_12pyrosm_proto_9DenseInfo___cinit__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static void __pyx_pf_12pyrosm_proto_9DenseInfo_2__dealloc__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_9DenseInfo_4__init__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_6__str__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_8reset(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7version___get__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_9DenseInfo_7version_2__set__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_9timestamp___get__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_9DenseInfo_9timestamp_2__set__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_9changeset___get__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_9DenseInfo_9changeset_2__set__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_3uid___get__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_9DenseInfo_3uid_2__set__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_8user_sid___get__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_9DenseInfo_8user_sid_2__set__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7visible___get__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_9DenseInfo_7visible_2__set__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_10Clear(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_12ClearField(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_14CopyFrom(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_16HasField(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_18IsInitialized(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_20MergeFrom(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_22MergeFromString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_24ParseFromString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_28_Modified(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_30SerializeToString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_34SetInParent(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_48Items(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_54Values(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_57Setters(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_10setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_9DenseInfo_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_12pyrosm_proto_9ChangeSet___cinit__(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_9ChangeSet_2__init__(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_4__str__(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_6reset(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_2id___get__(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_9ChangeSet_2id_2__set__(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_8Clear(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_10ClearField(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_12CopyFrom(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_14HasField(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_16IsInitialized(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_18MergeFrom(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_20MergeFromString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_22ParseFromString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_24FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_26_Modified(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_28SerializeToString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_30SerializePartialToString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_32SetInParent(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_34ParseFromJson(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_36SerializeToJson(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_38SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_40ParseFromDict(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_42SerializeToDict(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_44SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_46Items(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_49Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_52Values(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_55Setters(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_9ChangeSet_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_58__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_60__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_12pyrosm_proto_4Node___cinit__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static void __pyx_pf_12pyrosm_proto_4Node_2__dealloc__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Node_4__init__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_6__str__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_8reset(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_2id___get__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Node_2id_2__set__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_4keys___get__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Node_4keys_2__set__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_4vals___get__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Node_4vals_2__set__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_4info___get__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Node_4info_2__set__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_3lat___get__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Node_3lat_2__set__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_3lon___get__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Node_3lon_2__set__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_10Clear(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_12ClearField(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_14CopyFrom(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_16HasField(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_18IsInitialized(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_20MergeFrom(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_22MergeFromString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_24ParseFromString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_28_Modified(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_30SerializeToString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_34SetInParent(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_48Items(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_54Values(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_57Setters(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_7Setters_10setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_4Node_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_4Node_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_12pyrosm_proto_10DenseNodes___cinit__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static void __pyx_pf_12pyrosm_proto_10DenseNodes_2__dealloc__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10DenseNodes_4__init__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_6__str__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_8reset(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_2id___get__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10DenseNodes_2id_2__set__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_9denseinfo___get__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10DenseNodes_9denseinfo_2__set__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_3lat___get__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10DenseNodes_3lat_2__set__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_3lon___get__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10DenseNodes_3lon_2__set__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_9keys_vals___get__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10DenseNodes_9keys_vals_2__set__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_10Clear(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_12ClearField(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_14CopyFrom(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_16HasField(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_18IsInitialized(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_20MergeFrom(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_22MergeFromString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_24ParseFromString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_28_Modified(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_30SerializeToString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_34SetInParent(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_48Items(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_54Values(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_57Setters(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_10DenseNodes_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_12pyrosm_proto_3Way___cinit__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static void __pyx_pf_12pyrosm_proto_3Way_2__dealloc__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_3Way_4__init__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_6__str__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_8reset(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_2id___get__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_3Way_2id_2__set__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_4keys___get__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_3Way_4keys_2__set__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_4vals___get__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_3Way_4vals_2__set__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_4info___get__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_3Way_4info_2__set__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_4refs___get__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_3Way_4refs_2__set__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_10Clear(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_12ClearField(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_14CopyFrom(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_16HasField(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_18IsInitialized(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_20MergeFrom(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_22MergeFromString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_24ParseFromString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_28_Modified(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_30SerializeToString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_34SetInParent(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_48Items(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_54Values(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_57Setters(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_3Way_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_3Way_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_12pyrosm_proto_8Relation___cinit__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static void __pyx_pf_12pyrosm_proto_8Relation_2__dealloc__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_8Relation_4__init__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_6__str__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_8reset(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_2id___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_8Relation_2id_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_4keys___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_8Relation_4keys_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_4vals___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_8Relation_4vals_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_4info___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_8Relation_4info_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_9roles_sid___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_8Relation_9roles_sid_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_6memids___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_8Relation_6memids_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_5types___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_8Relation_5types_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_10Clear(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_12ClearField(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_14CopyFrom(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_16HasField(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_field_name); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_18IsInitialized(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_20MergeFrom(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_other_msg); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_22MergeFromString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_24ParseFromString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_28_Modified(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_30SerializeToString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, int __pyx_v_cache); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_34SetInParent(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_48Items(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_54Values(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_57Setters(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_7Setters_10setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_7Setters_12setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrosm_proto_8Relation_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrosm_proto_8Relation_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_12pyrosm_proto_Blob(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto_BlobHeader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto_HeaderBlock(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto_HeaderBBox(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto_PrimitiveBlock(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto_PrimitiveGroup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto_StringTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto_Info(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto_DenseInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto_ChangeSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto_Node(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto_DenseNodes(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto_Way(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto_Relation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct__Items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_1_Fields(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_2_Values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_3_Setters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_4_Items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_5_Fields(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_6_Values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_7_Setters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_8_Items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_9_Fields(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_10_Values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_11_Setters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_12_Items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_13_Fields(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_14_Values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_15_Setters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_16_Items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_17_Fields(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_18_Values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_19_Setters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_20_Items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_21_Fields(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_22_Values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_23_Setters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_24_Items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_25_Fields(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_26_Values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_27_Setters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_28_Items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_29_Fields(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_30_Values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_31_Setters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_32_Items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_33_Fields(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_34_Values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_35_Setters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_36_Items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_37_Fields(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_38_Values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_39_Setters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_40_Items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_41_Fields(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_42_Values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_43_Setters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_44_Items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_45_Fields(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_46_Values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_47_Setters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_48_Items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_49_Fields(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_50_Values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_51_Setters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_52_Items(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_53_Fields(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_54_Values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_55_Setters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyString_Type_encode = {0, &__pyx_n_s_encode, 0, 0, 0};
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_184977713;
static PyObject *__pyx_int_2147483648;
static PyObject *__pyx_int_4294967296;
static PyObject *__pyx_int_8589934592;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
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__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__61;
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__75;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_codeobj__7;
static PyObject *__pyx_codeobj__9;
static PyObject *__pyx_slice__200;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__106;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__113;
static PyObject *__pyx_tuple__115;
static PyObject *__pyx_tuple__117;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__120;
static PyObject *__pyx_tuple__121;
static PyObject *__pyx_tuple__122;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__125;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__127;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__129;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__133;
static PyObject *__pyx_tuple__135;
static PyObject *__pyx_tuple__137;
static PyObject *__pyx_tuple__139;
static PyObject *__pyx_tuple__141;
static PyObject *__pyx_tuple__142;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__144;
static PyObject *__pyx_tuple__146;
static PyObject *__pyx_tuple__148;
static PyObject *__pyx_tuple__150;
static PyObject *__pyx_tuple__152;
static PyObject *__pyx_tuple__154;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__156;
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__168;
static PyObject *__pyx_tuple__169;
static PyObject *__pyx_tuple__170;
static PyObject *__pyx_tuple__172;
static PyObject *__pyx_tuple__174;
static PyObject *__pyx_tuple__176;
static PyObject *__pyx_tuple__178;
static PyObject *__pyx_tuple__180;
static PyObject *__pyx_tuple__182;
static PyObject *__pyx_tuple__184;
static PyObject *__pyx_tuple__185;
static PyObject *__pyx_tuple__186;
static PyObject *__pyx_tuple__187;
static PyObject *__pyx_tuple__188;
static PyObject *__pyx_tuple__189;
static PyObject *__pyx_tuple__190;
static PyObject *__pyx_tuple__191;
static PyObject *__pyx_tuple__192;
static PyObject *__pyx_tuple__193;
static PyObject *__pyx_tuple__194;
static PyObject *__pyx_tuple__195;
static PyObject *__pyx_tuple__196;
static PyObject *__pyx_tuple__197;
static PyObject *__pyx_tuple__198;
static PyObject *__pyx_tuple__199;
static PyObject *__pyx_tuple__201;
static PyObject *__pyx_tuple__202;
static PyObject *__pyx_tuple__203;
static PyObject *__pyx_tuple__204;
static PyObject *__pyx_tuple__205;
static PyObject *__pyx_tuple__206;
static PyObject *__pyx_tuple__207;
static PyObject *__pyx_tuple__208;
static PyObject *__pyx_tuple__209;
static PyObject *__pyx_codeobj__11;
static PyObject *__pyx_codeobj__13;
static PyObject *__pyx_codeobj__15;
static PyObject *__pyx_codeobj__21;
static PyObject *__pyx_codeobj__23;
static PyObject *__pyx_codeobj__25;
static PyObject *__pyx_codeobj__30;
static PyObject *__pyx_codeobj__32;
static PyObject *__pyx_codeobj__34;
static PyObject *__pyx_codeobj__36;
static PyObject *__pyx_codeobj__38;
static PyObject *__pyx_codeobj__40;
static PyObject *__pyx_codeobj__42;
static PyObject *__pyx_codeobj__44;
static PyObject *__pyx_codeobj__52;
static PyObject *__pyx_codeobj__54;
static PyObject *__pyx_codeobj__56;
static PyObject *__pyx_codeobj__58;
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__78;
static PyObject *__pyx_codeobj__80;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__84;
static PyObject *__pyx_codeobj__86;
static PyObject *__pyx_codeobj__90;
static PyObject *__pyx_codeobj__94;
static PyObject *__pyx_codeobj__96;
static PyObject *__pyx_codeobj__98;
static PyObject *__pyx_codeobj__100;
static PyObject *__pyx_codeobj__102;
static PyObject *__pyx_codeobj__104;
static PyObject *__pyx_codeobj__108;
static PyObject *__pyx_codeobj__110;
static PyObject *__pyx_codeobj__112;
static PyObject *__pyx_codeobj__114;
static PyObject *__pyx_codeobj__116;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__123;
static PyObject *__pyx_codeobj__130;
static PyObject *__pyx_codeobj__132;
static PyObject *__pyx_codeobj__134;
static PyObject *__pyx_codeobj__136;
static PyObject *__pyx_codeobj__138;
static PyObject *__pyx_codeobj__140;
static PyObject *__pyx_codeobj__145;
static PyObject *__pyx_codeobj__147;
static PyObject *__pyx_codeobj__149;
static PyObject *__pyx_codeobj__151;
static PyObject *__pyx_codeobj__153;
static PyObject *__pyx_codeobj__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__171;
static PyObject *__pyx_codeobj__173;
static PyObject *__pyx_codeobj__175;
static PyObject *__pyx_codeobj__177;
static PyObject *__pyx_codeobj__179;
static PyObject *__pyx_codeobj__181;
static PyObject *__pyx_codeobj__183;
static PyObject *__pyx_codeobj__210;
/* Late includes */

/* "pyrosm_proto.pyx":17
 * cdef class Blob:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Blob_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Blob_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob___cinit__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static int __pyx_pf_12pyrosm_proto_4Blob___cinit__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrosm_proto.pyx":18
 * 
 *     def __cinit__(self):
 *         self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

  /* "pyrosm_proto.pyx":17
 * cdef class Blob:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

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

/* "pyrosm_proto.pyx":22
 * 
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Blob_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Blob_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_2__init__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), __pyx_v_kwargs);

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

static int __pyx_pf_12pyrosm_proto_4Blob_2__init__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_field_name = NULL;
  PyObject *__pyx_v_field_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrosm_proto.pyx":23
 * 
 *     def __init__(self, **kwargs):
 *         self.reset()             # <<<<<<<<<<<<<<
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":24
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 24, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":25
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     setattr(self, field_name, field_value)
 */
    __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 25, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 25, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 25, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 25, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 25, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 25, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 25, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":26
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "pyrosm_proto.pyx":27
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     setattr(self, field_name, field_value)             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 */
          __pyx_t_13 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name, __pyx_v_field_value); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 27, __pyx_L8_error)

          /* "pyrosm_proto.pyx":26
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L15_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrosm_proto.pyx":28
 *                 try:
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return
 */
        __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_14) {
          __Pyx_AddTraceback("pyrosm_proto.Blob.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 28, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_6);

          /* "pyrosm_proto.pyx":29
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))             # <<<<<<<<<<<<<<
 *         return
 * 
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_field_name);
          __Pyx_GIVEREF(__pyx_v_field_name);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_field_name);
          __pyx_t_15 = __Pyx_PyString_Format(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 29, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 29, __pyx_L10_except_error)
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;

        /* "pyrosm_proto.pyx":26
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 */
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L15_try_end:;
      }

      /* "pyrosm_proto.pyx":25
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     setattr(self, field_name, field_value)
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":24
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  }

  /* "pyrosm_proto.pyx":30
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":22
 * 
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("pyrosm_proto.Blob.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XDECREF(__pyx_v_field_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":32
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'raw',
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_4__str__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_4__str__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_messages = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyrosm_proto.pyx":33
 * 
 *     def __str__(self):
 *         fields = [             # <<<<<<<<<<<<<<
 *                           'raw',
 *                           'raw_size',
 */
  __pyx_t_1 = PyList_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_raw);
  __Pyx_GIVEREF(__pyx_n_s_raw);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_raw);
  __Pyx_INCREF(__pyx_n_s_raw_size);
  __Pyx_GIVEREF(__pyx_n_s_raw_size);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_raw_size);
  __Pyx_INCREF(__pyx_n_s_zlib_data);
  __Pyx_GIVEREF(__pyx_n_s_zlib_data);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_zlib_data);
  __Pyx_INCREF(__pyx_n_s_lzma_data);
  __Pyx_GIVEREF(__pyx_n_s_lzma_data);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_lzma_data);
  __Pyx_INCREF(__pyx_n_s_OBSOLETE_bzip2_data);
  __Pyx_GIVEREF(__pyx_n_s_OBSOLETE_bzip2_data);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_OBSOLETE_bzip2_data);
  __pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":39
 *                           'lzma_data',
 *                           'OBSOLETE_bzip2_data',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]             # <<<<<<<<<<<<<<
 *         messages = []
 *         for message in messages:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 39, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 39, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 39, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 39, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 39, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":40
 *                           'OBSOLETE_bzip2_data',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []             # <<<<<<<<<<<<<<
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_messages = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":41
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  __pyx_t_1 = __pyx_v_messages; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 41, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":42
 *         messages = []
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))             # <<<<<<<<<<<<<<
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 42, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":43
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    __pyx_t_4 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 43, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 43, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 43, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":44
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))             # <<<<<<<<<<<<<<
 *             components.append('}')
 *         return '\n'.join(components)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 44, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_line);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 44, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":43
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":45
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 *             components.append('}')             # <<<<<<<<<<<<<<
 *         return '\n'.join(components)
 * 
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_kp_s__2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 45, __pyx_L1_error)

    /* "pyrosm_proto.pyx":41
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":46
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 *         return '\n'.join(components)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":32
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'raw',
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.Blob.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_messages);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":48
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Blob_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_4Blob_reset(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Blob_7reset)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":51
 *         # reset values and populate defaults
 * 
 *         self.__field_bitmap0 = 0             # <<<<<<<<<<<<<<
 * 
 *         self._raw = b""
 */
  __pyx_v_self->__pyx___field_bitmap0 = 0;

  /* "pyrosm_proto.pyx":53
 *         self.__field_bitmap0 = 0
 * 
 *         self._raw = b""             # <<<<<<<<<<<<<<
 *         self._raw_size = 0
 *         self._zlib_data = b""
 */
  __Pyx_INCREF(__pyx_kp_b__3);
  __Pyx_GIVEREF(__pyx_kp_b__3);
  __Pyx_GOTREF(__pyx_v_self->_raw);
  __Pyx_DECREF(__pyx_v_self->_raw);
  __pyx_v_self->_raw = __pyx_kp_b__3;

  /* "pyrosm_proto.pyx":54
 * 
 *         self._raw = b""
 *         self._raw_size = 0             # <<<<<<<<<<<<<<
 *         self._zlib_data = b""
 *         self._lzma_data = b""
 */
  __pyx_v_self->_raw_size = 0;

  /* "pyrosm_proto.pyx":55
 *         self._raw = b""
 *         self._raw_size = 0
 *         self._zlib_data = b""             # <<<<<<<<<<<<<<
 *         self._lzma_data = b""
 *         self._OBSOLETE_bzip2_data = b""
 */
  __Pyx_INCREF(__pyx_kp_b__3);
  __Pyx_GIVEREF(__pyx_kp_b__3);
  __Pyx_GOTREF(__pyx_v_self->_zlib_data);
  __Pyx_DECREF(__pyx_v_self->_zlib_data);
  __pyx_v_self->_zlib_data = __pyx_kp_b__3;

  /* "pyrosm_proto.pyx":56
 *         self._raw_size = 0
 *         self._zlib_data = b""
 *         self._lzma_data = b""             # <<<<<<<<<<<<<<
 *         self._OBSOLETE_bzip2_data = b""
 *         return
 */
  __Pyx_INCREF(__pyx_kp_b__3);
  __Pyx_GIVEREF(__pyx_kp_b__3);
  __Pyx_GOTREF(__pyx_v_self->_lzma_data);
  __Pyx_DECREF(__pyx_v_self->_lzma_data);
  __pyx_v_self->_lzma_data = __pyx_kp_b__3;

  /* "pyrosm_proto.pyx":57
 *         self._zlib_data = b""
 *         self._lzma_data = b""
 *         self._OBSOLETE_bzip2_data = b""             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __Pyx_INCREF(__pyx_kp_b__3);
  __Pyx_GIVEREF(__pyx_kp_b__3);
  __Pyx_GOTREF(__pyx_v_self->_OBSOLETE_bzip2_data);
  __Pyx_DECREF(__pyx_v_self->_OBSOLETE_bzip2_data);
  __pyx_v_self->_OBSOLETE_bzip2_data = __pyx_kp_b__3;

  /* "pyrosm_proto.pyx":58
 *         self._lzma_data = b""
 *         self._OBSOLETE_bzip2_data = b""
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":48
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

  /* 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_WriteUnraisable("pyrosm_proto.Blob.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_6reset(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_6reset(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Blob_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __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("pyrosm_proto.Blob.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":62
 * 
 *     @property
 *     def raw(self):             # <<<<<<<<<<<<<<
 *         return self._raw
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_3raw_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_3raw_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_3raw___get__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_3raw___get__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":63
 *     @property
 *     def raw(self):
 *         return self._raw             # <<<<<<<<<<<<<<
 * 
 *     @raw.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_raw);
  __pyx_r = __pyx_v_self->_raw;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":62
 * 
 *     @property
 *     def raw(self):             # <<<<<<<<<<<<<<
 *         return self._raw
 * 
 */

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

/* "pyrosm_proto.pyx":66
 * 
 *     @raw.setter
 *     def raw(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         if isinstance(value, bytes):
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Blob_3raw_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Blob_3raw_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_3raw_2__set__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Blob_3raw_2__set__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":67
 *     @raw.setter
 *     def raw(self, value):
 *         self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *         if isinstance(value, bytes):
 *             self._raw = value
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

  /* "pyrosm_proto.pyx":68
 *     def raw(self, value):
 *         self.__field_bitmap0 |= 1
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._raw = value
 *         else:
 */
  __pyx_t_1 = PyBytes_Check(__pyx_v_value); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":69
 *         self.__field_bitmap0 |= 1
 *         if isinstance(value, bytes):
 *             self._raw = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (value, type(value), bytes))
 */
    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, 69, __pyx_L1_error)
    __pyx_t_3 = __pyx_v_value;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_raw);
    __Pyx_DECREF(__pyx_v_self->_raw);
    __pyx_v_self->_raw = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":68
 *     def raw(self, value):
 *         self.__field_bitmap0 |= 1
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._raw = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":71
 *             self._raw = value
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (value, type(value), bytes))             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  /*else*/ {
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_3, 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_3, 1, ((PyObject *)Py_TYPE(__pyx_v_value)));
    __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)(&PyBytes_Type)));
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 71, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":72
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (value, type(value), bytes))
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":66
 * 
 *     @raw.setter
 *     def raw(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         if isinstance(value, bytes):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyrosm_proto.Blob.raw.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":75
 * 
 *     @property
 *     def raw_size(self):             # <<<<<<<<<<<<<<
 *         return self._raw_size
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_8raw_size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_8raw_size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_8raw_size___get__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_8raw_size___get__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":76
 *     @property
 *     def raw_size(self):
 *         return self._raw_size             # <<<<<<<<<<<<<<
 * 
 *     @raw_size.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_raw_size); 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;

  /* "pyrosm_proto.pyx":75
 * 
 *     @property
 *     def raw_size(self):             # <<<<<<<<<<<<<<
 *         return self._raw_size
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Blob.raw_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":79
 * 
 *     @raw_size.setter
 *     def raw_size(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 2
 *         self._raw_size = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Blob_8raw_size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Blob_8raw_size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_8raw_size_2__set__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Blob_8raw_size_2__set__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int32_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":80
 *     @raw_size.setter
 *     def raw_size(self, value):
 *         self.__field_bitmap0 |= 2             # <<<<<<<<<<<<<<
 *         self._raw_size = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 2);

  /* "pyrosm_proto.pyx":81
 *     def raw_size(self, value):
 *         self.__field_bitmap0 |= 2
 *         self._raw_size = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 81, __pyx_L1_error)
  __pyx_v_self->_raw_size = __pyx_t_1;

  /* "pyrosm_proto.pyx":82
 *         self.__field_bitmap0 |= 2
 *         self._raw_size = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":79
 * 
 *     @raw_size.setter
 *     def raw_size(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 2
 *         self._raw_size = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob.raw_size.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":85
 * 
 *     @property
 *     def zlib_data(self):             # <<<<<<<<<<<<<<
 *         return self._zlib_data
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_9zlib_data_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_9zlib_data_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_9zlib_data___get__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_9zlib_data___get__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":86
 *     @property
 *     def zlib_data(self):
 *         return self._zlib_data             # <<<<<<<<<<<<<<
 * 
 *     @zlib_data.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_zlib_data);
  __pyx_r = __pyx_v_self->_zlib_data;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":85
 * 
 *     @property
 *     def zlib_data(self):             # <<<<<<<<<<<<<<
 *         return self._zlib_data
 * 
 */

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

/* "pyrosm_proto.pyx":89
 * 
 *     @zlib_data.setter
 *     def zlib_data(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 4
 *         if isinstance(value, bytes):
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Blob_9zlib_data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Blob_9zlib_data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_9zlib_data_2__set__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Blob_9zlib_data_2__set__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":90
 *     @zlib_data.setter
 *     def zlib_data(self, value):
 *         self.__field_bitmap0 |= 4             # <<<<<<<<<<<<<<
 *         if isinstance(value, bytes):
 *             self._zlib_data = value
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 4);

  /* "pyrosm_proto.pyx":91
 *     def zlib_data(self, value):
 *         self.__field_bitmap0 |= 4
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._zlib_data = value
 *         else:
 */
  __pyx_t_1 = PyBytes_Check(__pyx_v_value); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":92
 *         self.__field_bitmap0 |= 4
 *         if isinstance(value, bytes):
 *             self._zlib_data = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (value, type(value), bytes))
 */
    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, 92, __pyx_L1_error)
    __pyx_t_3 = __pyx_v_value;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_zlib_data);
    __Pyx_DECREF(__pyx_v_self->_zlib_data);
    __pyx_v_self->_zlib_data = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":91
 *     def zlib_data(self, value):
 *         self.__field_bitmap0 |= 4
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._zlib_data = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":94
 *             self._zlib_data = value
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (value, type(value), bytes))             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  /*else*/ {
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_3, 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_3, 1, ((PyObject *)Py_TYPE(__pyx_v_value)));
    __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)(&PyBytes_Type)));
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 94, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":95
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (value, type(value), bytes))
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":89
 * 
 *     @zlib_data.setter
 *     def zlib_data(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 4
 *         if isinstance(value, bytes):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyrosm_proto.Blob.zlib_data.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":98
 * 
 *     @property
 *     def lzma_data(self):             # <<<<<<<<<<<<<<
 *         return self._lzma_data
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_9lzma_data_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_9lzma_data_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_9lzma_data___get__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_9lzma_data___get__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":99
 *     @property
 *     def lzma_data(self):
 *         return self._lzma_data             # <<<<<<<<<<<<<<
 * 
 *     @lzma_data.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_lzma_data);
  __pyx_r = __pyx_v_self->_lzma_data;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":98
 * 
 *     @property
 *     def lzma_data(self):             # <<<<<<<<<<<<<<
 *         return self._lzma_data
 * 
 */

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

/* "pyrosm_proto.pyx":102
 * 
 *     @lzma_data.setter
 *     def lzma_data(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 8
 *         if isinstance(value, bytes):
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Blob_9lzma_data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Blob_9lzma_data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_9lzma_data_2__set__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Blob_9lzma_data_2__set__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":103
 *     @lzma_data.setter
 *     def lzma_data(self, value):
 *         self.__field_bitmap0 |= 8             # <<<<<<<<<<<<<<
 *         if isinstance(value, bytes):
 *             self._lzma_data = value
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 8);

  /* "pyrosm_proto.pyx":104
 *     def lzma_data(self, value):
 *         self.__field_bitmap0 |= 8
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._lzma_data = value
 *         else:
 */
  __pyx_t_1 = PyBytes_Check(__pyx_v_value); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":105
 *         self.__field_bitmap0 |= 8
 *         if isinstance(value, bytes):
 *             self._lzma_data = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (value, type(value), bytes))
 */
    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, 105, __pyx_L1_error)
    __pyx_t_3 = __pyx_v_value;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_lzma_data);
    __Pyx_DECREF(__pyx_v_self->_lzma_data);
    __pyx_v_self->_lzma_data = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":104
 *     def lzma_data(self, value):
 *         self.__field_bitmap0 |= 8
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._lzma_data = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":107
 *             self._lzma_data = value
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (value, type(value), bytes))             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  /*else*/ {
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_3, 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_3, 1, ((PyObject *)Py_TYPE(__pyx_v_value)));
    __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)(&PyBytes_Type)));
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 107, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":108
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (value, type(value), bytes))
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":102
 * 
 *     @lzma_data.setter
 *     def lzma_data(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 8
 *         if isinstance(value, bytes):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyrosm_proto.Blob.lzma_data.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":111
 * 
 *     @property
 *     def OBSOLETE_bzip2_data(self):             # <<<<<<<<<<<<<<
 *         warnings.warn("field 'OBSOLETE_bzip2_data' is deprecated", DeprecationWarning)
 *         return self._OBSOLETE_bzip2_data
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_19OBSOLETE_bzip2_data_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_19OBSOLETE_bzip2_data_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_19OBSOLETE_bzip2_data___get__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_19OBSOLETE_bzip2_data___get__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":112
 *     @property
 *     def OBSOLETE_bzip2_data(self):
 *         warnings.warn("field 'OBSOLETE_bzip2_data' is deprecated", DeprecationWarning)             # <<<<<<<<<<<<<<
 *         return self._OBSOLETE_bzip2_data
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __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;

  /* "pyrosm_proto.pyx":113
 *     def OBSOLETE_bzip2_data(self):
 *         warnings.warn("field 'OBSOLETE_bzip2_data' is deprecated", DeprecationWarning)
 *         return self._OBSOLETE_bzip2_data             # <<<<<<<<<<<<<<
 * 
 *     @OBSOLETE_bzip2_data.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_OBSOLETE_bzip2_data);
  __pyx_r = __pyx_v_self->_OBSOLETE_bzip2_data;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":111
 * 
 *     @property
 *     def OBSOLETE_bzip2_data(self):             # <<<<<<<<<<<<<<
 *         warnings.warn("field 'OBSOLETE_bzip2_data' is deprecated", DeprecationWarning)
 *         return self._OBSOLETE_bzip2_data
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.Blob.OBSOLETE_bzip2_data.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":116
 * 
 *     @OBSOLETE_bzip2_data.setter
 *     def OBSOLETE_bzip2_data(self, value):             # <<<<<<<<<<<<<<
 *         warnings.warn("field 'OBSOLETE_bzip2_data' is deprecated", DeprecationWarning)
 *         self.__field_bitmap0 |= 16
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Blob_19OBSOLETE_bzip2_data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Blob_19OBSOLETE_bzip2_data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_19OBSOLETE_bzip2_data_2__set__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Blob_19OBSOLETE_bzip2_data_2__set__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":117
 *     @OBSOLETE_bzip2_data.setter
 *     def OBSOLETE_bzip2_data(self, value):
 *         warnings.warn("field 'OBSOLETE_bzip2_data' is deprecated", DeprecationWarning)             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 16
 *         if isinstance(value, bytes):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __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;

  /* "pyrosm_proto.pyx":118
 *     def OBSOLETE_bzip2_data(self, value):
 *         warnings.warn("field 'OBSOLETE_bzip2_data' is deprecated", DeprecationWarning)
 *         self.__field_bitmap0 |= 16             # <<<<<<<<<<<<<<
 *         if isinstance(value, bytes):
 *             self._OBSOLETE_bzip2_data = value
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 16);

  /* "pyrosm_proto.pyx":119
 *         warnings.warn("field 'OBSOLETE_bzip2_data' is deprecated", DeprecationWarning)
 *         self.__field_bitmap0 |= 16
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._OBSOLETE_bzip2_data = value
 *         else:
 */
  __pyx_t_3 = PyBytes_Check(__pyx_v_value); 
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (likely(__pyx_t_4)) {

    /* "pyrosm_proto.pyx":120
 *         self.__field_bitmap0 |= 16
 *         if isinstance(value, bytes):
 *             self._OBSOLETE_bzip2_data = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (value, type(value), bytes))
 */
    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, 120, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_value;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_OBSOLETE_bzip2_data);
    __Pyx_DECREF(__pyx_v_self->_OBSOLETE_bzip2_data);
    __pyx_v_self->_OBSOLETE_bzip2_data = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":119
 *         warnings.warn("field 'OBSOLETE_bzip2_data' is deprecated", DeprecationWarning)
 *         self.__field_bitmap0 |= 16
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._OBSOLETE_bzip2_data = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":122
 *             self._OBSOLETE_bzip2_data = value
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (value, type(value), bytes))             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  /*else*/ {
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __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(((PyObject *)(&PyBytes_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
    PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)(&PyBytes_Type)));
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __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, 122, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":123
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (value, type(value), bytes))
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":116
 * 
 *     @OBSOLETE_bzip2_data.setter
 *     def OBSOLETE_bzip2_data(self, value):             # <<<<<<<<<<<<<<
 *         warnings.warn("field 'OBSOLETE_bzip2_data' is deprecated", DeprecationWarning)
 *         self.__field_bitmap0 |= 16
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.Blob.OBSOLETE_bzip2_data.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":126
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

static int __pyx_f_12pyrosm_proto_4Blob__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, CYTHON_UNUSED int __pyx_v_cache) {
  int __pyx_v_current_offset;
  int64_t __pyx_v_key;
  int64_t __pyx_v_field_size;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("_protobuf_deserialize", 0);

  /* "pyrosm_proto.pyx":127
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):
 *         cdef int current_offset = 0             # <<<<<<<<<<<<<<
 *         cdef int64_t key
 *         cdef int64_t field_size
 */
  __pyx_v_current_offset = 0;

  /* "pyrosm_proto.pyx":130
 *         cdef int64_t key
 *         cdef int64_t field_size
 *         while current_offset < size:             # <<<<<<<<<<<<<<
 *             key = get_varint64(memory, &current_offset)
 *             # raw
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_current_offset < __pyx_v_size) != 0);
    if (!__pyx_t_1) break;

    /* "pyrosm_proto.pyx":131
 *         cdef int64_t field_size
 *         while current_offset < size:
 *             key = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # raw
 *             if key == 10:
 */
    __pyx_v_key = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

    /* "pyrosm_proto.pyx":133
 *             key = get_varint64(memory, &current_offset)
 *             # raw
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 field_size = get_varint64(memory, &current_offset)
 */
    switch (__pyx_v_key) {
      case 10:

      /* "pyrosm_proto.pyx":134
 *             # raw
 *             if key == 10:
 *                 self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._raw = memory[current_offset:current_offset + field_size]
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

      /* "pyrosm_proto.pyx":135
 *             if key == 10:
 *                 self.__field_bitmap0 |= 1
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 self._raw = memory[current_offset:current_offset + field_size]
 *                 current_offset += <int>field_size
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":136
 *                 self.__field_bitmap0 |= 1
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._raw = memory[current_offset:current_offset + field_size]             # <<<<<<<<<<<<<<
 *                 current_offset += <int>field_size
 *             # raw_size
 */
      __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_self->_raw);
      __Pyx_DECREF(__pyx_v_self->_raw);
      __pyx_v_self->_raw = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":137
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._raw = memory[current_offset:current_offset + field_size]
 *                 current_offset += <int>field_size             # <<<<<<<<<<<<<<
 *             # raw_size
 *             elif key == 16:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((int)__pyx_v_field_size));

      /* "pyrosm_proto.pyx":133
 *             key = get_varint64(memory, &current_offset)
 *             # raw
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 field_size = get_varint64(memory, &current_offset)
 */
      break;
      case 16:

      /* "pyrosm_proto.pyx":140
 *             # raw_size
 *             elif key == 16:
 *                 self.__field_bitmap0 |= 2             # <<<<<<<<<<<<<<
 *                 self._raw_size = get_varint32(memory, &current_offset)
 *             # zlib_data
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 2);

      /* "pyrosm_proto.pyx":141
 *             elif key == 16:
 *                 self.__field_bitmap0 |= 2
 *                 self._raw_size = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # zlib_data
 *             elif key == 26:
 */
      __pyx_v_self->_raw_size = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":139
 *                 current_offset += <int>field_size
 *             # raw_size
 *             elif key == 16:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 2
 *                 self._raw_size = get_varint32(memory, &current_offset)
 */
      break;
      case 26:

      /* "pyrosm_proto.pyx":144
 *             # zlib_data
 *             elif key == 26:
 *                 self.__field_bitmap0 |= 4             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._zlib_data = memory[current_offset:current_offset + field_size]
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 4);

      /* "pyrosm_proto.pyx":145
 *             elif key == 26:
 *                 self.__field_bitmap0 |= 4
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 self._zlib_data = memory[current_offset:current_offset + field_size]
 *                 current_offset += <int>field_size
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":146
 *                 self.__field_bitmap0 |= 4
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._zlib_data = memory[current_offset:current_offset + field_size]             # <<<<<<<<<<<<<<
 *                 current_offset += <int>field_size
 *             # lzma_data
 */
      __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_self->_zlib_data);
      __Pyx_DECREF(__pyx_v_self->_zlib_data);
      __pyx_v_self->_zlib_data = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":147
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._zlib_data = memory[current_offset:current_offset + field_size]
 *                 current_offset += <int>field_size             # <<<<<<<<<<<<<<
 *             # lzma_data
 *             elif key == 34:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((int)__pyx_v_field_size));

      /* "pyrosm_proto.pyx":143
 *                 self._raw_size = get_varint32(memory, &current_offset)
 *             # zlib_data
 *             elif key == 26:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 4
 *                 field_size = get_varint64(memory, &current_offset)
 */
      break;
      case 34:

      /* "pyrosm_proto.pyx":150
 *             # lzma_data
 *             elif key == 34:
 *                 self.__field_bitmap0 |= 8             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._lzma_data = memory[current_offset:current_offset + field_size]
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 8);

      /* "pyrosm_proto.pyx":151
 *             elif key == 34:
 *                 self.__field_bitmap0 |= 8
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 self._lzma_data = memory[current_offset:current_offset + field_size]
 *                 current_offset += <int>field_size
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":152
 *                 self.__field_bitmap0 |= 8
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._lzma_data = memory[current_offset:current_offset + field_size]             # <<<<<<<<<<<<<<
 *                 current_offset += <int>field_size
 *             # OBSOLETE_bzip2_data
 */
      __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_self->_lzma_data);
      __Pyx_DECREF(__pyx_v_self->_lzma_data);
      __pyx_v_self->_lzma_data = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":153
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._lzma_data = memory[current_offset:current_offset + field_size]
 *                 current_offset += <int>field_size             # <<<<<<<<<<<<<<
 *             # OBSOLETE_bzip2_data
 *             elif key == 42:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((int)__pyx_v_field_size));

      /* "pyrosm_proto.pyx":149
 *                 current_offset += <int>field_size
 *             # lzma_data
 *             elif key == 34:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 8
 *                 field_size = get_varint64(memory, &current_offset)
 */
      break;
      case 42:

      /* "pyrosm_proto.pyx":156
 *             # OBSOLETE_bzip2_data
 *             elif key == 42:
 *                 self.__field_bitmap0 |= 16             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._OBSOLETE_bzip2_data = memory[current_offset:current_offset + field_size]
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 16);

      /* "pyrosm_proto.pyx":157
 *             elif key == 42:
 *                 self.__field_bitmap0 |= 16
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 self._OBSOLETE_bzip2_data = memory[current_offset:current_offset + field_size]
 *                 current_offset += <int>field_size
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":158
 *                 self.__field_bitmap0 |= 16
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._OBSOLETE_bzip2_data = memory[current_offset:current_offset + field_size]             # <<<<<<<<<<<<<<
 *                 current_offset += <int>field_size
 *             # Unknown field - need to skip proper number of bytes
 */
      __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_self->_OBSOLETE_bzip2_data);
      __Pyx_DECREF(__pyx_v_self->_OBSOLETE_bzip2_data);
      __pyx_v_self->_OBSOLETE_bzip2_data = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":159
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._OBSOLETE_bzip2_data = memory[current_offset:current_offset + field_size]
 *                 current_offset += <int>field_size             # <<<<<<<<<<<<<<
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((int)__pyx_v_field_size));

      /* "pyrosm_proto.pyx":155
 *                 current_offset += <int>field_size
 *             # OBSOLETE_bzip2_data
 *             elif key == 42:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 16
 *                 field_size = get_varint64(memory, &current_offset)
 */
      break;
      default:

      /* "pyrosm_proto.pyx":162
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)             # <<<<<<<<<<<<<<
 * 
 *         self._is_present_in_parent = True
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        if (unlikely(!(__pyx_f_12pyrobuf_util_skip_generic(__pyx_v_memory, (&__pyx_v_current_offset), __pyx_v_size, (__pyx_v_key & 0x7)) != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 162, __pyx_L1_error)
        }
      }
      #endif
      break;
    }
  }

  /* "pyrosm_proto.pyx":164
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)
 * 
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 * 
 *         return current_offset
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":166
 *         self._is_present_in_parent = True
 * 
 *         return current_offset             # <<<<<<<<<<<<<<
 * 
 *     cpdef void Clear(self):
 */
  __pyx_r = __pyx_v_current_offset;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":126
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("pyrosm_proto.Blob._protobuf_deserialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":168
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Blob_9Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_4Blob_Clear(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Blob_9Clear)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":170
 *     cpdef void Clear(self):
 *         """Clears all data that was set in the message."""
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":171
 *         """Clears all data that was set in the message."""
 *         self.reset()
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void ClearField(self, field_name):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":168
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Blob.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_9Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_8Clear[] = "Clears all data that was set in the message.";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_9Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Clear (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_8Clear(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_8Clear(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Blob_Clear(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __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("pyrosm_proto.Blob.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":173
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'raw':
 */

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

  /* "pyrosm_proto.pyx":175
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'raw':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._raw = b""
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_raw, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 175, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":176
 *         """Clears the contents of a given field."""
 *         if field_name == 'raw':
 *             self.__field_bitmap0 &= ~1             # <<<<<<<<<<<<<<
 *             self._raw = b""
 *         elif field_name == 'raw_size':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~1));

    /* "pyrosm_proto.pyx":177
 *         if field_name == 'raw':
 *             self.__field_bitmap0 &= ~1
 *             self._raw = b""             # <<<<<<<<<<<<<<
 *         elif field_name == 'raw_size':
 *             self.__field_bitmap0 &= ~2
 */
    __Pyx_INCREF(__pyx_kp_b__3);
    __Pyx_GIVEREF(__pyx_kp_b__3);
    __Pyx_GOTREF(__pyx_v_self->_raw);
    __Pyx_DECREF(__pyx_v_self->_raw);
    __pyx_v_self->_raw = __pyx_kp_b__3;

    /* "pyrosm_proto.pyx":175
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'raw':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._raw = b""
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":178
 *             self.__field_bitmap0 &= ~1
 *             self._raw = b""
 *         elif field_name == 'raw_size':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~2
 *             self._raw_size = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_raw_size, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 178, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":179
 *             self._raw = b""
 *         elif field_name == 'raw_size':
 *             self.__field_bitmap0 &= ~2             # <<<<<<<<<<<<<<
 *             self._raw_size = 0
 *         elif field_name == 'zlib_data':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~2));

    /* "pyrosm_proto.pyx":180
 *         elif field_name == 'raw_size':
 *             self.__field_bitmap0 &= ~2
 *             self._raw_size = 0             # <<<<<<<<<<<<<<
 *         elif field_name == 'zlib_data':
 *             self.__field_bitmap0 &= ~4
 */
    __pyx_v_self->_raw_size = 0;

    /* "pyrosm_proto.pyx":178
 *             self.__field_bitmap0 &= ~1
 *             self._raw = b""
 *         elif field_name == 'raw_size':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~2
 *             self._raw_size = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":181
 *             self.__field_bitmap0 &= ~2
 *             self._raw_size = 0
 *         elif field_name == 'zlib_data':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~4
 *             self._zlib_data = b""
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_zlib_data, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 181, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":182
 *             self._raw_size = 0
 *         elif field_name == 'zlib_data':
 *             self.__field_bitmap0 &= ~4             # <<<<<<<<<<<<<<
 *             self._zlib_data = b""
 *         elif field_name == 'lzma_data':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~4));

    /* "pyrosm_proto.pyx":183
 *         elif field_name == 'zlib_data':
 *             self.__field_bitmap0 &= ~4
 *             self._zlib_data = b""             # <<<<<<<<<<<<<<
 *         elif field_name == 'lzma_data':
 *             self.__field_bitmap0 &= ~8
 */
    __Pyx_INCREF(__pyx_kp_b__3);
    __Pyx_GIVEREF(__pyx_kp_b__3);
    __Pyx_GOTREF(__pyx_v_self->_zlib_data);
    __Pyx_DECREF(__pyx_v_self->_zlib_data);
    __pyx_v_self->_zlib_data = __pyx_kp_b__3;

    /* "pyrosm_proto.pyx":181
 *             self.__field_bitmap0 &= ~2
 *             self._raw_size = 0
 *         elif field_name == 'zlib_data':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~4
 *             self._zlib_data = b""
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":184
 *             self.__field_bitmap0 &= ~4
 *             self._zlib_data = b""
 *         elif field_name == 'lzma_data':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~8
 *             self._lzma_data = b""
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_lzma_data, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 184, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":185
 *             self._zlib_data = b""
 *         elif field_name == 'lzma_data':
 *             self.__field_bitmap0 &= ~8             # <<<<<<<<<<<<<<
 *             self._lzma_data = b""
 *         elif field_name == 'OBSOLETE_bzip2_data':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~8));

    /* "pyrosm_proto.pyx":186
 *         elif field_name == 'lzma_data':
 *             self.__field_bitmap0 &= ~8
 *             self._lzma_data = b""             # <<<<<<<<<<<<<<
 *         elif field_name == 'OBSOLETE_bzip2_data':
 *             self.__field_bitmap0 &= ~16
 */
    __Pyx_INCREF(__pyx_kp_b__3);
    __Pyx_GIVEREF(__pyx_kp_b__3);
    __Pyx_GOTREF(__pyx_v_self->_lzma_data);
    __Pyx_DECREF(__pyx_v_self->_lzma_data);
    __pyx_v_self->_lzma_data = __pyx_kp_b__3;

    /* "pyrosm_proto.pyx":184
 *             self.__field_bitmap0 &= ~4
 *             self._zlib_data = b""
 *         elif field_name == 'lzma_data':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~8
 *             self._lzma_data = b""
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":187
 *             self.__field_bitmap0 &= ~8
 *             self._lzma_data = b""
 *         elif field_name == 'OBSOLETE_bzip2_data':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~16
 *             self._OBSOLETE_bzip2_data = b""
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_OBSOLETE_bzip2_data, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 187, __pyx_L1_error)
  if (likely(__pyx_t_5)) {

    /* "pyrosm_proto.pyx":188
 *             self._lzma_data = b""
 *         elif field_name == 'OBSOLETE_bzip2_data':
 *             self.__field_bitmap0 &= ~16             # <<<<<<<<<<<<<<
 *             self._OBSOLETE_bzip2_data = b""
 *         else:
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~16));

    /* "pyrosm_proto.pyx":189
 *         elif field_name == 'OBSOLETE_bzip2_data':
 *             self.__field_bitmap0 &= ~16
 *             self._OBSOLETE_bzip2_data = b""             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 */
    __Pyx_INCREF(__pyx_kp_b__3);
    __Pyx_GIVEREF(__pyx_kp_b__3);
    __Pyx_GOTREF(__pyx_v_self->_OBSOLETE_bzip2_data);
    __Pyx_DECREF(__pyx_v_self->_OBSOLETE_bzip2_data);
    __pyx_v_self->_OBSOLETE_bzip2_data = __pyx_kp_b__3;

    /* "pyrosm_proto.pyx":187
 *             self.__field_bitmap0 &= ~8
 *             self._lzma_data = b""
 *         elif field_name == 'OBSOLETE_bzip2_data':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~16
 *             self._OBSOLETE_bzip2_data = b""
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":191
 *             self._OBSOLETE_bzip2_data = b""
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 191, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":193
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void CopyFrom(self, Blob other_msg):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":173
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'raw':
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Blob.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_11ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_10ClearField[] = "Clears the contents of a given field.";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_11ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ClearField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_10ClearField(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_10ClearField(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ClearField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Blob_ClearField(__pyx_v_self, __pyx_v_field_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Blob.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":195
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, Blob other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Blob_13CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_4Blob_CopyFrom(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CopyFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Blob_13CopyFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":202
 *             other_msg (Blob): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":203
 *         """
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 *         self.reset()
 *         self.MergeFrom(other_msg)
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":202
 *             other_msg (Blob): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  }

  /* "pyrosm_proto.pyx":204
 *         if self is other_msg:
 *             return
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self.MergeFrom(other_msg)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":205
 *             return
 *         self.reset()
 *         self.MergeFrom(other_msg)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint HasField(self, field_name) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->MergeFrom(__pyx_v_self, __pyx_v_other_msg, 0);

  /* "pyrosm_proto.pyx":195
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, Blob other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Blob.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_13CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_12CopyFrom[] = "\n        Copies the content of the specified message into the current message.\n\n        Params:\n            other_msg (Blob): Message to copy into the current one.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_13CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CopyFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_Blob, 1, "other_msg", 0))) __PYX_ERR(0, 195, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_12CopyFrom(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_12CopyFrom(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Blob_CopyFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __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("pyrosm_proto.Blob.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":207
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Blob_15HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static int __pyx_f_12pyrosm_proto_4Blob_HasField(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("HasField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_HasField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Blob_15HasField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 207, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":214
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'raw':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'raw_size':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_raw, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 214, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":215
 *         """
 *         if field_name == 'raw':
 *             return self.__field_bitmap0 & 1 == 1             # <<<<<<<<<<<<<<
 *         if field_name == 'raw_size':
 *             return self.__field_bitmap0 & 2 == 2
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":214
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'raw':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'raw_size':
 */
  }

  /* "pyrosm_proto.pyx":216
 *         if field_name == 'raw':
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'raw_size':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'zlib_data':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_raw_size, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 216, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":217
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'raw_size':
 *             return self.__field_bitmap0 & 2 == 2             # <<<<<<<<<<<<<<
 *         if field_name == 'zlib_data':
 *             return self.__field_bitmap0 & 4 == 4
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":216
 *         if field_name == 'raw':
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'raw_size':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'zlib_data':
 */
  }

  /* "pyrosm_proto.pyx":218
 *         if field_name == 'raw_size':
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'zlib_data':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 4 == 4
 *         if field_name == 'lzma_data':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_zlib_data, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 218, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":219
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'zlib_data':
 *             return self.__field_bitmap0 & 4 == 4             # <<<<<<<<<<<<<<
 *         if field_name == 'lzma_data':
 *             return self.__field_bitmap0 & 8 == 8
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":218
 *         if field_name == 'raw_size':
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'zlib_data':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 4 == 4
 *         if field_name == 'lzma_data':
 */
  }

  /* "pyrosm_proto.pyx":220
 *         if field_name == 'zlib_data':
 *             return self.__field_bitmap0 & 4 == 4
 *         if field_name == 'lzma_data':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 8 == 8
 *         if field_name == 'OBSOLETE_bzip2_data':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_lzma_data, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 220, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":221
 *             return self.__field_bitmap0 & 4 == 4
 *         if field_name == 'lzma_data':
 *             return self.__field_bitmap0 & 8 == 8             # <<<<<<<<<<<<<<
 *         if field_name == 'OBSOLETE_bzip2_data':
 *             return self.__field_bitmap0 & 16 == 16
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 8) == 8);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":220
 *         if field_name == 'zlib_data':
 *             return self.__field_bitmap0 & 4 == 4
 *         if field_name == 'lzma_data':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 8 == 8
 *         if field_name == 'OBSOLETE_bzip2_data':
 */
  }

  /* "pyrosm_proto.pyx":222
 *         if field_name == 'lzma_data':
 *             return self.__field_bitmap0 & 8 == 8
 *         if field_name == 'OBSOLETE_bzip2_data':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 16 == 16
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_OBSOLETE_bzip2_data, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 222, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":223
 *             return self.__field_bitmap0 & 8 == 8
 *         if field_name == 'OBSOLETE_bzip2_data':
 *             return self.__field_bitmap0 & 16 == 16             # <<<<<<<<<<<<<<
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 16) == 16);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":222
 *         if field_name == 'lzma_data':
 *             return self.__field_bitmap0 & 8 == 8
 *         if field_name == 'OBSOLETE_bzip2_data':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 16 == 16
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  }

  /* "pyrosm_proto.pyx":224
 *         if field_name == 'OBSOLETE_bzip2_data':
 *             return self.__field_bitmap0 & 16 == 16
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint IsInitialized(self):
 */
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_singular, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 224, __pyx_L1_error)

  /* "pyrosm_proto.pyx":207
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

  /* 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("pyrosm_proto.Blob.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_15HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_14HasField[] = "\n        Checks if a certain field is set for the message.\n\n        Params:\n            field_name (str): The name of the field to check.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_15HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_14HasField(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_14HasField(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("HasField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_4Blob_HasField(__pyx_v_self, __pyx_v_field_name, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 207, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.Blob.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":226
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Blob_17IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_12pyrosm_proto_4Blob_IsInitialized(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_IsInitialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Blob_17IsInitialized)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 226, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":237
 * 
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef void MergeFrom(self, Blob other_msg):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":226
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

  /* 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_WriteUnraisable("pyrosm_proto.Blob.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_17IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_16IsInitialized[] = "\n        Checks if the message is initialized.\n\n        Returns:\n            bool: True if the message is initialized (i.e. all of its required\n                fields are set).\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_17IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsInitialized (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_16IsInitialized(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_16IsInitialized(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_12pyrosm_proto_4Blob_IsInitialized(__pyx_v_self, 1)); 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;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Blob.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":239
 *         return True
 * 
 *     cpdef void MergeFrom(self, Blob other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Blob_19MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_4Blob_MergeFrom(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int32_t __pyx_t_7;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Blob_19MergeFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":247
 *         """
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":248
 * 
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":247
 *         """
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "pyrosm_proto.pyx":251
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._raw = other_msg._raw
 *             self.__field_bitmap0 |= 1
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":252
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._raw = other_msg._raw             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:
 */
    __pyx_t_1 = __pyx_v_other_msg->_raw;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_raw);
    __Pyx_DECREF(__pyx_v_self->_raw);
    __pyx_v_self->_raw = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":253
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._raw = other_msg._raw
 *             self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 2 == 2:
 *             self._raw_size = other_msg._raw_size
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

    /* "pyrosm_proto.pyx":251
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._raw = other_msg._raw
 *             self.__field_bitmap0 |= 1
 */
  }

  /* "pyrosm_proto.pyx":254
 *             self._raw = other_msg._raw
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             self._raw_size = other_msg._raw_size
 *             self.__field_bitmap0 |= 2
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":255
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:
 *             self._raw_size = other_msg._raw_size             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:
 */
    __pyx_t_7 = __pyx_v_other_msg->_raw_size;
    __pyx_v_self->_raw_size = __pyx_t_7;

    /* "pyrosm_proto.pyx":256
 *         if other_msg.__field_bitmap0 & 2 == 2:
 *             self._raw_size = other_msg._raw_size
 *             self.__field_bitmap0 |= 2             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 4 == 4:
 *             self._zlib_data = other_msg._zlib_data
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 2);

    /* "pyrosm_proto.pyx":254
 *             self._raw = other_msg._raw
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             self._raw_size = other_msg._raw_size
 *             self.__field_bitmap0 |= 2
 */
  }

  /* "pyrosm_proto.pyx":257
 *             self._raw_size = other_msg._raw_size
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             self._zlib_data = other_msg._zlib_data
 *             self.__field_bitmap0 |= 4
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":258
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:
 *             self._zlib_data = other_msg._zlib_data             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 4
 *         if other_msg.__field_bitmap0 & 8 == 8:
 */
    __pyx_t_1 = __pyx_v_other_msg->_zlib_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_zlib_data);
    __Pyx_DECREF(__pyx_v_self->_zlib_data);
    __pyx_v_self->_zlib_data = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":259
 *         if other_msg.__field_bitmap0 & 4 == 4:
 *             self._zlib_data = other_msg._zlib_data
 *             self.__field_bitmap0 |= 4             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 8 == 8:
 *             self._lzma_data = other_msg._lzma_data
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 4);

    /* "pyrosm_proto.pyx":257
 *             self._raw_size = other_msg._raw_size
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             self._zlib_data = other_msg._zlib_data
 *             self.__field_bitmap0 |= 4
 */
  }

  /* "pyrosm_proto.pyx":260
 *             self._zlib_data = other_msg._zlib_data
 *             self.__field_bitmap0 |= 4
 *         if other_msg.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             self._lzma_data = other_msg._lzma_data
 *             self.__field_bitmap0 |= 8
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 8) == 8) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":261
 *             self.__field_bitmap0 |= 4
 *         if other_msg.__field_bitmap0 & 8 == 8:
 *             self._lzma_data = other_msg._lzma_data             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 8
 *         if other_msg.__field_bitmap0 & 16 == 16:
 */
    __pyx_t_1 = __pyx_v_other_msg->_lzma_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_lzma_data);
    __Pyx_DECREF(__pyx_v_self->_lzma_data);
    __pyx_v_self->_lzma_data = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":262
 *         if other_msg.__field_bitmap0 & 8 == 8:
 *             self._lzma_data = other_msg._lzma_data
 *             self.__field_bitmap0 |= 8             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 16 == 16:
 *             self._OBSOLETE_bzip2_data = other_msg._OBSOLETE_bzip2_data
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 8);

    /* "pyrosm_proto.pyx":260
 *             self._zlib_data = other_msg._zlib_data
 *             self.__field_bitmap0 |= 4
 *         if other_msg.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             self._lzma_data = other_msg._lzma_data
 *             self.__field_bitmap0 |= 8
 */
  }

  /* "pyrosm_proto.pyx":263
 *             self._lzma_data = other_msg._lzma_data
 *             self.__field_bitmap0 |= 8
 *         if other_msg.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             self._OBSOLETE_bzip2_data = other_msg._OBSOLETE_bzip2_data
 *             self.__field_bitmap0 |= 16
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 16) == 16) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":264
 *             self.__field_bitmap0 |= 8
 *         if other_msg.__field_bitmap0 & 16 == 16:
 *             self._OBSOLETE_bzip2_data = other_msg._OBSOLETE_bzip2_data             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 16
 * 
 */
    __pyx_t_1 = __pyx_v_other_msg->_OBSOLETE_bzip2_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_OBSOLETE_bzip2_data);
    __Pyx_DECREF(__pyx_v_self->_OBSOLETE_bzip2_data);
    __pyx_v_self->_OBSOLETE_bzip2_data = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":265
 *         if other_msg.__field_bitmap0 & 16 == 16:
 *             self._OBSOLETE_bzip2_data = other_msg._OBSOLETE_bzip2_data
 *             self.__field_bitmap0 |= 16             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 16);

    /* "pyrosm_proto.pyx":263
 *             self._lzma_data = other_msg._lzma_data
 *             self.__field_bitmap0 |= 8
 *         if other_msg.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             self._OBSOLETE_bzip2_data = other_msg._OBSOLETE_bzip2_data
 *             self.__field_bitmap0 |= 16
 */
  }

  /* "pyrosm_proto.pyx":267
 *             self.__field_bitmap0 |= 16
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":239
 *         return True
 * 
 *     cpdef void MergeFrom(self, Blob other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Blob.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_19MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_18MergeFrom[] = "\n        Merges the contents of the specified message into the current message.\n\n        Params:\n            other_msg: Message to merge into the current message.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_19MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_Blob, 1, "other_msg", 0))) __PYX_ERR(0, 239, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_18MergeFrom(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_18MergeFrom(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Blob_MergeFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Blob.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":269
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Blob_21MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_4Blob_MergeFromString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Blob_MergeFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  unsigned char const *__pyx_t_10;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Blob_21MergeFromString)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 269, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":283
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, False)
 */
  __pyx_t_7 = (__pyx_v_size != Py_None);
  if ((__pyx_t_7 != 0)) {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 283, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_8;
  } else {
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 283, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_9;
  }
  __pyx_v_length = __pyx_t_5;

  /* "pyrosm_proto.pyx":285
 *         length = size if size is not None else len(data)
 * 
 *         buf = self._protobuf_deserialize(data, length, False)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_10 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 285, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_10, __pyx_v_length, 0);

  /* "pyrosm_proto.pyx":287
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  __pyx_t_7 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "pyrosm_proto.pyx":288
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_GIVEREF(__pyx_v_size);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_size);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Truncated_message_got_s_expected, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __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, 288, __pyx_L1_error)

    /* "pyrosm_proto.pyx":287
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  }

  /* "pyrosm_proto.pyx":290
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":292
 *         self._Modified()
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":269
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.Blob.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_21MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_20MergeFromString[] = "\n        Merges serialized protocol buffer data into this message.\n\n        Params:\n            data (bytes): a string of binary data.\n            size (int): optional - the length of the data string\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_21MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "MergeFromString") < 0)) __PYX_ERR(0, 269, __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_data = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MergeFromString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 269, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_20MergeFromString(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), __pyx_v_data, __pyx_v_size);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_20MergeFromString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_4Blob_MergeFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_Blob->MergeFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 269, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Blob.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":294
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Blob_23ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_4Blob_ParseFromString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Blob_ParseFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_reset = ((int)1);
  int __pyx_v_cache = ((int)0);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  unsigned char const *__pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_reset = __pyx_optional_args->reset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cache = __pyx_optional_args->cache;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Blob_23ParseFromString)) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 294, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 294, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __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(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 294, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_size);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 3+__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, 294, __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, 294, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":310
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         if reset:
 */
  __pyx_t_9 = (__pyx_v_size != Py_None);
  if ((__pyx_t_9 != 0)) {
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 310, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 310, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_11;
  }
  __pyx_v_length = __pyx_t_7;

  /* "pyrosm_proto.pyx":312
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_9 = (__pyx_v_reset != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":313
 * 
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":312
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":315
 *             self.reset()
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_12 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 315, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_12, __pyx_v_length, __pyx_v_cache);

  /* "pyrosm_proto.pyx":317
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  __pyx_t_9 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "pyrosm_proto.pyx":318
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message")             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s_Truncated_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Truncated_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __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, 318, __pyx_L1_error)

    /* "pyrosm_proto.pyx":317
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  }

  /* "pyrosm_proto.pyx":320
 *             raise DecodeError("Truncated message")
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":322
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  __pyx_t_9 = (__pyx_v_cache != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":323
 * 
 *         if cache:
 *             self._cached_serialization = data             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) __PYX_ERR(0, 323, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":322
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  }

  /* "pyrosm_proto.pyx":325
 *             self._cached_serialization = data
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":294
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.Blob.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_23ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_22ParseFromString[] = "\n        Populate the message class from a string of protobuf encoded binary data.\n\n        Params:\n            data (bytes): a string of binary data\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n            cache (bool): optional - whether to cache serialized data\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_23ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_v_reset;
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,&__pyx_n_s_cache,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromString") < 0)) __PYX_ERR(0, 294, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    if (values[2]) {
      __pyx_v_reset = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 294, __pyx_L3_error)
    } else {
      __pyx_v_reset = ((int)1);
    }
    if (values[3]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 294, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromString", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 294, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_22ParseFromString(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset, __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_22ParseFromString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_4Blob_ParseFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.reset = __pyx_v_reset;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_Blob->ParseFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 294, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Blob.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":328
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_25FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_25FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FromString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_24FromString(((PyTypeObject*)__pyx_v_cls), ((PyObject *)__pyx_v_s));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_24FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("FromString", 0);

  /* "pyrosm_proto.pyx":329
 *     @classmethod
 *     def FromString(cls, s):
 *         message = cls()             # <<<<<<<<<<<<<<
 *         message.MergeFromString(s)
 *         return message
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":330
 *     def FromString(cls, s):
 *         message = cls()
 *         message.MergeFromString(s)             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":331
 *         message = cls()
 *         message.MergeFromString(s)
 *         return message             # <<<<<<<<<<<<<<
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":328
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Blob.FromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":333
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         # raw
 *         if self.__field_bitmap0 & 1 == 1:
 */

static void __pyx_f_12pyrosm_proto_4Blob__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_buf, CYTHON_UNUSED int __pyx_v_cache) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  __Pyx_RefNannySetupContext("_protobuf_serialize", 0);
  __Pyx_INCREF(__pyx_v_buf);

  /* "pyrosm_proto.pyx":335
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 *         # raw
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             set_varint64(len(self._raw), buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":336
 *         # raw
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(10, buf)             # <<<<<<<<<<<<<<
 *             set_varint64(len(self._raw), buf)
 *             buf += self._raw
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(10, __pyx_v_buf));

    /* "pyrosm_proto.pyx":337
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(10, buf)
 *             set_varint64(len(self._raw), buf)             # <<<<<<<<<<<<<<
 *             buf += self._raw
 *         # raw_size
 */
    __pyx_t_2 = __pyx_v_self->_raw;
    __Pyx_INCREF(__pyx_t_2);
    if (unlikely(__pyx_t_2 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 337, __pyx_L1_error)
    }
    __pyx_t_3 = PyBytes_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 337, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

    /* "pyrosm_proto.pyx":338
 *             set_varint64(10, buf)
 *             set_varint64(len(self._raw), buf)
 *             buf += self._raw             # <<<<<<<<<<<<<<
 *         # raw_size
 *         if self.__field_bitmap0 & 2 == 2:
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_self->_raw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":335
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 *         # raw
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             set_varint64(len(self._raw), buf)
 */
  }

  /* "pyrosm_proto.pyx":340
 *             buf += self._raw
 *         # raw_size
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             set_varint64(16, buf)
 *             set_varint32(self._raw_size, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":341
 *         # raw_size
 *         if self.__field_bitmap0 & 2 == 2:
 *             set_varint64(16, buf)             # <<<<<<<<<<<<<<
 *             set_varint32(self._raw_size, buf)
 *         # zlib_data
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(16, __pyx_v_buf));

    /* "pyrosm_proto.pyx":342
 *         if self.__field_bitmap0 & 2 == 2:
 *             set_varint64(16, buf)
 *             set_varint32(self._raw_size, buf)             # <<<<<<<<<<<<<<
 *         # zlib_data
 *         if self.__field_bitmap0 & 4 == 4:
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_self->_raw_size, __pyx_v_buf));

    /* "pyrosm_proto.pyx":340
 *             buf += self._raw
 *         # raw_size
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             set_varint64(16, buf)
 *             set_varint32(self._raw_size, buf)
 */
  }

  /* "pyrosm_proto.pyx":344
 *             set_varint32(self._raw_size, buf)
 *         # zlib_data
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             set_varint64(26, buf)
 *             set_varint64(len(self._zlib_data), buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":345
 *         # zlib_data
 *         if self.__field_bitmap0 & 4 == 4:
 *             set_varint64(26, buf)             # <<<<<<<<<<<<<<
 *             set_varint64(len(self._zlib_data), buf)
 *             buf += self._zlib_data
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(26, __pyx_v_buf));

    /* "pyrosm_proto.pyx":346
 *         if self.__field_bitmap0 & 4 == 4:
 *             set_varint64(26, buf)
 *             set_varint64(len(self._zlib_data), buf)             # <<<<<<<<<<<<<<
 *             buf += self._zlib_data
 *         # lzma_data
 */
    __pyx_t_2 = __pyx_v_self->_zlib_data;
    __Pyx_INCREF(__pyx_t_2);
    if (unlikely(__pyx_t_2 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 346, __pyx_L1_error)
    }
    __pyx_t_3 = PyBytes_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 346, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

    /* "pyrosm_proto.pyx":347
 *             set_varint64(26, buf)
 *             set_varint64(len(self._zlib_data), buf)
 *             buf += self._zlib_data             # <<<<<<<<<<<<<<
 *         # lzma_data
 *         if self.__field_bitmap0 & 8 == 8:
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_self->_zlib_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":344
 *             set_varint32(self._raw_size, buf)
 *         # zlib_data
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             set_varint64(26, buf)
 *             set_varint64(len(self._zlib_data), buf)
 */
  }

  /* "pyrosm_proto.pyx":349
 *             buf += self._zlib_data
 *         # lzma_data
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             set_varint64(34, buf)
 *             set_varint64(len(self._lzma_data), buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 8) == 8) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":350
 *         # lzma_data
 *         if self.__field_bitmap0 & 8 == 8:
 *             set_varint64(34, buf)             # <<<<<<<<<<<<<<
 *             set_varint64(len(self._lzma_data), buf)
 *             buf += self._lzma_data
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(34, __pyx_v_buf));

    /* "pyrosm_proto.pyx":351
 *         if self.__field_bitmap0 & 8 == 8:
 *             set_varint64(34, buf)
 *             set_varint64(len(self._lzma_data), buf)             # <<<<<<<<<<<<<<
 *             buf += self._lzma_data
 *         # OBSOLETE_bzip2_data
 */
    __pyx_t_2 = __pyx_v_self->_lzma_data;
    __Pyx_INCREF(__pyx_t_2);
    if (unlikely(__pyx_t_2 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 351, __pyx_L1_error)
    }
    __pyx_t_3 = PyBytes_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 351, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

    /* "pyrosm_proto.pyx":352
 *             set_varint64(34, buf)
 *             set_varint64(len(self._lzma_data), buf)
 *             buf += self._lzma_data             # <<<<<<<<<<<<<<
 *         # OBSOLETE_bzip2_data
 *         if self.__field_bitmap0 & 16 == 16:
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_self->_lzma_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":349
 *             buf += self._zlib_data
 *         # lzma_data
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             set_varint64(34, buf)
 *             set_varint64(len(self._lzma_data), buf)
 */
  }

  /* "pyrosm_proto.pyx":354
 *             buf += self._lzma_data
 *         # OBSOLETE_bzip2_data
 *         if self.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             set_varint64(42, buf)
 *             set_varint64(len(self._OBSOLETE_bzip2_data), buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 16) == 16) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":355
 *         # OBSOLETE_bzip2_data
 *         if self.__field_bitmap0 & 16 == 16:
 *             set_varint64(42, buf)             # <<<<<<<<<<<<<<
 *             set_varint64(len(self._OBSOLETE_bzip2_data), buf)
 *             buf += self._OBSOLETE_bzip2_data
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(42, __pyx_v_buf));

    /* "pyrosm_proto.pyx":356
 *         if self.__field_bitmap0 & 16 == 16:
 *             set_varint64(42, buf)
 *             set_varint64(len(self._OBSOLETE_bzip2_data), buf)             # <<<<<<<<<<<<<<
 *             buf += self._OBSOLETE_bzip2_data
 * 
 */
    __pyx_t_2 = __pyx_v_self->_OBSOLETE_bzip2_data;
    __Pyx_INCREF(__pyx_t_2);
    if (unlikely(__pyx_t_2 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 356, __pyx_L1_error)
    }
    __pyx_t_3 = PyBytes_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 356, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

    /* "pyrosm_proto.pyx":357
 *             set_varint64(42, buf)
 *             set_varint64(len(self._OBSOLETE_bzip2_data), buf)
 *             buf += self._OBSOLETE_bzip2_data             # <<<<<<<<<<<<<<
 * 
 *     cpdef void _Modified(self):
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_self->_OBSOLETE_bzip2_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":354
 *             buf += self._lzma_data
 *         # OBSOLETE_bzip2_data
 *         if self.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             set_varint64(42, buf)
 *             set_varint64(len(self._OBSOLETE_bzip2_data), buf)
 */
  }

  /* "pyrosm_proto.pyx":333
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         # raw
 *         if self.__field_bitmap0 & 1 == 1:
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("pyrosm_proto.Blob._protobuf_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_RefNannyFinishContext();
}

/* "pyrosm_proto.pyx":359
 *             buf += self._OBSOLETE_bzip2_data
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Blob_27_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_4Blob__Modified(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Modified); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Blob_27_Modified)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":360
 * 
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":361
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()             # <<<<<<<<<<<<<<
 *         self._cached_serialization = None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_listener), __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __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;

  /* "pyrosm_proto.pyx":362
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
  __Pyx_DECREF(__pyx_v_self->_cached_serialization);
  __pyx_v_self->_cached_serialization = ((PyObject*)Py_None);

  /* "pyrosm_proto.pyx":359
 *             buf += self._OBSOLETE_bzip2_data
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Blob._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_27_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_27_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_Modified (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_26_Modified(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_26_Modified(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Blob__Modified(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __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("pyrosm_proto.Blob._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":364
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Blob_29SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_4Blob_SerializeToString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Blob_SerializeToString *__pyx_optional_args) {
  int __pyx_v_cache = ((int)0);
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_out = 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;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cache = __pyx_optional_args->cache;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Blob_29SerializeToString)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 364, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":374
 * 
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_6 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":375
 * 
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":374
 * 
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":377
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":378
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)             # <<<<<<<<<<<<<<
 *         cdef bytes out = bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, __pyx_v_cache);

  /* "pyrosm_proto.pyx":379
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":381
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  __pyx_t_7 = (__pyx_v_cache != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":382
 * 
 *         if cache:
 *             self._cached_serialization = out             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = __pyx_v_out;

    /* "pyrosm_proto.pyx":381
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  }

  /* "pyrosm_proto.pyx":384
 *             self._cached_serialization = out
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializePartialToString(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":364
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.Blob.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_29SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_28SerializeToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_29SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cache,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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SerializeToString") < 0)) __PYX_ERR(0, 364, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 364, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("SerializeToString", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 364, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_28SerializeToString(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_28SerializeToString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_12pyrosm_proto_4Blob_SerializeToString __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_Blob->SerializeToString(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Blob.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":386
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Blob_31SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_4Blob_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_buf = 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;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Blob_31SerializePartialToString)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 386, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":393
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_5 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":394
 *         """
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":393
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":396
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":397
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)             # <<<<<<<<<<<<<<
 *         return bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, 0);

  /* "pyrosm_proto.pyx":398
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *     def SetInParent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":386
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.Blob.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_31SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_30SerializePartialToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_31SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_30SerializePartialToString(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_30SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_4Blob_SerializePartialToString(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __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("pyrosm_proto.Blob.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":400
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_33SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_32SetInParent[] = "\n        Mark this an present in the parent.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_33SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_32SetInParent(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_32SetInParent(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent", 0);

  /* "pyrosm_proto.pyx":404
 *         Mark this an present in the parent.
 *         """
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":400
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":406
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_35ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_34ParseFromJson[] = "\n        Populate the message class from a json string.\n\n        Params:\n            data (str): a json string\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_35ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromJson (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromJson") < 0)) __PYX_ERR(0, 406, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    __pyx_v_reset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromJson", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 406, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_34ParseFromJson(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_34ParseFromJson(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("ParseFromJson", 0);
  __Pyx_INCREF(__pyx_v_size);

  /* "pyrosm_proto.pyx":415
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":416
 *         """
 *         if size is None:
 *             size = len(data)             # <<<<<<<<<<<<<<
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 416, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":415
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  }

  /* "pyrosm_proto.pyx":417
 *         if size is None:
 *             size = len(data)
 *         d = json.loads(data[:size])             # <<<<<<<<<<<<<<
 *         self.ParseFromDict(d, reset)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_json); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_d = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":418
 *             size = len(data)
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToJson(self, **kwargs):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 418, __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_d);
    __Pyx_GIVEREF(__pyx_v_d);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_d);
    __Pyx_INCREF(__pyx_v_reset);
    __Pyx_GIVEREF(__pyx_v_reset);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_reset);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":406
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrosm_proto.Blob.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":420
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_37SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_36SerializeToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_37SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializeToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializeToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_36SerializeToJson(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_36SerializeToJson(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializeToJson", 0);

  /* "pyrosm_proto.pyx":427
 *             str: a json formatted string
 *         """
 *         d = self.SerializeToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":428
 *         """
 *         d = self.SerializeToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToJson(self, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":420
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Blob.SerializeToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":430
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_39SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_38SerializePartialToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_39SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializePartialToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializePartialToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_38SerializePartialToJson(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_38SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToJson", 0);

  /* "pyrosm_proto.pyx":437
 *             str: a json formatted string
 *         """
 *         d = self.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":438
 *         """
 *         d = self.SerializePartialToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromDict(self, d, reset=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":430
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Blob.SerializePartialToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":440
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_41ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_40ParseFromDict[] = "\n        Populate the message class from a Python dictionary.\n\n        Params:\n            d (dict): a Python dictionary representing the message\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_41ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,&__pyx_n_s_reset,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 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_reset);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromDict") < 0)) __PYX_ERR(0, 440, __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_d = values[0];
    __pyx_v_reset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromDict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 440, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_40ParseFromDict(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), __pyx_v_d, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_40ParseFromDict(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset) {
  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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("ParseFromDict", 0);

  /* "pyrosm_proto.pyx":448
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reset); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 448, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":449
 *         """
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         assert type(d) == dict
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":448
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":451
 *             self.reset()
 * 
 *         assert type(d) == dict             # <<<<<<<<<<<<<<
 *         try:
 *             self.raw = base64.b64decode(d["raw"].encode('utf-8'))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_d)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 451, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 451, __pyx_L1_error)
    }
  }
  #endif

  /* "pyrosm_proto.pyx":452
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.raw = base64.b64decode(d["raw"].encode('utf-8'))
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":453
 *         assert type(d) == dict
 *         try:
 *             self.raw = base64.b64decode(d["raw"].encode('utf-8'))             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_base64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 453, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_b64decode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 453, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_raw); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 453, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_encode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 453, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_kp_s_utf_8);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 453, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __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);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_raw, __pyx_t_2) < 0) __PYX_ERR(0, 453, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":452
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.raw = base64.b64decode(d["raw"].encode('utf-8'))
 *         except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":454
 *         try:
 *             self.raw = base64.b64decode(d["raw"].encode('utf-8'))
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_10) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":452
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.raw = base64.b64decode(d["raw"].encode('utf-8'))
 *         except KeyError:
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":456
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.raw_size = d["raw_size"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":457
 *             pass
 *         try:
 *             self.raw_size = d["raw_size"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_raw_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_raw_size, __pyx_t_2) < 0) __PYX_ERR(0, 457, __pyx_L10_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":456
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.raw_size = d["raw_size"]
 *         except KeyError:
 */
    }
    __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_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":458
 *         try:
 *             self.raw_size = d["raw_size"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_10) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    goto __pyx_L12_except_error;
    __pyx_L12_except_error:;

    /* "pyrosm_proto.pyx":456
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.raw_size = d["raw_size"]
 *         except KeyError:
 */
    __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:;
  }

  /* "pyrosm_proto.pyx":460
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.zlib_data = base64.b64decode(d["zlib_data"].encode('utf-8'))
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":461
 *             pass
 *         try:
 *             self.zlib_data = base64.b64decode(d["zlib_data"].encode('utf-8'))             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_base64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 461, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_b64decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 461, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_zlib_data); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 461, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_encode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 461, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_s_utf_8);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 461, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_zlib_data, __pyx_t_2) < 0) __PYX_ERR(0, 461, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":460
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.zlib_data = base64.b64decode(d["zlib_data"].encode('utf-8'))
 *         except KeyError:
 */
    }
    __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_L21_try_end;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":462
 *         try:
 *             self.zlib_data = base64.b64decode(d["zlib_data"].encode('utf-8'))
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_10) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L17_exception_handled;
    }
    goto __pyx_L18_except_error;
    __pyx_L18_except_error:;

    /* "pyrosm_proto.pyx":460
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.zlib_data = base64.b64decode(d["zlib_data"].encode('utf-8'))
 *         except KeyError:
 */
    __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_L17_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_L21_try_end:;
  }

  /* "pyrosm_proto.pyx":464
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lzma_data = base64.b64decode(d["lzma_data"].encode('utf-8'))
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":465
 *             pass
 *         try:
 *             self.lzma_data = base64.b64decode(d["lzma_data"].encode('utf-8'))             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_base64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 465, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_b64decode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 465, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_lzma_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 465, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_encode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 465, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_kp_s_utf_8);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 465, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __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);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lzma_data, __pyx_t_2) < 0) __PYX_ERR(0, 465, __pyx_L22_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":464
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lzma_data = base64.b64decode(d["lzma_data"].encode('utf-8'))
 *         except KeyError:
 */
    }
    __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_L27_try_end;
    __pyx_L22_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":466
 *         try:
 *             self.lzma_data = base64.b64decode(d["lzma_data"].encode('utf-8'))
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_10) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L23_exception_handled;
    }
    goto __pyx_L24_except_error;
    __pyx_L24_except_error:;

    /* "pyrosm_proto.pyx":464
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lzma_data = base64.b64decode(d["lzma_data"].encode('utf-8'))
 *         except KeyError:
 */
    __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_L23_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_L27_try_end:;
  }

  /* "pyrosm_proto.pyx":468
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.OBSOLETE_bzip2_data = base64.b64decode(d["OBSOLETE_bzip2_data"].encode('utf-8'))
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":469
 *             pass
 *         try:
 *             self.OBSOLETE_bzip2_data = base64.b64decode(d["OBSOLETE_bzip2_data"].encode('utf-8'))             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_base64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 469, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_b64decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 469, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_OBSOLETE_bzip2_data); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 469, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_encode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 469, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_s_utf_8);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 469, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_OBSOLETE_bzip2_data, __pyx_t_2) < 0) __PYX_ERR(0, 469, __pyx_L28_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":468
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.OBSOLETE_bzip2_data = base64.b64decode(d["OBSOLETE_bzip2_data"].encode('utf-8'))
 *         except KeyError:
 */
    }
    __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_L33_try_end;
    __pyx_L28_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":470
 *         try:
 *             self.OBSOLETE_bzip2_data = base64.b64decode(d["OBSOLETE_bzip2_data"].encode('utf-8'))
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_10) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L29_exception_handled;
    }
    goto __pyx_L30_except_error;
    __pyx_L30_except_error:;

    /* "pyrosm_proto.pyx":468
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.OBSOLETE_bzip2_data = base64.b64decode(d["OBSOLETE_bzip2_data"].encode('utf-8'))
 *         except KeyError:
 */
    __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_L29_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_L33_try_end:;
  }

  /* "pyrosm_proto.pyx":473
 *             pass
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Blob *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":475
 *         self._Modified()
 * 
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":440
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.Blob.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":477
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_43SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_42SerializeToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_43SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_42SerializeToDict(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_42SerializeToDict(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("SerializeToDict", 0);

  /* "pyrosm_proto.pyx":484
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["raw"] = base64.b64encode(self.raw).decode('utf-8')
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":485
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["raw"] = base64.b64encode(self.raw).decode('utf-8')
 *         if self.__field_bitmap0 & 2 == 2:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":486
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["raw"] = base64.b64encode(self.raw).decode('utf-8')             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["raw_size"] = self.raw_size
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_base64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_b64encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_raw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __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_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_raw, __pyx_t_1) < 0)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":485
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["raw"] = base64.b64encode(self.raw).decode('utf-8')
 *         if self.__field_bitmap0 & 2 == 2:
 */
  }

  /* "pyrosm_proto.pyx":487
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["raw"] = base64.b64encode(self.raw).decode('utf-8')
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["raw_size"] = self.raw_size
 *         if self.__field_bitmap0 & 4 == 4:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":488
 *             out["raw"] = base64.b64encode(self.raw).decode('utf-8')
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["raw_size"] = self.raw_size             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["zlib_data"] = base64.b64encode(self.zlib_data).decode('utf-8')
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_raw_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_raw_size, __pyx_t_1) < 0)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":487
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["raw"] = base64.b64encode(self.raw).decode('utf-8')
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["raw_size"] = self.raw_size
 *         if self.__field_bitmap0 & 4 == 4:
 */
  }

  /* "pyrosm_proto.pyx":489
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["raw_size"] = self.raw_size
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["zlib_data"] = base64.b64encode(self.zlib_data).decode('utf-8')
 *         if self.__field_bitmap0 & 8 == 8:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":490
 *             out["raw_size"] = self.raw_size
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["zlib_data"] = base64.b64encode(self.zlib_data).decode('utf-8')             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["lzma_data"] = base64.b64encode(self.lzma_data).decode('utf-8')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_base64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_b64encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_zlib_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_zlib_data, __pyx_t_1) < 0)) __PYX_ERR(0, 490, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":489
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["raw_size"] = self.raw_size
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["zlib_data"] = base64.b64encode(self.zlib_data).decode('utf-8')
 *         if self.__field_bitmap0 & 8 == 8:
 */
  }

  /* "pyrosm_proto.pyx":491
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["zlib_data"] = base64.b64encode(self.zlib_data).decode('utf-8')
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             out["lzma_data"] = base64.b64encode(self.lzma_data).decode('utf-8')
 *         if self.__field_bitmap0 & 16 == 16:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 8) == 8) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":492
 *             out["zlib_data"] = base64.b64encode(self.zlib_data).decode('utf-8')
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["lzma_data"] = base64.b64encode(self.lzma_data).decode('utf-8')             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 16 == 16:
 *             out["OBSOLETE_bzip2_data"] = base64.b64encode(self.OBSOLETE_bzip2_data).decode('utf-8')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_base64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_b64encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lzma_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_lzma_data, __pyx_t_1) < 0)) __PYX_ERR(0, 492, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":491
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["zlib_data"] = base64.b64encode(self.zlib_data).decode('utf-8')
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             out["lzma_data"] = base64.b64encode(self.lzma_data).decode('utf-8')
 *         if self.__field_bitmap0 & 16 == 16:
 */
  }

  /* "pyrosm_proto.pyx":493
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["lzma_data"] = base64.b64encode(self.lzma_data).decode('utf-8')
 *         if self.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             out["OBSOLETE_bzip2_data"] = base64.b64encode(self.OBSOLETE_bzip2_data).decode('utf-8')
 * 
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 16) == 16) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":494
 *             out["lzma_data"] = base64.b64encode(self.lzma_data).decode('utf-8')
 *         if self.__field_bitmap0 & 16 == 16:
 *             out["OBSOLETE_bzip2_data"] = base64.b64encode(self.OBSOLETE_bzip2_data).decode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_base64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_b64encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_OBSOLETE_bzip2_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 494, __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_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_OBSOLETE_bzip2_data, __pyx_t_1) < 0)) __PYX_ERR(0, 494, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":493
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["lzma_data"] = base64.b64encode(self.lzma_data).decode('utf-8')
 *         if self.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             out["OBSOLETE_bzip2_data"] = base64.b64encode(self.OBSOLETE_bzip2_data).decode('utf-8')
 * 
 */
  }

  /* "pyrosm_proto.pyx":496
 *             out["OBSOLETE_bzip2_data"] = base64.b64encode(self.OBSOLETE_bzip2_data).decode('utf-8')
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":477
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.Blob.SerializeToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":498
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_45SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_44SerializePartialToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_45SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_44SerializePartialToDict(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_44SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToDict", 0);

  /* "pyrosm_proto.pyx":505
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["raw"] = base64.b64encode(self.raw).decode('utf-8')
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":506
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["raw"] = base64.b64encode(self.raw).decode('utf-8')
 *         if self.__field_bitmap0 & 2 == 2:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":507
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["raw"] = base64.b64encode(self.raw).decode('utf-8')             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["raw_size"] = self.raw_size
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_base64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_b64encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_raw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __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_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_raw, __pyx_t_1) < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":506
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["raw"] = base64.b64encode(self.raw).decode('utf-8')
 *         if self.__field_bitmap0 & 2 == 2:
 */
  }

  /* "pyrosm_proto.pyx":508
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["raw"] = base64.b64encode(self.raw).decode('utf-8')
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["raw_size"] = self.raw_size
 *         if self.__field_bitmap0 & 4 == 4:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":509
 *             out["raw"] = base64.b64encode(self.raw).decode('utf-8')
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["raw_size"] = self.raw_size             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["zlib_data"] = base64.b64encode(self.zlib_data).decode('utf-8')
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_raw_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_raw_size, __pyx_t_1) < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":508
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["raw"] = base64.b64encode(self.raw).decode('utf-8')
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["raw_size"] = self.raw_size
 *         if self.__field_bitmap0 & 4 == 4:
 */
  }

  /* "pyrosm_proto.pyx":510
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["raw_size"] = self.raw_size
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["zlib_data"] = base64.b64encode(self.zlib_data).decode('utf-8')
 *         if self.__field_bitmap0 & 8 == 8:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":511
 *             out["raw_size"] = self.raw_size
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["zlib_data"] = base64.b64encode(self.zlib_data).decode('utf-8')             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["lzma_data"] = base64.b64encode(self.lzma_data).decode('utf-8')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_base64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_b64encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_zlib_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_zlib_data, __pyx_t_1) < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":510
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["raw_size"] = self.raw_size
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["zlib_data"] = base64.b64encode(self.zlib_data).decode('utf-8')
 *         if self.__field_bitmap0 & 8 == 8:
 */
  }

  /* "pyrosm_proto.pyx":512
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["zlib_data"] = base64.b64encode(self.zlib_data).decode('utf-8')
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             out["lzma_data"] = base64.b64encode(self.lzma_data).decode('utf-8')
 *         if self.__field_bitmap0 & 16 == 16:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 8) == 8) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":513
 *             out["zlib_data"] = base64.b64encode(self.zlib_data).decode('utf-8')
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["lzma_data"] = base64.b64encode(self.lzma_data).decode('utf-8')             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 16 == 16:
 *             out["OBSOLETE_bzip2_data"] = base64.b64encode(self.OBSOLETE_bzip2_data).decode('utf-8')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_base64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_b64encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lzma_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_lzma_data, __pyx_t_1) < 0)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":512
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["zlib_data"] = base64.b64encode(self.zlib_data).decode('utf-8')
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             out["lzma_data"] = base64.b64encode(self.lzma_data).decode('utf-8')
 *         if self.__field_bitmap0 & 16 == 16:
 */
  }

  /* "pyrosm_proto.pyx":514
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["lzma_data"] = base64.b64encode(self.lzma_data).decode('utf-8')
 *         if self.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             out["OBSOLETE_bzip2_data"] = base64.b64encode(self.OBSOLETE_bzip2_data).decode('utf-8')
 * 
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 16) == 16) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":515
 *             out["lzma_data"] = base64.b64encode(self.lzma_data).decode('utf-8')
 *         if self.__field_bitmap0 & 16 == 16:
 *             out["OBSOLETE_bzip2_data"] = base64.b64encode(self.OBSOLETE_bzip2_data).decode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_base64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_b64encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_OBSOLETE_bzip2_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 515, __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_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_OBSOLETE_bzip2_data, __pyx_t_1) < 0)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":514
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["lzma_data"] = base64.b64encode(self.lzma_data).decode('utf-8')
 *         if self.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             out["OBSOLETE_bzip2_data"] = base64.b64encode(self.OBSOLETE_bzip2_data).decode('utf-8')
 * 
 */
  }

  /* "pyrosm_proto.pyx":517
 *             out["OBSOLETE_bzip2_data"] = base64.b64encode(self.OBSOLETE_bzip2_data).decode('utf-8')
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def Items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":498
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.Blob.SerializePartialToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_4Blob_48generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":519
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_47Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_46Items[] = "\n        Iterator over the field names and values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_47Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_46Items(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_46Items(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct__Items(__pyx_ptype_12pyrosm_proto___pyx_scope_struct__Items, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 519, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_4Blob_48generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Items, __pyx_n_s_Blob_Items, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 519, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob.Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_4Blob_48generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 519, __pyx_L1_error)

  /* "pyrosm_proto.pyx":526
 *             iterator
 *         """
 *         yield 'raw', self.raw             # <<<<<<<<<<<<<<
 *         yield 'raw_size', self.raw_size
 *         yield 'zlib_data', self.zlib_data
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_raw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_raw);
  __Pyx_GIVEREF(__pyx_n_s_raw);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_raw);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 526, __pyx_L1_error)

  /* "pyrosm_proto.pyx":527
 *         """
 *         yield 'raw', self.raw
 *         yield 'raw_size', self.raw_size             # <<<<<<<<<<<<<<
 *         yield 'zlib_data', self.zlib_data
 *         yield 'lzma_data', self.lzma_data
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_raw_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_raw_size);
  __Pyx_GIVEREF(__pyx_n_s_raw_size);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_raw_size);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 527, __pyx_L1_error)

  /* "pyrosm_proto.pyx":528
 *         yield 'raw', self.raw
 *         yield 'raw_size', self.raw_size
 *         yield 'zlib_data', self.zlib_data             # <<<<<<<<<<<<<<
 *         yield 'lzma_data', self.lzma_data
 *         yield 'OBSOLETE_bzip2_data', self.OBSOLETE_bzip2_data
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_zlib_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_zlib_data);
  __Pyx_GIVEREF(__pyx_n_s_zlib_data);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_zlib_data);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 528, __pyx_L1_error)

  /* "pyrosm_proto.pyx":529
 *         yield 'raw_size', self.raw_size
 *         yield 'zlib_data', self.zlib_data
 *         yield 'lzma_data', self.lzma_data             # <<<<<<<<<<<<<<
 *         yield 'OBSOLETE_bzip2_data', self.OBSOLETE_bzip2_data
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lzma_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_lzma_data);
  __Pyx_GIVEREF(__pyx_n_s_lzma_data);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_lzma_data);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 529, __pyx_L1_error)

  /* "pyrosm_proto.pyx":530
 *         yield 'zlib_data', self.zlib_data
 *         yield 'lzma_data', self.lzma_data
 *         yield 'OBSOLETE_bzip2_data', self.OBSOLETE_bzip2_data             # <<<<<<<<<<<<<<
 * 
 *     def Fields(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_OBSOLETE_bzip2_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_OBSOLETE_bzip2_data);
  __Pyx_GIVEREF(__pyx_n_s_OBSOLETE_bzip2_data);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_OBSOLETE_bzip2_data);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 530, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":519
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_4Blob_51generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":532
 *         yield 'OBSOLETE_bzip2_data', self.OBSOLETE_bzip2_data
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_50Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_49Fields[] = "\n        Iterator over the field names of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_50Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_49Fields(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_49Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_1_Fields(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_1_Fields, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 532, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_4Blob_51generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Fields, __pyx_n_s_Blob_Fields, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 532, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob.Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_4Blob_51generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 532, __pyx_L1_error)

  /* "pyrosm_proto.pyx":539
 *             iterator
 *         """
 *         yield 'raw'             # <<<<<<<<<<<<<<
 *         yield 'raw_size'
 *         yield 'zlib_data'
 */
  __Pyx_INCREF(__pyx_n_s_raw);
  __pyx_r = __pyx_n_s_raw;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 539, __pyx_L1_error)

  /* "pyrosm_proto.pyx":540
 *         """
 *         yield 'raw'
 *         yield 'raw_size'             # <<<<<<<<<<<<<<
 *         yield 'zlib_data'
 *         yield 'lzma_data'
 */
  __Pyx_INCREF(__pyx_n_s_raw_size);
  __pyx_r = __pyx_n_s_raw_size;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 540, __pyx_L1_error)

  /* "pyrosm_proto.pyx":541
 *         yield 'raw'
 *         yield 'raw_size'
 *         yield 'zlib_data'             # <<<<<<<<<<<<<<
 *         yield 'lzma_data'
 *         yield 'OBSOLETE_bzip2_data'
 */
  __Pyx_INCREF(__pyx_n_s_zlib_data);
  __pyx_r = __pyx_n_s_zlib_data;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 541, __pyx_L1_error)

  /* "pyrosm_proto.pyx":542
 *         yield 'raw_size'
 *         yield 'zlib_data'
 *         yield 'lzma_data'             # <<<<<<<<<<<<<<
 *         yield 'OBSOLETE_bzip2_data'
 * 
 */
  __Pyx_INCREF(__pyx_n_s_lzma_data);
  __pyx_r = __pyx_n_s_lzma_data;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 542, __pyx_L1_error)

  /* "pyrosm_proto.pyx":543
 *         yield 'zlib_data'
 *         yield 'lzma_data'
 *         yield 'OBSOLETE_bzip2_data'             # <<<<<<<<<<<<<<
 * 
 *     def Values(self):
 */
  __Pyx_INCREF(__pyx_n_s_OBSOLETE_bzip2_data);
  __pyx_r = __pyx_n_s_OBSOLETE_bzip2_data;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 543, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":532
 *         yield 'OBSOLETE_bzip2_data', self.OBSOLETE_bzip2_data
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_4Blob_54generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":545
 *         yield 'OBSOLETE_bzip2_data'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_53Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_52Values[] = "\n        Iterator over the values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_53Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_52Values(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_52Values(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_2_Values(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_2_Values, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 545, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_4Blob_54generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Values, __pyx_n_s_Blob_Values, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob.Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_4Blob_54generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 545, __pyx_L1_error)

  /* "pyrosm_proto.pyx":552
 *             iterator
 *         """
 *         yield self.raw             # <<<<<<<<<<<<<<
 *         yield self.raw_size
 *         yield self.zlib_data
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_raw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 552, __pyx_L1_error)

  /* "pyrosm_proto.pyx":553
 *         """
 *         yield self.raw
 *         yield self.raw_size             # <<<<<<<<<<<<<<
 *         yield self.zlib_data
 *         yield self.lzma_data
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_raw_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 553, __pyx_L1_error)

  /* "pyrosm_proto.pyx":554
 *         yield self.raw
 *         yield self.raw_size
 *         yield self.zlib_data             # <<<<<<<<<<<<<<
 *         yield self.lzma_data
 *         yield self.OBSOLETE_bzip2_data
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_zlib_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 554, __pyx_L1_error)

  /* "pyrosm_proto.pyx":555
 *         yield self.raw_size
 *         yield self.zlib_data
 *         yield self.lzma_data             # <<<<<<<<<<<<<<
 *         yield self.OBSOLETE_bzip2_data
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lzma_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 555, __pyx_L1_error)

  /* "pyrosm_proto.pyx":556
 *         yield self.zlib_data
 *         yield self.lzma_data
 *         yield self.OBSOLETE_bzip2_data             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_OBSOLETE_bzip2_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 556, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":545
 *         yield 'OBSOLETE_bzip2_data'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_4Blob_57generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":560
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_56Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Blob_55Setters[] = "\n        Iterator over functions to set the fields in a message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_56Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_55Setters(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_55Setters(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_3_Setters(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_3_Setters, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 560, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_4Blob_57generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Setters, __pyx_n_s_Blob_Setters, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 560, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob.Setters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":567
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.raw = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Blob_7Setters_1setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_7Setters_1setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_7Setters_setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":568
 *         """
 *         def setter(value):
 *             self.raw = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 568, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_raw, __pyx_v_value) < 0) __PYX_ERR(0, 568, __pyx_L1_error)

  /* "pyrosm_proto.pyx":567
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.raw = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":570
 *             self.raw = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.raw_size = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Blob_7Setters_3setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_7Setters_3setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_7Setters_2setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":571
 *         yield setter
 *         def setter(value):
 *             self.raw_size = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 571, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_raw_size, __pyx_v_value) < 0) __PYX_ERR(0, 571, __pyx_L1_error)

  /* "pyrosm_proto.pyx":570
 *             self.raw = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.raw_size = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":573
 *             self.raw_size = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.zlib_data = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Blob_7Setters_5setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_7Setters_5setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_7Setters_4setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":574
 *         yield setter
 *         def setter(value):
 *             self.zlib_data = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 574, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_zlib_data, __pyx_v_value) < 0) __PYX_ERR(0, 574, __pyx_L1_error)

  /* "pyrosm_proto.pyx":573
 *             self.raw_size = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.zlib_data = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":576
 *             self.zlib_data = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lzma_data = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Blob_7Setters_7setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_7Setters_7setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_7Setters_6setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":577
 *         yield setter
 *         def setter(value):
 *             self.lzma_data = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 577, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lzma_data, __pyx_v_value) < 0) __PYX_ERR(0, 577, __pyx_L1_error)

  /* "pyrosm_proto.pyx":576
 *             self.zlib_data = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lzma_data = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":579
 *             self.lzma_data = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.OBSOLETE_bzip2_data = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Blob_7Setters_9setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_7Setters_9setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_7Setters_8setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":580
 *         yield setter
 *         def setter(value):
 *             self.OBSOLETE_bzip2_data = value             # <<<<<<<<<<<<<<
 *         yield setter
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 580, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_OBSOLETE_bzip2_data, __pyx_v_value) < 0) __PYX_ERR(0, 580, __pyx_L1_error)

  /* "pyrosm_proto.pyx":579
 *             self.lzma_data = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.OBSOLETE_bzip2_data = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":560
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

static PyObject *__pyx_gb_12pyrosm_proto_4Blob_57generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 560, __pyx_L1_error)

  /* "pyrosm_proto.pyx":567
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.raw = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Blob_7Setters_1setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_setter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":569
 *         def setter(value):
 *             self.raw = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.raw_size = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 569, __pyx_L1_error)

  /* "pyrosm_proto.pyx":570
 *             self.raw = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.raw_size = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Blob_7Setters_3setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":572
 *         def setter(value):
 *             self.raw_size = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.zlib_data = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 572, __pyx_L1_error)

  /* "pyrosm_proto.pyx":573
 *             self.raw_size = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.zlib_data = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Blob_7Setters_5setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":575
 *         def setter(value):
 *             self.zlib_data = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.lzma_data = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 575, __pyx_L1_error)

  /* "pyrosm_proto.pyx":576
 *             self.zlib_data = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lzma_data = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Blob_7Setters_7setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":578
 *         def setter(value):
 *             self.lzma_data = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.OBSOLETE_bzip2_data = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 578, __pyx_L1_error)

  /* "pyrosm_proto.pyx":579
 *             self.lzma_data = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.OBSOLETE_bzip2_data = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Blob_7Setters_9setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":581
 *         def setter(value):
 *             self.OBSOLETE_bzip2_data = value
 *         yield setter             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 581, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":560
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

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

/* "pyrosm_proto.pxd":22
 *     cdef uint64_t __field_bitmap0
 * 
 *     cdef public bint _is_present_in_parent             # <<<<<<<<<<<<<<
 *     cdef bytes _cached_serialization
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_21_is_present_in_parent___get__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_present_in_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 22, __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("pyrosm_proto.Blob._is_present_in_parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Blob_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Blob_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Blob_21_is_present_in_parent_2__set__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Blob_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 22, __pyx_L1_error)
  __pyx_v_self->_is_present_in_parent = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Blob._is_present_in_parent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_59__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_59__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_12pyrosm_proto_4Blob_58__reduce_cython__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_58__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Blob.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_61__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Blob_61__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_12pyrosm_proto_4Blob_60__setstate_cython__(((struct __pyx_obj_12pyrosm_proto_Blob *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Blob_60__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Blob *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Blob.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":588
 * cdef class BlobHeader:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10BlobHeader_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_10BlobHeader_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader___cinit__(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static int __pyx_pf_12pyrosm_proto_10BlobHeader___cinit__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrosm_proto.pyx":589
 * 
 *     def __cinit__(self):
 *         self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

  /* "pyrosm_proto.pyx":588
 * cdef class BlobHeader:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

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

/* "pyrosm_proto.pyx":593
 * 
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10BlobHeader_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_10BlobHeader_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_2__init__(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), __pyx_v_kwargs);

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

static int __pyx_pf_12pyrosm_proto_10BlobHeader_2__init__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_field_name = NULL;
  PyObject *__pyx_v_field_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrosm_proto.pyx":594
 * 
 *     def __init__(self, **kwargs):
 *         self.reset()             # <<<<<<<<<<<<<<
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":595
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 595, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":596
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     setattr(self, field_name, field_value)
 */
    __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 596, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 596, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 596, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 596, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 596, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 596, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 596, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":597
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "pyrosm_proto.pyx":598
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     setattr(self, field_name, field_value)             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 */
          __pyx_t_13 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name, __pyx_v_field_value); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 598, __pyx_L8_error)

          /* "pyrosm_proto.pyx":597
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L15_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrosm_proto.pyx":599
 *                 try:
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return
 */
        __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_14) {
          __Pyx_AddTraceback("pyrosm_proto.BlobHeader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 599, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_6);

          /* "pyrosm_proto.pyx":600
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))             # <<<<<<<<<<<<<<
 *         return
 * 
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 600, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_field_name);
          __Pyx_GIVEREF(__pyx_v_field_name);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_field_name);
          __pyx_t_15 = __Pyx_PyString_Format(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 600, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 600, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 600, __pyx_L10_except_error)
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;

        /* "pyrosm_proto.pyx":597
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 */
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L15_try_end:;
      }

      /* "pyrosm_proto.pyx":596
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     setattr(self, field_name, field_value)
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":595
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  }

  /* "pyrosm_proto.pyx":601
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":593
 * 
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XDECREF(__pyx_v_field_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":603
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'type',
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_4__str__(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_4__str__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_messages = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyrosm_proto.pyx":604
 * 
 *     def __str__(self):
 *         fields = [             # <<<<<<<<<<<<<<
 *                           'type',
 *                           'indexdata',
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_type);
  __Pyx_GIVEREF(__pyx_n_s_type);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_type);
  __Pyx_INCREF(__pyx_n_s_indexdata);
  __Pyx_GIVEREF(__pyx_n_s_indexdata);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_indexdata);
  __Pyx_INCREF(__pyx_n_s_datasize);
  __Pyx_GIVEREF(__pyx_n_s_datasize);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_datasize);
  __pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":608
 *                           'indexdata',
 *                           'datasize',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]             # <<<<<<<<<<<<<<
 *         messages = []
 *         for message in messages:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 608, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":609
 *                           'datasize',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []             # <<<<<<<<<<<<<<
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_messages = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":610
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  __pyx_t_1 = __pyx_v_messages; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 610, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":611
 *         messages = []
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))             # <<<<<<<<<<<<<<
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 611, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":612
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    __pyx_t_4 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 612, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 612, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 612, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 612, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":613
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))             # <<<<<<<<<<<<<<
 *             components.append('}')
 *         return '\n'.join(components)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_line);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":612
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":614
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 *             components.append('}')             # <<<<<<<<<<<<<<
 *         return '\n'.join(components)
 * 
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_kp_s__2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 614, __pyx_L1_error)

    /* "pyrosm_proto.pyx":610
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":615
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 *         return '\n'.join(components)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":603
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'type',
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_messages);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":617
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_10BlobHeader_reset(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10BlobHeader_7reset)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":620
 *         # reset values and populate defaults
 * 
 *         self.__field_bitmap0 = 0             # <<<<<<<<<<<<<<
 * 
 *         self._type = ""
 */
  __pyx_v_self->__pyx___field_bitmap0 = 0;

  /* "pyrosm_proto.pyx":622
 *         self.__field_bitmap0 = 0
 * 
 *         self._type = ""             # <<<<<<<<<<<<<<
 *         self._indexdata = b""
 *         self._datasize = 0
 */
  __Pyx_INCREF(__pyx_kp_s__3);
  __Pyx_GIVEREF(__pyx_kp_s__3);
  __Pyx_GOTREF(__pyx_v_self->_type);
  __Pyx_DECREF(__pyx_v_self->_type);
  __pyx_v_self->_type = __pyx_kp_s__3;

  /* "pyrosm_proto.pyx":623
 * 
 *         self._type = ""
 *         self._indexdata = b""             # <<<<<<<<<<<<<<
 *         self._datasize = 0
 *         return
 */
  __Pyx_INCREF(__pyx_kp_b__3);
  __Pyx_GIVEREF(__pyx_kp_b__3);
  __Pyx_GOTREF(__pyx_v_self->_indexdata);
  __Pyx_DECREF(__pyx_v_self->_indexdata);
  __pyx_v_self->_indexdata = __pyx_kp_b__3;

  /* "pyrosm_proto.pyx":624
 *         self._type = ""
 *         self._indexdata = b""
 *         self._datasize = 0             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_v_self->_datasize = 0;

  /* "pyrosm_proto.pyx":625
 *         self._indexdata = b""
 *         self._datasize = 0
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":617
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

  /* 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_WriteUnraisable("pyrosm_proto.BlobHeader.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_6reset(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_6reset(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10BlobHeader_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __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("pyrosm_proto.BlobHeader.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":629
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         return self._type
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_4type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_4type___get__(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_4type___get__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":630
 *     @property
 *     def type(self):
 *         return self._type             # <<<<<<<<<<<<<<
 * 
 *     @type.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_type);
  __pyx_r = __pyx_v_self->_type;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":629
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         return self._type
 * 
 */

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

/* "pyrosm_proto.pyx":633
 * 
 *     @type.setter
 *     def type(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         if isinstance(value, bytes):
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10BlobHeader_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_10BlobHeader_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_4type_2__set__(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_10BlobHeader_4type_2__set__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":634
 *     @type.setter
 *     def type(self, value):
 *         self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *         if isinstance(value, bytes):
 *             self._type = value.decode('utf-8')
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

  /* "pyrosm_proto.pyx":635
 *     def type(self, value):
 *         self.__field_bitmap0 |= 1
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._type = value.decode('utf-8')
 *         elif isinstance(value, str):
 */
  __pyx_t_1 = PyBytes_Check(__pyx_v_value); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":636
 *         self.__field_bitmap0 |= 1
 *         if isinstance(value, bytes):
 *             self._type = value.decode('utf-8')             # <<<<<<<<<<<<<<
 *         elif isinstance(value, str):
 *             self._type = value
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_type);
    __Pyx_DECREF(__pyx_v_self->_type);
    __pyx_v_self->_type = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":635
 *     def type(self, value):
 *         self.__field_bitmap0 |= 1
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._type = value.decode('utf-8')
 *         elif isinstance(value, str):
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":637
 *         if isinstance(value, bytes):
 *             self._type = value.decode('utf-8')
 *         elif isinstance(value, str):             # <<<<<<<<<<<<<<
 *             self._type = value
 *         else:
 */
  __pyx_t_2 = PyString_Check(__pyx_v_value); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "pyrosm_proto.pyx":638
 *             self._type = value.decode('utf-8')
 *         elif isinstance(value, str):
 *             self._type = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (value, type(value), bytes, str))
 */
    if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 638, __pyx_L1_error)
    __pyx_t_3 = __pyx_v_value;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_type);
    __Pyx_DECREF(__pyx_v_self->_type);
    __pyx_v_self->_type = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":637
 *         if isinstance(value, bytes):
 *             self._type = value.decode('utf-8')
 *         elif isinstance(value, str):             # <<<<<<<<<<<<<<
 *             self._type = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":640
 *             self._type = value
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (value, type(value), bytes, str))             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  /*else*/ {
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_3, 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_3, 1, ((PyObject *)Py_TYPE(__pyx_v_value)));
    __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)(&PyBytes_Type)));
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 3, ((PyObject *)(&PyString_Type)));
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 640, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":641
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (value, type(value), bytes, str))
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":633
 * 
 *     @type.setter
 *     def type(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         if isinstance(value, bytes):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":644
 * 
 *     @property
 *     def indexdata(self):             # <<<<<<<<<<<<<<
 *         return self._indexdata
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_9indexdata_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_9indexdata_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_9indexdata___get__(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_9indexdata___get__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":645
 *     @property
 *     def indexdata(self):
 *         return self._indexdata             # <<<<<<<<<<<<<<
 * 
 *     @indexdata.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_indexdata);
  __pyx_r = __pyx_v_self->_indexdata;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":644
 * 
 *     @property
 *     def indexdata(self):             # <<<<<<<<<<<<<<
 *         return self._indexdata
 * 
 */

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

/* "pyrosm_proto.pyx":648
 * 
 *     @indexdata.setter
 *     def indexdata(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 2
 *         if isinstance(value, bytes):
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10BlobHeader_9indexdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_10BlobHeader_9indexdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_9indexdata_2__set__(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_10BlobHeader_9indexdata_2__set__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":649
 *     @indexdata.setter
 *     def indexdata(self, value):
 *         self.__field_bitmap0 |= 2             # <<<<<<<<<<<<<<
 *         if isinstance(value, bytes):
 *             self._indexdata = value
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 2);

  /* "pyrosm_proto.pyx":650
 *     def indexdata(self, value):
 *         self.__field_bitmap0 |= 2
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._indexdata = value
 *         else:
 */
  __pyx_t_1 = PyBytes_Check(__pyx_v_value); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":651
 *         self.__field_bitmap0 |= 2
 *         if isinstance(value, bytes):
 *             self._indexdata = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (value, type(value), bytes))
 */
    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, 651, __pyx_L1_error)
    __pyx_t_3 = __pyx_v_value;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_indexdata);
    __Pyx_DECREF(__pyx_v_self->_indexdata);
    __pyx_v_self->_indexdata = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":650
 *     def indexdata(self, value):
 *         self.__field_bitmap0 |= 2
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._indexdata = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":653
 *             self._indexdata = value
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (value, type(value), bytes))             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  /*else*/ {
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_3, 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_3, 1, ((PyObject *)Py_TYPE(__pyx_v_value)));
    __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)(&PyBytes_Type)));
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 653, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":654
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (value, type(value), bytes))
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":648
 * 
 *     @indexdata.setter
 *     def indexdata(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 2
 *         if isinstance(value, bytes):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.indexdata.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":657
 * 
 *     @property
 *     def datasize(self):             # <<<<<<<<<<<<<<
 *         return self._datasize
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_8datasize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_8datasize_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_8datasize___get__(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_8datasize___get__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":658
 *     @property
 *     def datasize(self):
 *         return self._datasize             # <<<<<<<<<<<<<<
 * 
 *     @datasize.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_datasize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":657
 * 
 *     @property
 *     def datasize(self):             # <<<<<<<<<<<<<<
 *         return self._datasize
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.datasize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":661
 * 
 *     @datasize.setter
 *     def datasize(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 4
 *         self._datasize = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10BlobHeader_8datasize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_10BlobHeader_8datasize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_8datasize_2__set__(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_10BlobHeader_8datasize_2__set__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int32_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":662
 *     @datasize.setter
 *     def datasize(self, value):
 *         self.__field_bitmap0 |= 4             # <<<<<<<<<<<<<<
 *         self._datasize = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 4);

  /* "pyrosm_proto.pyx":663
 *     def datasize(self, value):
 *         self.__field_bitmap0 |= 4
 *         self._datasize = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 663, __pyx_L1_error)
  __pyx_v_self->_datasize = __pyx_t_1;

  /* "pyrosm_proto.pyx":664
 *         self.__field_bitmap0 |= 4
 *         self._datasize = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":661
 * 
 *     @datasize.setter
 *     def datasize(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 4
 *         self._datasize = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.datasize.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":667
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

static int __pyx_f_12pyrosm_proto_10BlobHeader__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, CYTHON_UNUSED int __pyx_v_cache) {
  int __pyx_v_current_offset;
  int64_t __pyx_v_key;
  int64_t __pyx_v_field_size;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("_protobuf_deserialize", 0);

  /* "pyrosm_proto.pyx":668
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):
 *         cdef int current_offset = 0             # <<<<<<<<<<<<<<
 *         cdef int64_t key
 *         cdef int64_t field_size
 */
  __pyx_v_current_offset = 0;

  /* "pyrosm_proto.pyx":671
 *         cdef int64_t key
 *         cdef int64_t field_size
 *         while current_offset < size:             # <<<<<<<<<<<<<<
 *             key = get_varint64(memory, &current_offset)
 *             # type
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_current_offset < __pyx_v_size) != 0);
    if (!__pyx_t_1) break;

    /* "pyrosm_proto.pyx":672
 *         cdef int64_t field_size
 *         while current_offset < size:
 *             key = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # type
 *             if key == 10:
 */
    __pyx_v_key = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

    /* "pyrosm_proto.pyx":674
 *             key = get_varint64(memory, &current_offset)
 *             # type
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 field_size = get_varint64(memory, &current_offset)
 */
    switch (__pyx_v_key) {
      case 10:

      /* "pyrosm_proto.pyx":675
 *             # type
 *             if key == 10:
 *                 self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._type = str(memory[current_offset:current_offset + field_size], 'utf-8')
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

      /* "pyrosm_proto.pyx":676
 *             if key == 10:
 *                 self.__field_bitmap0 |= 1
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 self._type = str(memory[current_offset:current_offset + field_size], 'utf-8')
 *                 current_offset += <int>field_size
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":677
 *                 self.__field_bitmap0 |= 1
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._type = str(memory[current_offset:current_offset + field_size], 'utf-8')             # <<<<<<<<<<<<<<
 *                 current_offset += <int>field_size
 *             # indexdata
 */
      __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 677, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_INCREF(__pyx_kp_s_utf_8);
      __Pyx_GIVEREF(__pyx_kp_s_utf_8);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_utf_8);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 677, __pyx_L1_error)
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_self->_type);
      __Pyx_DECREF(__pyx_v_self->_type);
      __pyx_v_self->_type = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":678
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._type = str(memory[current_offset:current_offset + field_size], 'utf-8')
 *                 current_offset += <int>field_size             # <<<<<<<<<<<<<<
 *             # indexdata
 *             elif key == 18:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((int)__pyx_v_field_size));

      /* "pyrosm_proto.pyx":674
 *             key = get_varint64(memory, &current_offset)
 *             # type
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 field_size = get_varint64(memory, &current_offset)
 */
      break;
      case 18:

      /* "pyrosm_proto.pyx":681
 *             # indexdata
 *             elif key == 18:
 *                 self.__field_bitmap0 |= 2             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._indexdata = memory[current_offset:current_offset + field_size]
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 2);

      /* "pyrosm_proto.pyx":682
 *             elif key == 18:
 *                 self.__field_bitmap0 |= 2
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 self._indexdata = memory[current_offset:current_offset + field_size]
 *                 current_offset += <int>field_size
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":683
 *                 self.__field_bitmap0 |= 2
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._indexdata = memory[current_offset:current_offset + field_size]             # <<<<<<<<<<<<<<
 *                 current_offset += <int>field_size
 *             # datasize
 */
      __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_self->_indexdata);
      __Pyx_DECREF(__pyx_v_self->_indexdata);
      __pyx_v_self->_indexdata = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":684
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._indexdata = memory[current_offset:current_offset + field_size]
 *                 current_offset += <int>field_size             # <<<<<<<<<<<<<<
 *             # datasize
 *             elif key == 24:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((int)__pyx_v_field_size));

      /* "pyrosm_proto.pyx":680
 *                 current_offset += <int>field_size
 *             # indexdata
 *             elif key == 18:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 2
 *                 field_size = get_varint64(memory, &current_offset)
 */
      break;
      case 24:

      /* "pyrosm_proto.pyx":687
 *             # datasize
 *             elif key == 24:
 *                 self.__field_bitmap0 |= 4             # <<<<<<<<<<<<<<
 *                 self._datasize = get_varint32(memory, &current_offset)
 *             # Unknown field - need to skip proper number of bytes
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 4);

      /* "pyrosm_proto.pyx":688
 *             elif key == 24:
 *                 self.__field_bitmap0 |= 4
 *                 self._datasize = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 */
      __pyx_v_self->_datasize = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":686
 *                 current_offset += <int>field_size
 *             # datasize
 *             elif key == 24:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 4
 *                 self._datasize = get_varint32(memory, &current_offset)
 */
      break;
      default:

      /* "pyrosm_proto.pyx":691
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)             # <<<<<<<<<<<<<<
 * 
 *         self._is_present_in_parent = True
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        if (unlikely(!(__pyx_f_12pyrobuf_util_skip_generic(__pyx_v_memory, (&__pyx_v_current_offset), __pyx_v_size, (__pyx_v_key & 0x7)) != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 691, __pyx_L1_error)
        }
      }
      #endif
      break;
    }
  }

  /* "pyrosm_proto.pyx":693
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)
 * 
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 * 
 *         return current_offset
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":695
 *         self._is_present_in_parent = True
 * 
 *         return current_offset             # <<<<<<<<<<<<<<
 * 
 *     cpdef void Clear(self):
 */
  __pyx_r = __pyx_v_current_offset;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":667
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("pyrosm_proto.BlobHeader._protobuf_deserialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":697
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_9Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_10BlobHeader_Clear(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10BlobHeader_9Clear)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":699
 *     cpdef void Clear(self):
 *         """Clears all data that was set in the message."""
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":700
 *         """Clears all data that was set in the message."""
 *         self.reset()
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void ClearField(self, field_name):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":697
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.BlobHeader.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_9Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_8Clear[] = "Clears all data that was set in the message.";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_9Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Clear (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_8Clear(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_8Clear(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10BlobHeader_Clear(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __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("pyrosm_proto.BlobHeader.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":702
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'type':
 */

static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_11ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static void __pyx_f_12pyrosm_proto_10BlobHeader_ClearField(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("ClearField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ClearField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10BlobHeader_11ClearField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":704
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'type':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._type = ""
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_type, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 704, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":705
 *         """Clears the contents of a given field."""
 *         if field_name == 'type':
 *             self.__field_bitmap0 &= ~1             # <<<<<<<<<<<<<<
 *             self._type = ""
 *         elif field_name == 'indexdata':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~1));

    /* "pyrosm_proto.pyx":706
 *         if field_name == 'type':
 *             self.__field_bitmap0 &= ~1
 *             self._type = ""             # <<<<<<<<<<<<<<
 *         elif field_name == 'indexdata':
 *             self.__field_bitmap0 &= ~2
 */
    __Pyx_INCREF(__pyx_kp_s__3);
    __Pyx_GIVEREF(__pyx_kp_s__3);
    __Pyx_GOTREF(__pyx_v_self->_type);
    __Pyx_DECREF(__pyx_v_self->_type);
    __pyx_v_self->_type = __pyx_kp_s__3;

    /* "pyrosm_proto.pyx":704
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'type':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._type = ""
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":707
 *             self.__field_bitmap0 &= ~1
 *             self._type = ""
 *         elif field_name == 'indexdata':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~2
 *             self._indexdata = b""
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_indexdata, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 707, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":708
 *             self._type = ""
 *         elif field_name == 'indexdata':
 *             self.__field_bitmap0 &= ~2             # <<<<<<<<<<<<<<
 *             self._indexdata = b""
 *         elif field_name == 'datasize':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~2));

    /* "pyrosm_proto.pyx":709
 *         elif field_name == 'indexdata':
 *             self.__field_bitmap0 &= ~2
 *             self._indexdata = b""             # <<<<<<<<<<<<<<
 *         elif field_name == 'datasize':
 *             self.__field_bitmap0 &= ~4
 */
    __Pyx_INCREF(__pyx_kp_b__3);
    __Pyx_GIVEREF(__pyx_kp_b__3);
    __Pyx_GOTREF(__pyx_v_self->_indexdata);
    __Pyx_DECREF(__pyx_v_self->_indexdata);
    __pyx_v_self->_indexdata = __pyx_kp_b__3;

    /* "pyrosm_proto.pyx":707
 *             self.__field_bitmap0 &= ~1
 *             self._type = ""
 *         elif field_name == 'indexdata':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~2
 *             self._indexdata = b""
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":710
 *             self.__field_bitmap0 &= ~2
 *             self._indexdata = b""
 *         elif field_name == 'datasize':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~4
 *             self._datasize = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_datasize, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 710, __pyx_L1_error)
  if (likely(__pyx_t_5)) {

    /* "pyrosm_proto.pyx":711
 *             self._indexdata = b""
 *         elif field_name == 'datasize':
 *             self.__field_bitmap0 &= ~4             # <<<<<<<<<<<<<<
 *             self._datasize = 0
 *         else:
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~4));

    /* "pyrosm_proto.pyx":712
 *         elif field_name == 'datasize':
 *             self.__field_bitmap0 &= ~4
 *             self._datasize = 0             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 */
    __pyx_v_self->_datasize = 0;

    /* "pyrosm_proto.pyx":710
 *             self.__field_bitmap0 &= ~2
 *             self._indexdata = b""
 *         elif field_name == 'datasize':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~4
 *             self._datasize = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":714
 *             self._datasize = 0
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 714, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":716
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void CopyFrom(self, BlobHeader other_msg):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":702
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'type':
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.BlobHeader.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_11ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_10ClearField[] = "Clears the contents of a given field.";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_11ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ClearField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_10ClearField(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_10ClearField(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ClearField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10BlobHeader_ClearField(__pyx_v_self, __pyx_v_field_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __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("pyrosm_proto.BlobHeader.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":718
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, BlobHeader other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_13CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_10BlobHeader_CopyFrom(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CopyFrom); 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)(void*)__pyx_pw_12pyrosm_proto_10BlobHeader_13CopyFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":725
 *             other_msg (BlobHeader): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":726
 *         """
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 *         self.reset()
 *         self.MergeFrom(other_msg)
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":725
 *             other_msg (BlobHeader): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  }

  /* "pyrosm_proto.pyx":727
 *         if self is other_msg:
 *             return
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self.MergeFrom(other_msg)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":728
 *             return
 *         self.reset()
 *         self.MergeFrom(other_msg)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint HasField(self, field_name) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->MergeFrom(__pyx_v_self, __pyx_v_other_msg, 0);

  /* "pyrosm_proto.pyx":718
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, BlobHeader other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.BlobHeader.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_13CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_12CopyFrom[] = "\n        Copies the content of the specified message into the current message.\n\n        Params:\n            other_msg (BlobHeader): Message to copy into the current one.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_13CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CopyFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_BlobHeader, 1, "other_msg", 0))) __PYX_ERR(0, 718, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_12CopyFrom(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_12CopyFrom(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10BlobHeader_CopyFrom(__pyx_v_self, __pyx_v_other_msg, 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("pyrosm_proto.BlobHeader.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":730
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_15HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static int __pyx_f_12pyrosm_proto_10BlobHeader_HasField(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("HasField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_HasField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10BlobHeader_15HasField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 730, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":737
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'type':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'indexdata':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_type, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 737, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":738
 *         """
 *         if field_name == 'type':
 *             return self.__field_bitmap0 & 1 == 1             # <<<<<<<<<<<<<<
 *         if field_name == 'indexdata':
 *             return self.__field_bitmap0 & 2 == 2
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":737
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'type':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'indexdata':
 */
  }

  /* "pyrosm_proto.pyx":739
 *         if field_name == 'type':
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'indexdata':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'datasize':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_indexdata, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 739, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":740
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'indexdata':
 *             return self.__field_bitmap0 & 2 == 2             # <<<<<<<<<<<<<<
 *         if field_name == 'datasize':
 *             return self.__field_bitmap0 & 4 == 4
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":739
 *         if field_name == 'type':
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'indexdata':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'datasize':
 */
  }

  /* "pyrosm_proto.pyx":741
 *         if field_name == 'indexdata':
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'datasize':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 4 == 4
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_datasize, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 741, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":742
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'datasize':
 *             return self.__field_bitmap0 & 4 == 4             # <<<<<<<<<<<<<<
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":741
 *         if field_name == 'indexdata':
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'datasize':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 4 == 4
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  }

  /* "pyrosm_proto.pyx":743
 *         if field_name == 'datasize':
 *             return self.__field_bitmap0 & 4 == 4
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint IsInitialized(self):
 */
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_singular, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 743, __pyx_L1_error)

  /* "pyrosm_proto.pyx":730
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

  /* 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("pyrosm_proto.BlobHeader.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_15HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_14HasField[] = "\n        Checks if a certain field is set for the message.\n\n        Params:\n            field_name (str): The name of the field to check.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_15HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_14HasField(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_14HasField(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("HasField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_10BlobHeader_HasField(__pyx_v_self, __pyx_v_field_name, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 730, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":745
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_17IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_12pyrosm_proto_10BlobHeader_IsInitialized(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_IsInitialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10BlobHeader_17IsInitialized)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 745, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 745, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":755
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             return False
 *         if self.__field_bitmap0 & 4 != 4:
 */
  __pyx_t_5 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":756
 * 
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 != 4:
 *             return False
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":755
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             return False
 *         if self.__field_bitmap0 & 4 != 4:
 */
  }

  /* "pyrosm_proto.pyx":757
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  __pyx_t_5 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) != 4) != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":758
 *             return False
 *         if self.__field_bitmap0 & 4 != 4:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         return True
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":757
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  }

  /* "pyrosm_proto.pyx":760
 *             return False
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef void MergeFrom(self, BlobHeader other_msg):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":745
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

  /* 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_WriteUnraisable("pyrosm_proto.BlobHeader.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_17IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_16IsInitialized[] = "\n        Checks if the message is initialized.\n\n        Returns:\n            bool: True if the message is initialized (i.e. all of its required\n                fields are set).\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_17IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsInitialized (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_16IsInitialized(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_16IsInitialized(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_12pyrosm_proto_10BlobHeader_IsInitialized(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __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("pyrosm_proto.BlobHeader.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":762
 *         return True
 * 
 *     cpdef void MergeFrom(self, BlobHeader other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_19MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_10BlobHeader_MergeFrom(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int32_t __pyx_t_7;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10BlobHeader_19MergeFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":770
 *         """
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":771
 * 
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":770
 *         """
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "pyrosm_proto.pyx":774
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._type = other_msg._type
 *             self.__field_bitmap0 |= 1
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":775
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._type = other_msg._type             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:
 */
    __pyx_t_1 = __pyx_v_other_msg->_type;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_type);
    __Pyx_DECREF(__pyx_v_self->_type);
    __pyx_v_self->_type = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":776
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._type = other_msg._type
 *             self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 2 == 2:
 *             self._indexdata = other_msg._indexdata
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

    /* "pyrosm_proto.pyx":774
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._type = other_msg._type
 *             self.__field_bitmap0 |= 1
 */
  }

  /* "pyrosm_proto.pyx":777
 *             self._type = other_msg._type
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             self._indexdata = other_msg._indexdata
 *             self.__field_bitmap0 |= 2
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":778
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:
 *             self._indexdata = other_msg._indexdata             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:
 */
    __pyx_t_1 = __pyx_v_other_msg->_indexdata;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_indexdata);
    __Pyx_DECREF(__pyx_v_self->_indexdata);
    __pyx_v_self->_indexdata = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":779
 *         if other_msg.__field_bitmap0 & 2 == 2:
 *             self._indexdata = other_msg._indexdata
 *             self.__field_bitmap0 |= 2             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 4 == 4:
 *             self._datasize = other_msg._datasize
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 2);

    /* "pyrosm_proto.pyx":777
 *             self._type = other_msg._type
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             self._indexdata = other_msg._indexdata
 *             self.__field_bitmap0 |= 2
 */
  }

  /* "pyrosm_proto.pyx":780
 *             self._indexdata = other_msg._indexdata
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             self._datasize = other_msg._datasize
 *             self.__field_bitmap0 |= 4
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":781
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:
 *             self._datasize = other_msg._datasize             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 4
 * 
 */
    __pyx_t_7 = __pyx_v_other_msg->_datasize;
    __pyx_v_self->_datasize = __pyx_t_7;

    /* "pyrosm_proto.pyx":782
 *         if other_msg.__field_bitmap0 & 4 == 4:
 *             self._datasize = other_msg._datasize
 *             self.__field_bitmap0 |= 4             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 4);

    /* "pyrosm_proto.pyx":780
 *             self._indexdata = other_msg._indexdata
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             self._datasize = other_msg._datasize
 *             self.__field_bitmap0 |= 4
 */
  }

  /* "pyrosm_proto.pyx":784
 *             self.__field_bitmap0 |= 4
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":762
 *         return True
 * 
 *     cpdef void MergeFrom(self, BlobHeader other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.BlobHeader.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_19MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_18MergeFrom[] = "\n        Merges the contents of the specified message into the current message.\n\n        Params:\n            other_msg: Message to merge into the current message.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_19MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_BlobHeader, 1, "other_msg", 0))) __PYX_ERR(0, 762, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_18MergeFrom(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_18MergeFrom(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10BlobHeader_MergeFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __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("pyrosm_proto.BlobHeader.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":786
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_21MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_10BlobHeader_MergeFromString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_MergeFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  unsigned char const *__pyx_t_10;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10BlobHeader_21MergeFromString)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 786, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 786, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":800
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, False)
 */
  __pyx_t_7 = (__pyx_v_size != Py_None);
  if ((__pyx_t_7 != 0)) {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 800, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_8;
  } else {
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 800, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_9;
  }
  __pyx_v_length = __pyx_t_5;

  /* "pyrosm_proto.pyx":802
 *         length = size if size is not None else len(data)
 * 
 *         buf = self._protobuf_deserialize(data, length, False)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_10 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 802, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_10, __pyx_v_length, 0);

  /* "pyrosm_proto.pyx":804
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  __pyx_t_7 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "pyrosm_proto.pyx":805
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_GIVEREF(__pyx_v_size);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_size);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Truncated_message_got_s_expected, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __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, 805, __pyx_L1_error)

    /* "pyrosm_proto.pyx":804
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  }

  /* "pyrosm_proto.pyx":807
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":809
 *         self._Modified()
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":786
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_21MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_20MergeFromString[] = "\n        Merges serialized protocol buffer data into this message.\n\n        Params:\n            data (bytes): a string of binary data.\n            size (int): optional - the length of the data string\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_21MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "MergeFromString") < 0)) __PYX_ERR(0, 786, __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_data = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MergeFromString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 786, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_20MergeFromString(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), __pyx_v_data, __pyx_v_size);

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_20MergeFromString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_MergeFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_BlobHeader->MergeFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 786, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":811
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_23ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_10BlobHeader_ParseFromString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_ParseFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_reset = ((int)1);
  int __pyx_v_cache = ((int)0);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  unsigned char const *__pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_reset = __pyx_optional_args->reset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cache = __pyx_optional_args->cache;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10BlobHeader_23ParseFromString)) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 811, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 811, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 811, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 811, __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(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 811, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_size);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 3+__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, 811, __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, 811, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":827
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         if reset:
 */
  __pyx_t_9 = (__pyx_v_size != Py_None);
  if ((__pyx_t_9 != 0)) {
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 827, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 827, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_11;
  }
  __pyx_v_length = __pyx_t_7;

  /* "pyrosm_proto.pyx":829
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_9 = (__pyx_v_reset != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":830
 * 
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":829
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":832
 *             self.reset()
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_12 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 832, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_12, __pyx_v_length, __pyx_v_cache);

  /* "pyrosm_proto.pyx":834
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  __pyx_t_9 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "pyrosm_proto.pyx":835
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message")             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s_Truncated_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Truncated_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __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, 835, __pyx_L1_error)

    /* "pyrosm_proto.pyx":834
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  }

  /* "pyrosm_proto.pyx":837
 *             raise DecodeError("Truncated message")
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":839
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  __pyx_t_9 = (__pyx_v_cache != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":840
 * 
 *         if cache:
 *             self._cached_serialization = data             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) __PYX_ERR(0, 840, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":839
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  }

  /* "pyrosm_proto.pyx":842
 *             self._cached_serialization = data
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":811
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_23ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_22ParseFromString[] = "\n        Populate the message class from a string of protobuf encoded binary data.\n\n        Params:\n            data (bytes): a string of binary data\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n            cache (bool): optional - whether to cache serialized data\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_23ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_v_reset;
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,&__pyx_n_s_cache,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromString") < 0)) __PYX_ERR(0, 811, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    if (values[2]) {
      __pyx_v_reset = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 811, __pyx_L3_error)
    } else {
      __pyx_v_reset = ((int)1);
    }
    if (values[3]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 811, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromString", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 811, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_22ParseFromString(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset, __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_22ParseFromString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_ParseFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.reset = __pyx_v_reset;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_BlobHeader->ParseFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 811, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":845
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_25FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_25FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FromString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_24FromString(((PyTypeObject*)__pyx_v_cls), ((PyObject *)__pyx_v_s));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_24FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("FromString", 0);

  /* "pyrosm_proto.pyx":846
 *     @classmethod
 *     def FromString(cls, s):
 *         message = cls()             # <<<<<<<<<<<<<<
 *         message.MergeFromString(s)
 *         return message
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":847
 *     def FromString(cls, s):
 *         message = cls()
 *         message.MergeFromString(s)             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __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;

  /* "pyrosm_proto.pyx":848
 *         message = cls()
 *         message.MergeFromString(s)
 *         return message             # <<<<<<<<<<<<<<
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":845
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.FromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":850
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         # type
 *         cdef bytes type_bytes
 */

static void __pyx_f_12pyrosm_proto_10BlobHeader__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_buf, CYTHON_UNUSED int __pyx_v_cache) {
  PyObject *__pyx_v_type_bytes = 0;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  __Pyx_RefNannySetupContext("_protobuf_serialize", 0);
  __Pyx_INCREF(__pyx_v_buf);

  /* "pyrosm_proto.pyx":853
 *         # type
 *         cdef bytes type_bytes
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             type_bytes = self._type.encode('utf-8')
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":854
 *         cdef bytes type_bytes
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(10, buf)             # <<<<<<<<<<<<<<
 *             type_bytes = self._type.encode('utf-8')
 *             set_varint64(len(type_bytes), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(10, __pyx_v_buf));

    /* "pyrosm_proto.pyx":855
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(10, buf)
 *             type_bytes = self._type.encode('utf-8')             # <<<<<<<<<<<<<<
 *             set_varint64(len(type_bytes), buf)
 *             buf += type_bytes
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_type, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 855, __pyx_L1_error)
    __pyx_v_type_bytes = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":856
 *             set_varint64(10, buf)
 *             type_bytes = self._type.encode('utf-8')
 *             set_varint64(len(type_bytes), buf)             # <<<<<<<<<<<<<<
 *             buf += type_bytes
 *         # indexdata
 */
    if (unlikely(__pyx_v_type_bytes == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 856, __pyx_L1_error)
    }
    __pyx_t_5 = PyBytes_GET_SIZE(__pyx_v_type_bytes); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 856, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_5, __pyx_v_buf));

    /* "pyrosm_proto.pyx":857
 *             type_bytes = self._type.encode('utf-8')
 *             set_varint64(len(type_bytes), buf)
 *             buf += type_bytes             # <<<<<<<<<<<<<<
 *         # indexdata
 *         if self.__field_bitmap0 & 2 == 2:
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_type_bytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":853
 *         # type
 *         cdef bytes type_bytes
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             type_bytes = self._type.encode('utf-8')
 */
  }

  /* "pyrosm_proto.pyx":859
 *             buf += type_bytes
 *         # indexdata
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             set_varint64(18, buf)
 *             set_varint64(len(self._indexdata), buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":860
 *         # indexdata
 *         if self.__field_bitmap0 & 2 == 2:
 *             set_varint64(18, buf)             # <<<<<<<<<<<<<<
 *             set_varint64(len(self._indexdata), buf)
 *             buf += self._indexdata
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(18, __pyx_v_buf));

    /* "pyrosm_proto.pyx":861
 *         if self.__field_bitmap0 & 2 == 2:
 *             set_varint64(18, buf)
 *             set_varint64(len(self._indexdata), buf)             # <<<<<<<<<<<<<<
 *             buf += self._indexdata
 *         # datasize
 */
    __pyx_t_2 = __pyx_v_self->_indexdata;
    __Pyx_INCREF(__pyx_t_2);
    if (unlikely(__pyx_t_2 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 861, __pyx_L1_error)
    }
    __pyx_t_5 = PyBytes_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 861, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_5, __pyx_v_buf));

    /* "pyrosm_proto.pyx":862
 *             set_varint64(18, buf)
 *             set_varint64(len(self._indexdata), buf)
 *             buf += self._indexdata             # <<<<<<<<<<<<<<
 *         # datasize
 *         if self.__field_bitmap0 & 4 == 4:
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_self->_indexdata); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":859
 *             buf += type_bytes
 *         # indexdata
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             set_varint64(18, buf)
 *             set_varint64(len(self._indexdata), buf)
 */
  }

  /* "pyrosm_proto.pyx":864
 *             buf += self._indexdata
 *         # datasize
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             set_varint64(24, buf)
 *             set_varint32(self._datasize, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":865
 *         # datasize
 *         if self.__field_bitmap0 & 4 == 4:
 *             set_varint64(24, buf)             # <<<<<<<<<<<<<<
 *             set_varint32(self._datasize, buf)
 * 
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(24, __pyx_v_buf));

    /* "pyrosm_proto.pyx":866
 *         if self.__field_bitmap0 & 4 == 4:
 *             set_varint64(24, buf)
 *             set_varint32(self._datasize, buf)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void _Modified(self):
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_self->_datasize, __pyx_v_buf));

    /* "pyrosm_proto.pyx":864
 *             buf += self._indexdata
 *         # datasize
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             set_varint64(24, buf)
 *             set_varint32(self._datasize, buf)
 */
  }

  /* "pyrosm_proto.pyx":850
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         # type
 *         cdef bytes type_bytes
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pyrosm_proto.BlobHeader._protobuf_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_type_bytes);
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_RefNannyFinishContext();
}

/* "pyrosm_proto.pyx":868
 *             set_varint32(self._datasize, buf)
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_27_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_10BlobHeader__Modified(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Modified); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10BlobHeader_27_Modified)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":869
 * 
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":870
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()             # <<<<<<<<<<<<<<
 *         self._cached_serialization = None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_listener), __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 870, __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;

  /* "pyrosm_proto.pyx":871
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
  __Pyx_DECREF(__pyx_v_self->_cached_serialization);
  __pyx_v_self->_cached_serialization = ((PyObject*)Py_None);

  /* "pyrosm_proto.pyx":868
 *             set_varint32(self._datasize, buf)
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.BlobHeader._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_27_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_27_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_Modified (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_26_Modified(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_26_Modified(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10BlobHeader__Modified(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __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("pyrosm_proto.BlobHeader._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":873
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_29SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_10BlobHeader_SerializeToString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_SerializeToString *__pyx_optional_args) {
  int __pyx_v_cache = ((int)0);
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_out = 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;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cache = __pyx_optional_args->cache;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 873, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10BlobHeader_29SerializeToString)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 873, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 873, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":882
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 */
  __pyx_t_6 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":883
 * 
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'type' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __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, 883, __pyx_L1_error)

    /* "pyrosm_proto.pyx":882
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 */
  }

  /* "pyrosm_proto.pyx":884
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 * 
 */
  __pyx_t_6 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) != 4) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":885
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'datasize' not initialized and does not have default")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __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, 885, __pyx_L1_error)

    /* "pyrosm_proto.pyx":884
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 * 
 */
  }

  /* "pyrosm_proto.pyx":887
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_6 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":888
 * 
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":887
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":890
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":891
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)             # <<<<<<<<<<<<<<
 *         cdef bytes out = bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, __pyx_v_cache);

  /* "pyrosm_proto.pyx":892
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":894
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  __pyx_t_7 = (__pyx_v_cache != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":895
 * 
 *         if cache:
 *             self._cached_serialization = out             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = __pyx_v_out;

    /* "pyrosm_proto.pyx":894
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  }

  /* "pyrosm_proto.pyx":897
 *             self._cached_serialization = out
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializePartialToString(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":873
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.BlobHeader.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_29SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_28SerializeToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_29SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cache,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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SerializeToString") < 0)) __PYX_ERR(0, 873, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("SerializeToString", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 873, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_28SerializeToString(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_28SerializeToString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_SerializeToString __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_BlobHeader->SerializeToString(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 873, __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("pyrosm_proto.BlobHeader.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":899
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_31SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_10BlobHeader_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_buf = 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;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10BlobHeader_31SerializePartialToString)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 899, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":906
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_5 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":907
 *         """
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":906
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":909
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":910
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)             # <<<<<<<<<<<<<<
 *         return bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, 0);

  /* "pyrosm_proto.pyx":911
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *     def SetInParent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":899
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.BlobHeader.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_31SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_30SerializePartialToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_31SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_30SerializePartialToString(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_30SerializePartialToString(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_10BlobHeader_SerializePartialToString(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __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("pyrosm_proto.BlobHeader.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":913
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_33SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_32SetInParent[] = "\n        Mark this an present in the parent.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_33SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_32SetInParent(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_32SetInParent(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent", 0);

  /* "pyrosm_proto.pyx":917
 *         Mark this an present in the parent.
 *         """
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":913
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":919
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_35ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_34ParseFromJson[] = "\n        Populate the message class from a json string.\n\n        Params:\n            data (str): a json string\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_35ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromJson (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromJson") < 0)) __PYX_ERR(0, 919, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    __pyx_v_reset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromJson", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 919, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_34ParseFromJson(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_34ParseFromJson(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("ParseFromJson", 0);
  __Pyx_INCREF(__pyx_v_size);

  /* "pyrosm_proto.pyx":928
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":929
 *         """
 *         if size is None:
 *             size = len(data)             # <<<<<<<<<<<<<<
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 929, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":928
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  }

  /* "pyrosm_proto.pyx":930
 *         if size is None:
 *             size = len(data)
 *         d = json.loads(data[:size])             # <<<<<<<<<<<<<<
 *         self.ParseFromDict(d, reset)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_json); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_d = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":931
 *             size = len(data)
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToJson(self, **kwargs):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 931, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 931, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 931, __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_d);
    __Pyx_GIVEREF(__pyx_v_d);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_d);
    __Pyx_INCREF(__pyx_v_reset);
    __Pyx_GIVEREF(__pyx_v_reset);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_reset);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":919
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":933
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_37SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_36SerializeToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_37SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializeToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializeToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_36SerializeToJson(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_36SerializeToJson(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializeToJson", 0);

  /* "pyrosm_proto.pyx":940
 *             str: a json formatted string
 *         """
 *         d = self.SerializeToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":941
 *         """
 *         d = self.SerializeToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToJson(self, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":933
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.SerializeToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":943
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_39SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_38SerializePartialToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_39SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializePartialToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializePartialToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_38SerializePartialToJson(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_38SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToJson", 0);

  /* "pyrosm_proto.pyx":950
 *             str: a json formatted string
 *         """
 *         d = self.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":951
 *         """
 *         d = self.SerializePartialToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromDict(self, d, reset=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":943
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.SerializePartialToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":953
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_41ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_40ParseFromDict[] = "\n        Populate the message class from a Python dictionary.\n\n        Params:\n            d (dict): a Python dictionary representing the message\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_41ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,&__pyx_n_s_reset,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 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_reset);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromDict") < 0)) __PYX_ERR(0, 953, __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_d = values[0];
    __pyx_v_reset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromDict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 953, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_40ParseFromDict(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), __pyx_v_d, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_40ParseFromDict(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset) {
  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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("ParseFromDict", 0);

  /* "pyrosm_proto.pyx":961
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reset); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 961, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":962
 *         """
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         assert type(d) == dict
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":961
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":964
 *             self.reset()
 * 
 *         assert type(d) == dict             # <<<<<<<<<<<<<<
 *         try:
 *             self.type = d["type"]
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_d)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 964, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 964, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 964, __pyx_L1_error)
    }
  }
  #endif

  /* "pyrosm_proto.pyx":965
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.type = d["type"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":966
 *         assert type(d) == dict
 *         try:
 *             self.type = d["type"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 966, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type, __pyx_t_2) < 0) __PYX_ERR(0, 966, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":965
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.type = d["type"]
 *         except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":967
 *         try:
 *             self.type = d["type"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":965
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.type = d["type"]
 *         except KeyError:
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":969
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.indexdata = base64.b64decode(d["indexdata"].encode('utf-8'))
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":970
 *             pass
 *         try:
 *             self.indexdata = base64.b64decode(d["indexdata"].encode('utf-8'))             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_base64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 970, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_b64decode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 970, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_indexdata); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 970, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_encode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 970, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_kp_s_utf_8);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 970, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 970, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_indexdata, __pyx_t_2) < 0) __PYX_ERR(0, 970, __pyx_L10_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":969
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.indexdata = base64.b64decode(d["indexdata"].encode('utf-8'))
 *         except KeyError:
 */
    }
    __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_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":971
 *         try:
 *             self.indexdata = base64.b64decode(d["indexdata"].encode('utf-8'))
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    goto __pyx_L12_except_error;
    __pyx_L12_except_error:;

    /* "pyrosm_proto.pyx":969
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.indexdata = base64.b64decode(d["indexdata"].encode('utf-8'))
 *         except KeyError:
 */
    __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:;
  }

  /* "pyrosm_proto.pyx":973
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.datasize = d["datasize"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":974
 *             pass
 *         try:
 *             self.datasize = d["datasize"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_datasize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_datasize, __pyx_t_2) < 0) __PYX_ERR(0, 974, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":973
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.datasize = d["datasize"]
 *         except KeyError:
 */
    }
    __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_L21_try_end;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":975
 *         try:
 *             self.datasize = d["datasize"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L17_exception_handled;
    }
    goto __pyx_L18_except_error;
    __pyx_L18_except_error:;

    /* "pyrosm_proto.pyx":973
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.datasize = d["datasize"]
 *         except KeyError:
 */
    __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_L17_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_L21_try_end:;
  }

  /* "pyrosm_proto.pyx":978
 *             pass
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'type' not initialized and does not have default")
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":979
 * 
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrosm_proto.pyx":980
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'type' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 980, __pyx_L1_error)

    /* "pyrosm_proto.pyx":979
 * 
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 */
  }

  /* "pyrosm_proto.pyx":981
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 * 
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) != 4) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrosm_proto.pyx":982
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'datasize' not initialized and does not have default")             # <<<<<<<<<<<<<<
 * 
 *         return
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 982, __pyx_L1_error)

    /* "pyrosm_proto.pyx":981
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 * 
 */
  }

  /* "pyrosm_proto.pyx":984
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 * 
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":953
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":986
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_43SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_42SerializeToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_43SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_42SerializeToDict(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_42SerializeToDict(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("SerializeToDict", 0);

  /* "pyrosm_proto.pyx":993
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'type' not initialized and does not have default")
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":994
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":995
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'type' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __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, 995, __pyx_L1_error)

    /* "pyrosm_proto.pyx":994
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 */
  }

  /* "pyrosm_proto.pyx":996
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) != 4) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":997
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'datasize' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["type"] = self.type
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __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, 997, __pyx_L1_error)

    /* "pyrosm_proto.pyx":996
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 */
  }

  /* "pyrosm_proto.pyx":998
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["type"] = self.type
 *         if self.__field_bitmap0 & 2 == 2:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":999
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["type"] = self.type             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["indexdata"] = base64.b64encode(self.indexdata).decode('utf-8')
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_type, __pyx_t_1) < 0)) __PYX_ERR(0, 999, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":998
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["type"] = self.type
 *         if self.__field_bitmap0 & 2 == 2:
 */
  }

  /* "pyrosm_proto.pyx":1000
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["type"] = self.type
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["indexdata"] = base64.b64encode(self.indexdata).decode('utf-8')
 *         if self.__field_bitmap0 & 4 == 4:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":1001
 *             out["type"] = self.type
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["indexdata"] = base64.b64encode(self.indexdata).decode('utf-8')             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["datasize"] = self.datasize
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_base64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_b64encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_indexdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1001, __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_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_indexdata, __pyx_t_1) < 0)) __PYX_ERR(0, 1001, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":1000
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["type"] = self.type
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["indexdata"] = base64.b64encode(self.indexdata).decode('utf-8')
 *         if self.__field_bitmap0 & 4 == 4:
 */
  }

  /* "pyrosm_proto.pyx":1002
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["indexdata"] = base64.b64encode(self.indexdata).decode('utf-8')
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["datasize"] = self.datasize
 * 
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":1003
 *             out["indexdata"] = base64.b64encode(self.indexdata).decode('utf-8')
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["datasize"] = self.datasize             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_datasize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_datasize, __pyx_t_1) < 0)) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":1002
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["indexdata"] = base64.b64encode(self.indexdata).decode('utf-8')
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["datasize"] = self.datasize
 * 
 */
  }

  /* "pyrosm_proto.pyx":1005
 *             out["datasize"] = self.datasize
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":986
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.SerializeToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1007
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_45SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_44SerializePartialToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_45SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_44SerializePartialToDict(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_44SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToDict", 0);

  /* "pyrosm_proto.pyx":1014
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["type"] = self.type
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1015
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["type"] = self.type
 *         if self.__field_bitmap0 & 2 == 2:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":1016
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["type"] = self.type             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["indexdata"] = base64.b64encode(self.indexdata).decode('utf-8')
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_type, __pyx_t_1) < 0)) __PYX_ERR(0, 1016, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":1015
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["type"] = self.type
 *         if self.__field_bitmap0 & 2 == 2:
 */
  }

  /* "pyrosm_proto.pyx":1017
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["type"] = self.type
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["indexdata"] = base64.b64encode(self.indexdata).decode('utf-8')
 *         if self.__field_bitmap0 & 4 == 4:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":1018
 *             out["type"] = self.type
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["indexdata"] = base64.b64encode(self.indexdata).decode('utf-8')             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["datasize"] = self.datasize
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_base64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_b64encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_indexdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1018, __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_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_indexdata, __pyx_t_1) < 0)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":1017
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["type"] = self.type
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["indexdata"] = base64.b64encode(self.indexdata).decode('utf-8')
 *         if self.__field_bitmap0 & 4 == 4:
 */
  }

  /* "pyrosm_proto.pyx":1019
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["indexdata"] = base64.b64encode(self.indexdata).decode('utf-8')
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["datasize"] = self.datasize
 * 
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":1020
 *             out["indexdata"] = base64.b64encode(self.indexdata).decode('utf-8')
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["datasize"] = self.datasize             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_datasize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_datasize, __pyx_t_1) < 0)) __PYX_ERR(0, 1020, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":1019
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["indexdata"] = base64.b64encode(self.indexdata).decode('utf-8')
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["datasize"] = self.datasize
 * 
 */
  }

  /* "pyrosm_proto.pyx":1022
 *             out["datasize"] = self.datasize
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def Items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1007
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.SerializePartialToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_10BlobHeader_48generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":1024
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_47Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_46Items[] = "\n        Iterator over the field names and values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_47Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_46Items(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_46Items(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_4_Items(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_4_Items, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1024, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_10BlobHeader_48generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Items, __pyx_n_s_BlobHeader_Items, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 1024, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_10BlobHeader_48generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1024, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1031
 *             iterator
 *         """
 *         yield 'type', self.type             # <<<<<<<<<<<<<<
 *         yield 'indexdata', self.indexdata
 *         yield 'datasize', self.datasize
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_type);
  __Pyx_GIVEREF(__pyx_n_s_type);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_type);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1031, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1032
 *         """
 *         yield 'type', self.type
 *         yield 'indexdata', self.indexdata             # <<<<<<<<<<<<<<
 *         yield 'datasize', self.datasize
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_indexdata); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_indexdata);
  __Pyx_GIVEREF(__pyx_n_s_indexdata);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_indexdata);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1032, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1033
 *         yield 'type', self.type
 *         yield 'indexdata', self.indexdata
 *         yield 'datasize', self.datasize             # <<<<<<<<<<<<<<
 * 
 *     def Fields(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_datasize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_datasize);
  __Pyx_GIVEREF(__pyx_n_s_datasize);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_datasize);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1033, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":1024
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_10BlobHeader_51generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":1035
 *         yield 'datasize', self.datasize
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_50Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_49Fields[] = "\n        Iterator over the field names of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_50Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_49Fields(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_49Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_5_Fields(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_5_Fields, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1035, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_10BlobHeader_51generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Fields, __pyx_n_s_BlobHeader_Fields, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 1035, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_10BlobHeader_51generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1035, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1042
 *             iterator
 *         """
 *         yield 'type'             # <<<<<<<<<<<<<<
 *         yield 'indexdata'
 *         yield 'datasize'
 */
  __Pyx_INCREF(__pyx_n_s_type);
  __pyx_r = __pyx_n_s_type;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1042, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1043
 *         """
 *         yield 'type'
 *         yield 'indexdata'             # <<<<<<<<<<<<<<
 *         yield 'datasize'
 * 
 */
  __Pyx_INCREF(__pyx_n_s_indexdata);
  __pyx_r = __pyx_n_s_indexdata;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1043, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1044
 *         yield 'type'
 *         yield 'indexdata'
 *         yield 'datasize'             # <<<<<<<<<<<<<<
 * 
 *     def Values(self):
 */
  __Pyx_INCREF(__pyx_n_s_datasize);
  __pyx_r = __pyx_n_s_datasize;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1044, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":1035
 *         yield 'datasize', self.datasize
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_10BlobHeader_54generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":1046
 *         yield 'datasize'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_53Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_52Values[] = "\n        Iterator over the values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_53Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_52Values(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_52Values(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_6_Values(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_6_Values, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1046, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_10BlobHeader_54generator6, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Values, __pyx_n_s_BlobHeader_Values, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 1046, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_10BlobHeader_54generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1046, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1053
 *             iterator
 *         """
 *         yield self.type             # <<<<<<<<<<<<<<
 *         yield self.indexdata
 *         yield self.datasize
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1053, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1054
 *         """
 *         yield self.type
 *         yield self.indexdata             # <<<<<<<<<<<<<<
 *         yield self.datasize
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_indexdata); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1054, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1055
 *         yield self.type
 *         yield self.indexdata
 *         yield self.datasize             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_datasize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1055, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":1046
 *         yield 'datasize'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_10BlobHeader_57generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":1059
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_56Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10BlobHeader_55Setters[] = "\n        Iterator over functions to set the fields in a message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_56Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_55Setters(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_55Setters(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_7_Setters(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_7_Setters, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1059, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_10BlobHeader_57generator7, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Setters, __pyx_n_s_BlobHeader_Setters, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 1059, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.Setters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1066
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.type = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_10BlobHeader_7Setters_1setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_7Setters_1setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_7Setters_setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":1067
 *         """
 *         def setter(value):
 *             self.type = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1067, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_type, __pyx_v_value) < 0) __PYX_ERR(0, 1067, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1066
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.type = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1069
 *             self.type = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.indexdata = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_10BlobHeader_7Setters_3setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_7Setters_3setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_7Setters_2setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":1070
 *         yield setter
 *         def setter(value):
 *             self.indexdata = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1070, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_indexdata, __pyx_v_value) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1069
 *             self.type = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.indexdata = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1072
 *             self.indexdata = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.datasize = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_10BlobHeader_7Setters_5setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_7Setters_5setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_7Setters_4setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":1073
 *         yield setter
 *         def setter(value):
 *             self.datasize = value             # <<<<<<<<<<<<<<
 *         yield setter
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1073, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_datasize, __pyx_v_value) < 0) __PYX_ERR(0, 1073, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1072
 *             self.indexdata = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.datasize = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1059
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

static PyObject *__pyx_gb_12pyrosm_proto_10BlobHeader_57generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1059, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1066
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.type = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_10BlobHeader_7Setters_1setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_setter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1068
 *         def setter(value):
 *             self.type = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.indexdata = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1068, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1069
 *             self.type = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.indexdata = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_10BlobHeader_7Setters_3setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1071
 *         def setter(value):
 *             self.indexdata = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.datasize = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1071, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1072
 *             self.indexdata = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.datasize = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_10BlobHeader_7Setters_5setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1074
 *         def setter(value):
 *             self.datasize = value
 *         yield setter             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1074, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":1059
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

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

/* "pyrosm_proto.pxd":56
 *     cdef uint64_t __field_bitmap0
 * 
 *     cdef public bint _is_present_in_parent             # <<<<<<<<<<<<<<
 *     cdef bytes _cached_serialization
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_21_is_present_in_parent___get__(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_present_in_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __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("pyrosm_proto.BlobHeader._is_present_in_parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10BlobHeader_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_10BlobHeader_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10BlobHeader_21_is_present_in_parent_2__set__(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_10BlobHeader_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 56, __pyx_L1_error)
  __pyx_v_self->_is_present_in_parent = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader._is_present_in_parent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_59__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_59__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_12pyrosm_proto_10BlobHeader_58__reduce_cython__(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_58__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_61__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10BlobHeader_61__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_12pyrosm_proto_10BlobHeader_60__setstate_cython__(((struct __pyx_obj_12pyrosm_proto_BlobHeader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_12pyrosm_proto_10BlobHeader_60__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_BlobHeader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.BlobHeader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1081
 * cdef class HeaderBlock:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock___cinit__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static int __pyx_pf_12pyrosm_proto_11HeaderBlock___cinit__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrosm_proto.pyx":1082
 * 
 *     def __cinit__(self):
 *         self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

  /* "pyrosm_proto.pyx":1081
 * cdef class HeaderBlock:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

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

/* "pyrosm_proto.pyx":1084
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._bbox is not None:
 */

/* Python wrapper */
static void __pyx_pw_12pyrosm_proto_11HeaderBlock_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrosm_proto_11HeaderBlock_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrosm_proto_11HeaderBlock_2__dealloc__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static void __pyx_pf_12pyrosm_proto_11HeaderBlock_2__dealloc__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrosm_proto.pyx":1086
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._bbox is not None:             # <<<<<<<<<<<<<<
 *             self._bbox._listener = <PyObject *>null_listener
 *         if self._required_features is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_bbox) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":1087
 *         # Remove any references to self from child messages or repeated fields
 *         if self._bbox is not None:
 *             self._bbox._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._required_features is not None:
 *             self._required_features._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_bbox->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":1086
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._bbox is not None:             # <<<<<<<<<<<<<<
 *             self._bbox._listener = <PyObject *>null_listener
 *         if self._required_features is not None:
 */
  }

  /* "pyrosm_proto.pyx":1088
 *         if self._bbox is not None:
 *             self._bbox._listener = <PyObject *>null_listener
 *         if self._required_features is not None:             # <<<<<<<<<<<<<<
 *             self._required_features._listener = <PyObject *>null_listener
 *         if self._optional_features is not None:
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_required_features) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":1089
 *             self._bbox._listener = <PyObject *>null_listener
 *         if self._required_features is not None:
 *             self._required_features._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._optional_features is not None:
 *             self._optional_features._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_required_features->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":1088
 *         if self._bbox is not None:
 *             self._bbox._listener = <PyObject *>null_listener
 *         if self._required_features is not None:             # <<<<<<<<<<<<<<
 *             self._required_features._listener = <PyObject *>null_listener
 *         if self._optional_features is not None:
 */
  }

  /* "pyrosm_proto.pyx":1090
 *         if self._required_features is not None:
 *             self._required_features._listener = <PyObject *>null_listener
 *         if self._optional_features is not None:             # <<<<<<<<<<<<<<
 *             self._optional_features._listener = <PyObject *>null_listener
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_optional_features) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":1091
 *             self._required_features._listener = <PyObject *>null_listener
 *         if self._optional_features is not None:
 *             self._optional_features._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, **kwargs):
 */
    __pyx_v_self->_optional_features->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":1090
 *         if self._required_features is not None:
 *             self._required_features._listener = <PyObject *>null_listener
 *         if self._optional_features is not None:             # <<<<<<<<<<<<<<
 *             self._optional_features._listener = <PyObject *>null_listener
 * 
 */
  }

  /* "pyrosm_proto.pyx":1084
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._bbox is not None:
 */

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

/* "pyrosm_proto.pyx":1093
 *             self._optional_features._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_4__init__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), __pyx_v_kwargs);

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

static int __pyx_pf_12pyrosm_proto_11HeaderBlock_4__init__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_field_name = NULL;
  PyObject *__pyx_v_field_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrosm_proto.pyx":1094
 * 
 *     def __init__(self, **kwargs):
 *         self.reset()             # <<<<<<<<<<<<<<
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1095
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1095, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":1096
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('bbox',):
 */
    __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1096, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1096, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1096, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1096, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 1096, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1096, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1096, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1096, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1096, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 1096, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":1097
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('bbox',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "pyrosm_proto.pyx":1098
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('bbox',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('required_features','optional_features',):
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_bbox, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1098, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_13 = (__pyx_t_1 != 0);
          if (__pyx_t_13) {

            /* "pyrosm_proto.pyx":1099
 *                 try:
 *                     if field_name in ('bbox',):
 *                         getattr(self, field_name).MergeFrom(field_value)             # <<<<<<<<<<<<<<
 *                     elif field_name in ('required_features','optional_features',):
 *                         getattr(self, field_name).extend(field_value)
 */
            __pyx_t_7 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1099, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1099, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_7 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_7)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1099, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":1098
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('bbox',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('required_features','optional_features',):
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":1100
 *                     if field_name in ('bbox',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('required_features','optional_features',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_required_features, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1100, __pyx_L8_error)
          if (!__pyx_t_1) {
          } else {
            __pyx_t_13 = __pyx_t_1;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_optional_features, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1100, __pyx_L8_error)
          __pyx_t_13 = __pyx_t_1;
          __pyx_L17_bool_binop_done:;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_1 = (__pyx_t_13 != 0);
          if (__pyx_t_1) {

            /* "pyrosm_proto.pyx":1101
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('required_features','optional_features',):
 *                         getattr(self, field_name).extend(field_value)             # <<<<<<<<<<<<<<
 *                     else:
 *                         setattr(self, field_name, field_value)
 */
            __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1101, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_extend); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1101, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
              __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
              if (likely(__pyx_t_6)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_7, function);
              }
            }
            __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":1100
 *                     if field_name in ('bbox',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('required_features','optional_features',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":1103
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 *                         setattr(self, field_name, field_value)             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 */
          /*else*/ {
            __pyx_t_14 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name, __pyx_v_field_value); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1103, __pyx_L8_error)
          }
          __pyx_L16:;

          /* "pyrosm_proto.pyx":1097
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('bbox',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L15_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrosm_proto.pyx":1104
 *                     else:
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return
 */
        __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_15) {
          __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 1104, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_6);

          /* "pyrosm_proto.pyx":1105
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))             # <<<<<<<<<<<<<<
 *         return
 * 
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1105, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_field_name);
          __Pyx_GIVEREF(__pyx_v_field_name);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_field_name);
          __pyx_t_16 = __Pyx_PyString_Format(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1105, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1105, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 1105, __pyx_L10_except_error)
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;

        /* "pyrosm_proto.pyx":1097
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('bbox',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L15_try_end:;
      }

      /* "pyrosm_proto.pyx":1096
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('bbox',):
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1095
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  }

  /* "pyrosm_proto.pyx":1106
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1093
 *             self._optional_features._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XDECREF(__pyx_v_field_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1108
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'required_features',
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_6__str__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_6__str__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_messages = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyrosm_proto.pyx":1109
 * 
 *     def __str__(self):
 *         fields = [             # <<<<<<<<<<<<<<
 *                           'required_features',
 *                           'optional_features',
 */
  __pyx_t_1 = PyList_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_required_features);
  __Pyx_GIVEREF(__pyx_n_s_required_features);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_required_features);
  __Pyx_INCREF(__pyx_n_s_optional_features);
  __Pyx_GIVEREF(__pyx_n_s_optional_features);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_optional_features);
  __Pyx_INCREF(__pyx_n_s_writingprogram);
  __Pyx_GIVEREF(__pyx_n_s_writingprogram);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_writingprogram);
  __Pyx_INCREF(__pyx_n_s_source);
  __Pyx_GIVEREF(__pyx_n_s_source);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_source);
  __Pyx_INCREF(__pyx_n_s_osmosis_replication_timestamp);
  __Pyx_GIVEREF(__pyx_n_s_osmosis_replication_timestamp);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_osmosis_replication_timestamp);
  __Pyx_INCREF(__pyx_n_s_osmosis_replication_sequence_num);
  __Pyx_GIVEREF(__pyx_n_s_osmosis_replication_sequence_num);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_osmosis_replication_sequence_num);
  __Pyx_INCREF(__pyx_n_s_osmosis_replication_base_url);
  __Pyx_GIVEREF(__pyx_n_s_osmosis_replication_base_url);
  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_osmosis_replication_base_url);
  __pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1117
 *                           'osmosis_replication_sequence_number',
 *                           'osmosis_replication_base_url',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]             # <<<<<<<<<<<<<<
 *         messages = [
 *                             'bbox',]
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1117, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1117, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1117, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1117, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1118
 *                           'osmosis_replication_base_url',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = [             # <<<<<<<<<<<<<<
 *                             'bbox',]
 *         for message in messages:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_bbox);
  __Pyx_GIVEREF(__pyx_n_s_bbox);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_bbox);
  __pyx_v_messages = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1120
 *         messages = [
 *                             'bbox',]
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  __pyx_t_1 = __pyx_v_messages; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1120, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":1121
 *                             'bbox',]
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))             # <<<<<<<<<<<<<<
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":1122
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    __pyx_t_4 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1122, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1122, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1122, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1122, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":1123
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))             # <<<<<<<<<<<<<<
 *             components.append('}')
 *         return '\n'.join(components)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_line);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1123, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":1122
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":1124
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 *             components.append('}')             # <<<<<<<<<<<<<<
 *         return '\n'.join(components)
 * 
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_kp_s__2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1124, __pyx_L1_error)

    /* "pyrosm_proto.pyx":1120
 *         messages = [
 *                             'bbox',]
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1125
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 *         return '\n'.join(components)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1108
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'required_features',
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_messages);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1127
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_11HeaderBlock_reset(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("reset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11HeaderBlock_9reset)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1127, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":1130
 *         # reset values and populate defaults
 * 
 *         self.__field_bitmap0 = 0             # <<<<<<<<<<<<<<
 * 
 *         if self._bbox is not None:
 */
  __pyx_v_self->__pyx___field_bitmap0 = 0;

  /* "pyrosm_proto.pyx":1132
 *         self.__field_bitmap0 = 0
 * 
 *         if self._bbox is not None:             # <<<<<<<<<<<<<<
 *             self._bbox._listener = <PyObject *>null_listener
 *         self._bbox = None
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_bbox) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":1133
 * 
 *         if self._bbox is not None:
 *             self._bbox._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._bbox = None
 *         if self._required_features is not None:
 */
    __pyx_v_self->_bbox->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":1132
 *         self.__field_bitmap0 = 0
 * 
 *         if self._bbox is not None:             # <<<<<<<<<<<<<<
 *             self._bbox._listener = <PyObject *>null_listener
 *         self._bbox = None
 */
  }

  /* "pyrosm_proto.pyx":1134
 *         if self._bbox is not None:
 *             self._bbox._listener = <PyObject *>null_listener
 *         self._bbox = None             # <<<<<<<<<<<<<<
 *         if self._required_features is not None:
 *             self._required_features._listener = <PyObject *>null_listener
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_bbox);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_bbox));
  __pyx_v_self->_bbox = ((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)Py_None);

  /* "pyrosm_proto.pyx":1135
 *             self._bbox._listener = <PyObject *>null_listener
 *         self._bbox = None
 *         if self._required_features is not None:             # <<<<<<<<<<<<<<
 *             self._required_features._listener = <PyObject *>null_listener
 *         self._required_features = StringList.__new__(StringList)
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_required_features) != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":1136
 *         self._bbox = None
 *         if self._required_features is not None:
 *             self._required_features._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._required_features = StringList.__new__(StringList)
 *         self._required_features._listener = <PyObject *>self
 */
    __pyx_v_self->_required_features->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":1135
 *             self._bbox._listener = <PyObject *>null_listener
 *         self._bbox = None
 *         if self._required_features is not None:             # <<<<<<<<<<<<<<
 *             self._required_features._listener = <PyObject *>null_listener
 *         self._required_features = StringList.__new__(StringList)
 */
  }

  /* "pyrosm_proto.pyx":1137
 *         if self._required_features is not None:
 *             self._required_features._listener = <PyObject *>null_listener
 *         self._required_features = StringList.__new__(StringList)             # <<<<<<<<<<<<<<
 *         self._required_features._listener = <PyObject *>self
 *         if self._optional_features is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_StringList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_StringList)))) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_required_features);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_required_features));
  __pyx_v_self->_required_features = ((struct __pyx_obj_12pyrobuf_list_StringList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1138
 *             self._required_features._listener = <PyObject *>null_listener
 *         self._required_features = StringList.__new__(StringList)
 *         self._required_features._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._optional_features is not None:
 *             self._optional_features._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_required_features->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":1139
 *         self._required_features = StringList.__new__(StringList)
 *         self._required_features._listener = <PyObject *>self
 *         if self._optional_features is not None:             # <<<<<<<<<<<<<<
 *             self._optional_features._listener = <PyObject *>null_listener
 *         self._optional_features = StringList.__new__(StringList)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_optional_features) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":1140
 *         self._required_features._listener = <PyObject *>self
 *         if self._optional_features is not None:
 *             self._optional_features._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._optional_features = StringList.__new__(StringList)
 *         self._optional_features._listener = <PyObject *>self
 */
    __pyx_v_self->_optional_features->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":1139
 *         self._required_features = StringList.__new__(StringList)
 *         self._required_features._listener = <PyObject *>self
 *         if self._optional_features is not None:             # <<<<<<<<<<<<<<
 *             self._optional_features._listener = <PyObject *>null_listener
 *         self._optional_features = StringList.__new__(StringList)
 */
  }

  /* "pyrosm_proto.pyx":1141
 *         if self._optional_features is not None:
 *             self._optional_features._listener = <PyObject *>null_listener
 *         self._optional_features = StringList.__new__(StringList)             # <<<<<<<<<<<<<<
 *         self._optional_features._listener = <PyObject *>self
 *         self._writingprogram = ""
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_StringList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_StringList)))) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_optional_features);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_optional_features));
  __pyx_v_self->_optional_features = ((struct __pyx_obj_12pyrobuf_list_StringList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1142
 *             self._optional_features._listener = <PyObject *>null_listener
 *         self._optional_features = StringList.__new__(StringList)
 *         self._optional_features._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         self._writingprogram = ""
 *         self._source = ""
 */
  __pyx_v_self->_optional_features->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":1143
 *         self._optional_features = StringList.__new__(StringList)
 *         self._optional_features._listener = <PyObject *>self
 *         self._writingprogram = ""             # <<<<<<<<<<<<<<
 *         self._source = ""
 *         self._osmosis_replication_timestamp = 0
 */
  __Pyx_INCREF(__pyx_kp_s__3);
  __Pyx_GIVEREF(__pyx_kp_s__3);
  __Pyx_GOTREF(__pyx_v_self->_writingprogram);
  __Pyx_DECREF(__pyx_v_self->_writingprogram);
  __pyx_v_self->_writingprogram = __pyx_kp_s__3;

  /* "pyrosm_proto.pyx":1144
 *         self._optional_features._listener = <PyObject *>self
 *         self._writingprogram = ""
 *         self._source = ""             # <<<<<<<<<<<<<<
 *         self._osmosis_replication_timestamp = 0
 *         self._osmosis_replication_sequence_number = 0
 */
  __Pyx_INCREF(__pyx_kp_s__3);
  __Pyx_GIVEREF(__pyx_kp_s__3);
  __Pyx_GOTREF(__pyx_v_self->_source);
  __Pyx_DECREF(__pyx_v_self->_source);
  __pyx_v_self->_source = __pyx_kp_s__3;

  /* "pyrosm_proto.pyx":1145
 *         self._writingprogram = ""
 *         self._source = ""
 *         self._osmosis_replication_timestamp = 0             # <<<<<<<<<<<<<<
 *         self._osmosis_replication_sequence_number = 0
 *         self._osmosis_replication_base_url = ""
 */
  __pyx_v_self->_osmosis_replication_timestamp = 0;

  /* "pyrosm_proto.pyx":1146
 *         self._source = ""
 *         self._osmosis_replication_timestamp = 0
 *         self._osmosis_replication_sequence_number = 0             # <<<<<<<<<<<<<<
 *         self._osmosis_replication_base_url = ""
 *         return
 */
  __pyx_v_self->_osmosis_replication_sequence_number = 0;

  /* "pyrosm_proto.pyx":1147
 *         self._osmosis_replication_timestamp = 0
 *         self._osmosis_replication_sequence_number = 0
 *         self._osmosis_replication_base_url = ""             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __Pyx_INCREF(__pyx_kp_s__3);
  __Pyx_GIVEREF(__pyx_kp_s__3);
  __Pyx_GOTREF(__pyx_v_self->_osmosis_replication_base_url);
  __Pyx_DECREF(__pyx_v_self->_osmosis_replication_base_url);
  __pyx_v_self->_osmosis_replication_base_url = __pyx_kp_s__3;

  /* "pyrosm_proto.pyx":1148
 *         self._osmosis_replication_sequence_number = 0
 *         self._osmosis_replication_base_url = ""
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1127
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

  /* 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_WriteUnraisable("pyrosm_proto.HeaderBlock.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_8reset(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_8reset(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_11HeaderBlock_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __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("pyrosm_proto.HeaderBlock.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1152
 * 
 *     @property
 *     def bbox(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._bbox is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_4bbox_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_4bbox_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_4bbox___get__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_4bbox___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":1154
 *     def bbox(self):
 *         # lazy init sub messages
 *         if self._bbox is None:             # <<<<<<<<<<<<<<
 *             self._bbox = HeaderBBox.__new__(HeaderBBox)
 *             self._bbox.reset()
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_bbox) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":1155
 *         # lazy init sub messages
 *         if self._bbox is None:
 *             self._bbox = HeaderBBox.__new__(HeaderBBox)             # <<<<<<<<<<<<<<
 *             self._bbox.reset()
 *             self._bbox._listener = <PyObject *>self
 */
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_HeaderBBox(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_HeaderBBox), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1155, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __Pyx_GOTREF(__pyx_v_self->_bbox);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_bbox));
    __pyx_v_self->_bbox = ((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1156
 *         if self._bbox is None:
 *             self._bbox = HeaderBBox.__new__(HeaderBBox)
 *             self._bbox.reset()             # <<<<<<<<<<<<<<
 *             self._bbox._listener = <PyObject *>self
 *         return self._bbox
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->_bbox->__pyx_vtab)->reset(__pyx_v_self->_bbox, 0);

    /* "pyrosm_proto.pyx":1157
 *             self._bbox = HeaderBBox.__new__(HeaderBBox)
 *             self._bbox.reset()
 *             self._bbox._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return self._bbox
 * 
 */
    __pyx_v_self->_bbox->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":1154
 *     def bbox(self):
 *         # lazy init sub messages
 *         if self._bbox is None:             # <<<<<<<<<<<<<<
 *             self._bbox = HeaderBBox.__new__(HeaderBBox)
 *             self._bbox.reset()
 */
  }

  /* "pyrosm_proto.pyx":1158
 *             self._bbox.reset()
 *             self._bbox._listener = <PyObject *>self
 *         return self._bbox             # <<<<<<<<<<<<<<
 * 
 *     @bbox.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_bbox));
  __pyx_r = ((PyObject *)__pyx_v_self->_bbox);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1152
 * 
 *     @property
 *     def bbox(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._bbox is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.bbox.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1161
 * 
 *     @bbox.setter
 *     def bbox(self, value):             # <<<<<<<<<<<<<<
 *         if self._bbox is not None:
 *             self._bbox._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_4bbox_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_4bbox_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_4bbox_2__set__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_11HeaderBlock_4bbox_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":1162
 *     @bbox.setter
 *     def bbox(self, value):
 *         if self._bbox is not None:             # <<<<<<<<<<<<<<
 *             self._bbox._listener = <PyObject *>null_listener
 *         self._bbox = value
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_bbox) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":1163
 *     def bbox(self, value):
 *         if self._bbox is not None:
 *             self._bbox._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._bbox = value
 *         self._bbox._listener = <PyObject *>self
 */
    __pyx_v_self->_bbox->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":1162
 *     @bbox.setter
 *     def bbox(self, value):
 *         if self._bbox is not None:             # <<<<<<<<<<<<<<
 *             self._bbox._listener = <PyObject *>null_listener
 *         self._bbox = value
 */
  }

  /* "pyrosm_proto.pyx":1164
 *         if self._bbox is not None:
 *             self._bbox._listener = <PyObject *>null_listener
 *         self._bbox = value             # <<<<<<<<<<<<<<
 *         self._bbox._listener = <PyObject *>self
 *         self._Modified()
 */
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_12pyrosm_proto_HeaderBBox))))) __PYX_ERR(0, 1164, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_bbox);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_bbox));
  __pyx_v_self->_bbox = ((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":1165
 *             self._bbox._listener = <PyObject *>null_listener
 *         self._bbox = value
 *         self._bbox._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_v_self->_bbox->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":1166
 *         self._bbox = value
 *         self._bbox._listener = <PyObject *>self
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1161
 * 
 *     @bbox.setter
 *     def bbox(self, value):             # <<<<<<<<<<<<<<
 *         if self._bbox is not None:
 *             self._bbox._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.bbox.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1169
 * 
 *     @property
 *     def required_features(self):             # <<<<<<<<<<<<<<
 *         return self._required_features
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_17required_features_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_17required_features_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_17required_features___get__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_17required_features___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":1170
 *     @property
 *     def required_features(self):
 *         return self._required_features             # <<<<<<<<<<<<<<
 * 
 *     @required_features.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_required_features));
  __pyx_r = ((PyObject *)__pyx_v_self->_required_features);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1169
 * 
 *     @property
 *     def required_features(self):             # <<<<<<<<<<<<<<
 *         return self._required_features
 * 
 */

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

/* "pyrosm_proto.pyx":1173
 * 
 *     @required_features.setter
 *     def required_features(self, value):             # <<<<<<<<<<<<<<
 *         if self._required_features is not None:
 *             self._required_features._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_17required_features_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_17required_features_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_17required_features_2__set__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_11HeaderBlock_17required_features_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":1174
 *     @required_features.setter
 *     def required_features(self, value):
 *         if self._required_features is not None:             # <<<<<<<<<<<<<<
 *             self._required_features._listener = <PyObject *>null_listener
 *         self._required_features = StringList.__new__(StringList)
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_required_features) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":1175
 *     def required_features(self, value):
 *         if self._required_features is not None:
 *             self._required_features._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._required_features = StringList.__new__(StringList)
 *         self._required_features._listener = <PyObject *>self
 */
    __pyx_v_self->_required_features->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":1174
 *     @required_features.setter
 *     def required_features(self, value):
 *         if self._required_features is not None:             # <<<<<<<<<<<<<<
 *             self._required_features._listener = <PyObject *>null_listener
 *         self._required_features = StringList.__new__(StringList)
 */
  }

  /* "pyrosm_proto.pyx":1176
 *         if self._required_features is not None:
 *             self._required_features._listener = <PyObject *>null_listener
 *         self._required_features = StringList.__new__(StringList)             # <<<<<<<<<<<<<<
 *         self._required_features._listener = <PyObject *>self
 *         for val in value:
 */
  __pyx_t_3 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_StringList), __pyx_empty_tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_12pyrobuf_list_StringList)))) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_required_features);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_required_features));
  __pyx_v_self->_required_features = ((struct __pyx_obj_12pyrobuf_list_StringList *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":1177
 *             self._required_features._listener = <PyObject *>null_listener
 *         self._required_features = StringList.__new__(StringList)
 *         self._required_features._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         for val in value:
 *             if isinstance(val, bytes):
 */
  __pyx_v_self->_required_features->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":1178
 *         self._required_features = StringList.__new__(StringList)
 *         self._required_features._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             if isinstance(val, bytes):
 *                 list.append(self._required_features, val.decode('utf-8'))
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1178, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1178, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1178, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1178, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1178, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1178, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pyrosm_proto.pyx":1179
 *         self._required_features._listener = <PyObject *>self
 *         for val in value:
 *             if isinstance(val, bytes):             # <<<<<<<<<<<<<<
 *                 list.append(self._required_features, val.decode('utf-8'))
 *             elif isinstance(val, str):
 */
    __pyx_t_2 = PyBytes_Check(__pyx_v_val); 
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "pyrosm_proto.pyx":1180
 *         for val in value:
 *             if isinstance(val, bytes):
 *                 list.append(self._required_features, val.decode('utf-8'))             # <<<<<<<<<<<<<<
 *             elif isinstance(val, str):
 *                 list.append(self._required_features, val)
 */
      if (unlikely(((PyObject *)__pyx_v_self->_required_features) == Py_None)) {
        PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
        __PYX_ERR(0, 1180, __pyx_L1_error)
      }
      __pyx_t_6 = ((PyObject *)__pyx_v_self->_required_features);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_decode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_s_utf_8);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(((PyObject*)__pyx_t_6), __pyx_t_7); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1180, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":1179
 *         self._required_features._listener = <PyObject *>self
 *         for val in value:
 *             if isinstance(val, bytes):             # <<<<<<<<<<<<<<
 *                 list.append(self._required_features, val.decode('utf-8'))
 *             elif isinstance(val, str):
 */
      goto __pyx_L6;
    }

    /* "pyrosm_proto.pyx":1181
 *             if isinstance(val, bytes):
 *                 list.append(self._required_features, val.decode('utf-8'))
 *             elif isinstance(val, str):             # <<<<<<<<<<<<<<
 *                 list.append(self._required_features, val)
 *             else:
 */
    __pyx_t_1 = PyString_Check(__pyx_v_val); 
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (likely(__pyx_t_2)) {

      /* "pyrosm_proto.pyx":1182
 *                 list.append(self._required_features, val.decode('utf-8'))
 *             elif isinstance(val, str):
 *                 list.append(self._required_features, val)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (val, type(val), bytes, str))
 */
      if (unlikely(((PyObject *)__pyx_v_self->_required_features) == Py_None)) {
        PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
        __PYX_ERR(0, 1182, __pyx_L1_error)
      }
      __pyx_t_7 = ((PyObject *)__pyx_v_self->_required_features);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_10 = __Pyx_PyList_Append(((PyObject*)__pyx_t_7), __pyx_v_val); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1182, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":1181
 *             if isinstance(val, bytes):
 *                 list.append(self._required_features, val.decode('utf-8'))
 *             elif isinstance(val, str):             # <<<<<<<<<<<<<<
 *                 list.append(self._required_features, val)
 *             else:
 */
      goto __pyx_L6;
    }

    /* "pyrosm_proto.pyx":1184
 *                 list.append(self._required_features, val)
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (val, type(val), bytes, str))             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    /*else*/ {
      __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_val);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_val)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_val)));
      PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)Py_TYPE(__pyx_v_val)));
      __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
      PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)(&PyBytes_Type)));
      __Pyx_INCREF(((PyObject *)(&PyString_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
      PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)(&PyString_Type)));
      __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 1184, __pyx_L1_error)
    }
    __pyx_L6:;

    /* "pyrosm_proto.pyx":1178
 *         self._required_features = StringList.__new__(StringList)
 *         self._required_features._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             if isinstance(val, bytes):
 *                 list.append(self._required_features, val.decode('utf-8'))
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":1185
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (val, type(val), bytes, str))
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1173
 * 
 *     @required_features.setter
 *     def required_features(self, value):             # <<<<<<<<<<<<<<
 *         if self._required_features is not None:
 *             self._required_features._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.required_features.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1188
 * 
 *     @property
 *     def optional_features(self):             # <<<<<<<<<<<<<<
 *         return self._optional_features
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_17optional_features_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_17optional_features_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_17optional_features___get__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_17optional_features___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":1189
 *     @property
 *     def optional_features(self):
 *         return self._optional_features             # <<<<<<<<<<<<<<
 * 
 *     @optional_features.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_optional_features));
  __pyx_r = ((PyObject *)__pyx_v_self->_optional_features);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1188
 * 
 *     @property
 *     def optional_features(self):             # <<<<<<<<<<<<<<
 *         return self._optional_features
 * 
 */

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

/* "pyrosm_proto.pyx":1192
 * 
 *     @optional_features.setter
 *     def optional_features(self, value):             # <<<<<<<<<<<<<<
 *         if self._optional_features is not None:
 *             self._optional_features._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_17optional_features_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_17optional_features_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_17optional_features_2__set__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_11HeaderBlock_17optional_features_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":1193
 *     @optional_features.setter
 *     def optional_features(self, value):
 *         if self._optional_features is not None:             # <<<<<<<<<<<<<<
 *             self._optional_features._listener = <PyObject *>null_listener
 *         self._optional_features = StringList.__new__(StringList)
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_optional_features) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":1194
 *     def optional_features(self, value):
 *         if self._optional_features is not None:
 *             self._optional_features._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._optional_features = StringList.__new__(StringList)
 *         self._optional_features._listener = <PyObject *>self
 */
    __pyx_v_self->_optional_features->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":1193
 *     @optional_features.setter
 *     def optional_features(self, value):
 *         if self._optional_features is not None:             # <<<<<<<<<<<<<<
 *             self._optional_features._listener = <PyObject *>null_listener
 *         self._optional_features = StringList.__new__(StringList)
 */
  }

  /* "pyrosm_proto.pyx":1195
 *         if self._optional_features is not None:
 *             self._optional_features._listener = <PyObject *>null_listener
 *         self._optional_features = StringList.__new__(StringList)             # <<<<<<<<<<<<<<
 *         self._optional_features._listener = <PyObject *>self
 *         for val in value:
 */
  __pyx_t_3 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_StringList), __pyx_empty_tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_12pyrobuf_list_StringList)))) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_optional_features);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_optional_features));
  __pyx_v_self->_optional_features = ((struct __pyx_obj_12pyrobuf_list_StringList *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":1196
 *             self._optional_features._listener = <PyObject *>null_listener
 *         self._optional_features = StringList.__new__(StringList)
 *         self._optional_features._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         for val in value:
 *             if isinstance(val, bytes):
 */
  __pyx_v_self->_optional_features->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":1197
 *         self._optional_features = StringList.__new__(StringList)
 *         self._optional_features._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             if isinstance(val, bytes):
 *                 list.append(self._optional_features, val.decode('utf-8'))
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1197, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1197, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1197, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1197, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1197, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1197, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pyrosm_proto.pyx":1198
 *         self._optional_features._listener = <PyObject *>self
 *         for val in value:
 *             if isinstance(val, bytes):             # <<<<<<<<<<<<<<
 *                 list.append(self._optional_features, val.decode('utf-8'))
 *             elif isinstance(val, str):
 */
    __pyx_t_2 = PyBytes_Check(__pyx_v_val); 
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "pyrosm_proto.pyx":1199
 *         for val in value:
 *             if isinstance(val, bytes):
 *                 list.append(self._optional_features, val.decode('utf-8'))             # <<<<<<<<<<<<<<
 *             elif isinstance(val, str):
 *                 list.append(self._optional_features, val)
 */
      if (unlikely(((PyObject *)__pyx_v_self->_optional_features) == Py_None)) {
        PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
        __PYX_ERR(0, 1199, __pyx_L1_error)
      }
      __pyx_t_6 = ((PyObject *)__pyx_v_self->_optional_features);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_decode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_s_utf_8);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(((PyObject*)__pyx_t_6), __pyx_t_7); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1199, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":1198
 *         self._optional_features._listener = <PyObject *>self
 *         for val in value:
 *             if isinstance(val, bytes):             # <<<<<<<<<<<<<<
 *                 list.append(self._optional_features, val.decode('utf-8'))
 *             elif isinstance(val, str):
 */
      goto __pyx_L6;
    }

    /* "pyrosm_proto.pyx":1200
 *             if isinstance(val, bytes):
 *                 list.append(self._optional_features, val.decode('utf-8'))
 *             elif isinstance(val, str):             # <<<<<<<<<<<<<<
 *                 list.append(self._optional_features, val)
 *             else:
 */
    __pyx_t_1 = PyString_Check(__pyx_v_val); 
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (likely(__pyx_t_2)) {

      /* "pyrosm_proto.pyx":1201
 *                 list.append(self._optional_features, val.decode('utf-8'))
 *             elif isinstance(val, str):
 *                 list.append(self._optional_features, val)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (val, type(val), bytes, str))
 */
      if (unlikely(((PyObject *)__pyx_v_self->_optional_features) == Py_None)) {
        PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
        __PYX_ERR(0, 1201, __pyx_L1_error)
      }
      __pyx_t_7 = ((PyObject *)__pyx_v_self->_optional_features);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_10 = __Pyx_PyList_Append(((PyObject*)__pyx_t_7), __pyx_v_val); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1201, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":1200
 *             if isinstance(val, bytes):
 *                 list.append(self._optional_features, val.decode('utf-8'))
 *             elif isinstance(val, str):             # <<<<<<<<<<<<<<
 *                 list.append(self._optional_features, val)
 *             else:
 */
      goto __pyx_L6;
    }

    /* "pyrosm_proto.pyx":1203
 *                 list.append(self._optional_features, val)
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (val, type(val), bytes, str))             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    /*else*/ {
      __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1203, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_val);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_val)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_val)));
      PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)Py_TYPE(__pyx_v_val)));
      __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
      PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)(&PyBytes_Type)));
      __Pyx_INCREF(((PyObject *)(&PyString_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
      PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)(&PyString_Type)));
      __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1203, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1203, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 1203, __pyx_L1_error)
    }
    __pyx_L6:;

    /* "pyrosm_proto.pyx":1197
 *         self._optional_features = StringList.__new__(StringList)
 *         self._optional_features._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             if isinstance(val, bytes):
 *                 list.append(self._optional_features, val.decode('utf-8'))
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":1204
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (val, type(val), bytes, str))
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1192
 * 
 *     @optional_features.setter
 *     def optional_features(self, value):             # <<<<<<<<<<<<<<
 *         if self._optional_features is not None:
 *             self._optional_features._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.optional_features.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1207
 * 
 *     @property
 *     def writingprogram(self):             # <<<<<<<<<<<<<<
 *         return self._writingprogram
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_14writingprogram_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_14writingprogram_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_14writingprogram___get__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_14writingprogram___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":1208
 *     @property
 *     def writingprogram(self):
 *         return self._writingprogram             # <<<<<<<<<<<<<<
 * 
 *     @writingprogram.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_writingprogram);
  __pyx_r = __pyx_v_self->_writingprogram;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1207
 * 
 *     @property
 *     def writingprogram(self):             # <<<<<<<<<<<<<<
 *         return self._writingprogram
 * 
 */

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

/* "pyrosm_proto.pyx":1211
 * 
 *     @writingprogram.setter
 *     def writingprogram(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 32768
 *         if isinstance(value, bytes):
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_14writingprogram_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_14writingprogram_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_14writingprogram_2__set__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_11HeaderBlock_14writingprogram_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":1212
 *     @writingprogram.setter
 *     def writingprogram(self, value):
 *         self.__field_bitmap0 |= 32768             # <<<<<<<<<<<<<<
 *         if isinstance(value, bytes):
 *             self._writingprogram = value.decode('utf-8')
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x8000);

  /* "pyrosm_proto.pyx":1213
 *     def writingprogram(self, value):
 *         self.__field_bitmap0 |= 32768
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._writingprogram = value.decode('utf-8')
 *         elif isinstance(value, str):
 */
  __pyx_t_1 = PyBytes_Check(__pyx_v_value); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":1214
 *         self.__field_bitmap0 |= 32768
 *         if isinstance(value, bytes):
 *             self._writingprogram = value.decode('utf-8')             # <<<<<<<<<<<<<<
 *         elif isinstance(value, str):
 *             self._writingprogram = value
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1214, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_writingprogram);
    __Pyx_DECREF(__pyx_v_self->_writingprogram);
    __pyx_v_self->_writingprogram = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1213
 *     def writingprogram(self, value):
 *         self.__field_bitmap0 |= 32768
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._writingprogram = value.decode('utf-8')
 *         elif isinstance(value, str):
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1215
 *         if isinstance(value, bytes):
 *             self._writingprogram = value.decode('utf-8')
 *         elif isinstance(value, str):             # <<<<<<<<<<<<<<
 *             self._writingprogram = value
 *         else:
 */
  __pyx_t_2 = PyString_Check(__pyx_v_value); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "pyrosm_proto.pyx":1216
 *             self._writingprogram = value.decode('utf-8')
 *         elif isinstance(value, str):
 *             self._writingprogram = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (value, type(value), bytes, str))
 */
    if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1216, __pyx_L1_error)
    __pyx_t_3 = __pyx_v_value;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_writingprogram);
    __Pyx_DECREF(__pyx_v_self->_writingprogram);
    __pyx_v_self->_writingprogram = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1215
 *         if isinstance(value, bytes):
 *             self._writingprogram = value.decode('utf-8')
 *         elif isinstance(value, str):             # <<<<<<<<<<<<<<
 *             self._writingprogram = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1218
 *             self._writingprogram = value
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (value, type(value), bytes, str))             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  /*else*/ {
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_3, 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_3, 1, ((PyObject *)Py_TYPE(__pyx_v_value)));
    __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)(&PyBytes_Type)));
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 3, ((PyObject *)(&PyString_Type)));
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1218, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":1219
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (value, type(value), bytes, str))
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1211
 * 
 *     @writingprogram.setter
 *     def writingprogram(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 32768
 *         if isinstance(value, bytes):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.writingprogram.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1222
 * 
 *     @property
 *     def source(self):             # <<<<<<<<<<<<<<
 *         return self._source
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_6source_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_6source_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_6source___get__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_6source___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":1223
 *     @property
 *     def source(self):
 *         return self._source             # <<<<<<<<<<<<<<
 * 
 *     @source.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_source);
  __pyx_r = __pyx_v_self->_source;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1222
 * 
 *     @property
 *     def source(self):             # <<<<<<<<<<<<<<
 *         return self._source
 * 
 */

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

/* "pyrosm_proto.pyx":1226
 * 
 *     @source.setter
 *     def source(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 65536
 *         if isinstance(value, bytes):
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_6source_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_6source_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_6source_2__set__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_11HeaderBlock_6source_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":1227
 *     @source.setter
 *     def source(self, value):
 *         self.__field_bitmap0 |= 65536             # <<<<<<<<<<<<<<
 *         if isinstance(value, bytes):
 *             self._source = value.decode('utf-8')
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x10000);

  /* "pyrosm_proto.pyx":1228
 *     def source(self, value):
 *         self.__field_bitmap0 |= 65536
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._source = value.decode('utf-8')
 *         elif isinstance(value, str):
 */
  __pyx_t_1 = PyBytes_Check(__pyx_v_value); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":1229
 *         self.__field_bitmap0 |= 65536
 *         if isinstance(value, bytes):
 *             self._source = value.decode('utf-8')             # <<<<<<<<<<<<<<
 *         elif isinstance(value, str):
 *             self._source = value
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_source);
    __Pyx_DECREF(__pyx_v_self->_source);
    __pyx_v_self->_source = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1228
 *     def source(self, value):
 *         self.__field_bitmap0 |= 65536
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._source = value.decode('utf-8')
 *         elif isinstance(value, str):
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1230
 *         if isinstance(value, bytes):
 *             self._source = value.decode('utf-8')
 *         elif isinstance(value, str):             # <<<<<<<<<<<<<<
 *             self._source = value
 *         else:
 */
  __pyx_t_2 = PyString_Check(__pyx_v_value); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "pyrosm_proto.pyx":1231
 *             self._source = value.decode('utf-8')
 *         elif isinstance(value, str):
 *             self._source = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (value, type(value), bytes, str))
 */
    if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1231, __pyx_L1_error)
    __pyx_t_3 = __pyx_v_value;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_source);
    __Pyx_DECREF(__pyx_v_self->_source);
    __pyx_v_self->_source = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1230
 *         if isinstance(value, bytes):
 *             self._source = value.decode('utf-8')
 *         elif isinstance(value, str):             # <<<<<<<<<<<<<<
 *             self._source = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1233
 *             self._source = value
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (value, type(value), bytes, str))             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  /*else*/ {
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_3, 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_3, 1, ((PyObject *)Py_TYPE(__pyx_v_value)));
    __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)(&PyBytes_Type)));
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 3, ((PyObject *)(&PyString_Type)));
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1233, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":1234
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (value, type(value), bytes, str))
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1226
 * 
 *     @source.setter
 *     def source(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 65536
 *         if isinstance(value, bytes):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.source.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1237
 * 
 *     @property
 *     def osmosis_replication_timestamp(self):             # <<<<<<<<<<<<<<
 *         return self._osmosis_replication_timestamp
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_29osmosis_replication_timestamp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_29osmosis_replication_timestamp_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_29osmosis_replication_timestamp___get__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_29osmosis_replication_timestamp___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":1238
 *     @property
 *     def osmosis_replication_timestamp(self):
 *         return self._osmosis_replication_timestamp             # <<<<<<<<<<<<<<
 * 
 *     @osmosis_replication_timestamp.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_osmosis_replication_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1237
 * 
 *     @property
 *     def osmosis_replication_timestamp(self):             # <<<<<<<<<<<<<<
 *         return self._osmosis_replication_timestamp
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.osmosis_replication_timestamp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1241
 * 
 *     @osmosis_replication_timestamp.setter
 *     def osmosis_replication_timestamp(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 2147483648
 *         self._osmosis_replication_timestamp = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_29osmosis_replication_timestamp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_29osmosis_replication_timestamp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_29osmosis_replication_timestamp_2__set__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_11HeaderBlock_29osmosis_replication_timestamp_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  uint64_t __pyx_t_3;
  int64_t __pyx_t_4;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":1242
 *     @osmosis_replication_timestamp.setter
 *     def osmosis_replication_timestamp(self, value):
 *         self.__field_bitmap0 |= 2147483648             # <<<<<<<<<<<<<<
 *         self._osmosis_replication_timestamp = value
 *         self._Modified()
 */
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_InPlaceOr(__pyx_t_1, __pyx_int_2147483648); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1242, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->__pyx___field_bitmap0 = __pyx_t_3;

  /* "pyrosm_proto.pyx":1243
 *     def osmosis_replication_timestamp(self, value):
 *         self.__field_bitmap0 |= 2147483648
 *         self._osmosis_replication_timestamp = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_4 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1243, __pyx_L1_error)
  __pyx_v_self->_osmosis_replication_timestamp = __pyx_t_4;

  /* "pyrosm_proto.pyx":1244
 *         self.__field_bitmap0 |= 2147483648
 *         self._osmosis_replication_timestamp = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1241
 * 
 *     @osmosis_replication_timestamp.setter
 *     def osmosis_replication_timestamp(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 2147483648
 *         self._osmosis_replication_timestamp = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.osmosis_replication_timestamp.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1247
 * 
 *     @property
 *     def osmosis_replication_sequence_number(self):             # <<<<<<<<<<<<<<
 *         return self._osmosis_replication_sequence_number
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_35osmosis_replication_sequence_number_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_35osmosis_replication_sequence_number_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_35osmosis_replication_sequence_number___get__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_35osmosis_replication_sequence_number___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":1248
 *     @property
 *     def osmosis_replication_sequence_number(self):
 *         return self._osmosis_replication_sequence_number             # <<<<<<<<<<<<<<
 * 
 *     @osmosis_replication_sequence_number.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_osmosis_replication_sequence_number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1247
 * 
 *     @property
 *     def osmosis_replication_sequence_number(self):             # <<<<<<<<<<<<<<
 *         return self._osmosis_replication_sequence_number
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.osmosis_replication_sequence_number.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1251
 * 
 *     @osmosis_replication_sequence_number.setter
 *     def osmosis_replication_sequence_number(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 4294967296
 *         self._osmosis_replication_sequence_number = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_35osmosis_replication_sequence_number_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_35osmosis_replication_sequence_number_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_35osmosis_replication_sequence_number_2__set__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_11HeaderBlock_35osmosis_replication_sequence_number_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  uint64_t __pyx_t_3;
  int64_t __pyx_t_4;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":1252
 *     @osmosis_replication_sequence_number.setter
 *     def osmosis_replication_sequence_number(self, value):
 *         self.__field_bitmap0 |= 4294967296             # <<<<<<<<<<<<<<
 *         self._osmosis_replication_sequence_number = value
 *         self._Modified()
 */
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_InPlaceOr(__pyx_t_1, __pyx_int_4294967296); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->__pyx___field_bitmap0 = __pyx_t_3;

  /* "pyrosm_proto.pyx":1253
 *     def osmosis_replication_sequence_number(self, value):
 *         self.__field_bitmap0 |= 4294967296
 *         self._osmosis_replication_sequence_number = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_4 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1253, __pyx_L1_error)
  __pyx_v_self->_osmosis_replication_sequence_number = __pyx_t_4;

  /* "pyrosm_proto.pyx":1254
 *         self.__field_bitmap0 |= 4294967296
 *         self._osmosis_replication_sequence_number = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1251
 * 
 *     @osmosis_replication_sequence_number.setter
 *     def osmosis_replication_sequence_number(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 4294967296
 *         self._osmosis_replication_sequence_number = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.osmosis_replication_sequence_number.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1257
 * 
 *     @property
 *     def osmosis_replication_base_url(self):             # <<<<<<<<<<<<<<
 *         return self._osmosis_replication_base_url
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_28osmosis_replication_base_url_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_28osmosis_replication_base_url_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_28osmosis_replication_base_url___get__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_28osmosis_replication_base_url___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":1258
 *     @property
 *     def osmosis_replication_base_url(self):
 *         return self._osmosis_replication_base_url             # <<<<<<<<<<<<<<
 * 
 *     @osmosis_replication_base_url.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_osmosis_replication_base_url);
  __pyx_r = __pyx_v_self->_osmosis_replication_base_url;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1257
 * 
 *     @property
 *     def osmosis_replication_base_url(self):             # <<<<<<<<<<<<<<
 *         return self._osmosis_replication_base_url
 * 
 */

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

/* "pyrosm_proto.pyx":1261
 * 
 *     @osmosis_replication_base_url.setter
 *     def osmosis_replication_base_url(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 8589934592
 *         if isinstance(value, bytes):
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_28osmosis_replication_base_url_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_28osmosis_replication_base_url_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_28osmosis_replication_base_url_2__set__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_11HeaderBlock_28osmosis_replication_base_url_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  uint64_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":1262
 *     @osmosis_replication_base_url.setter
 *     def osmosis_replication_base_url(self, value):
 *         self.__field_bitmap0 |= 8589934592             # <<<<<<<<<<<<<<
 *         if isinstance(value, bytes):
 *             self._osmosis_replication_base_url = value.decode('utf-8')
 */
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_InPlaceOr(__pyx_t_1, __pyx_int_8589934592); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->__pyx___field_bitmap0 = __pyx_t_3;

  /* "pyrosm_proto.pyx":1263
 *     def osmosis_replication_base_url(self, value):
 *         self.__field_bitmap0 |= 8589934592
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._osmosis_replication_base_url = value.decode('utf-8')
 *         elif isinstance(value, str):
 */
  __pyx_t_4 = PyBytes_Check(__pyx_v_value); 
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":1264
 *         self.__field_bitmap0 |= 8589934592
 *         if isinstance(value, bytes):
 *             self._osmosis_replication_base_url = value.decode('utf-8')             # <<<<<<<<<<<<<<
 *         elif isinstance(value, str):
 *             self._osmosis_replication_base_url = value
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1264, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->_osmosis_replication_base_url);
    __Pyx_DECREF(__pyx_v_self->_osmosis_replication_base_url);
    __pyx_v_self->_osmosis_replication_base_url = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":1263
 *     def osmosis_replication_base_url(self, value):
 *         self.__field_bitmap0 |= 8589934592
 *         if isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *             self._osmosis_replication_base_url = value.decode('utf-8')
 *         elif isinstance(value, str):
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1265
 *         if isinstance(value, bytes):
 *             self._osmosis_replication_base_url = value.decode('utf-8')
 *         elif isinstance(value, str):             # <<<<<<<<<<<<<<
 *             self._osmosis_replication_base_url = value
 *         else:
 */
  __pyx_t_5 = PyString_Check(__pyx_v_value); 
  __pyx_t_4 = (__pyx_t_5 != 0);
  if (likely(__pyx_t_4)) {

    /* "pyrosm_proto.pyx":1266
 *             self._osmosis_replication_base_url = value.decode('utf-8')
 *         elif isinstance(value, str):
 *             self._osmosis_replication_base_url = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (value, type(value), bytes, str))
 */
    if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1266, __pyx_L1_error)
    __pyx_t_2 = __pyx_v_value;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->_osmosis_replication_base_url);
    __Pyx_DECREF(__pyx_v_self->_osmosis_replication_base_url);
    __pyx_v_self->_osmosis_replication_base_url = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":1265
 *         if isinstance(value, bytes):
 *             self._osmosis_replication_base_url = value.decode('utf-8')
 *         elif isinstance(value, str):             # <<<<<<<<<<<<<<
 *             self._osmosis_replication_base_url = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1268
 *             self._osmosis_replication_base_url = value
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (value, type(value), bytes, str))             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  /*else*/ {
    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1268, __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 *)Py_TYPE(__pyx_v_value)));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value)));
    PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)Py_TYPE(__pyx_v_value)));
    __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
    PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)(&PyBytes_Type)));
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)(&PyString_Type)));
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o_2, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1268, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":1269
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (value, type(value), bytes, str))
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1261
 * 
 *     @osmosis_replication_base_url.setter
 *     def osmosis_replication_base_url(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 8589934592
 *         if isinstance(value, bytes):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.osmosis_replication_base_url.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1272
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

static int __pyx_f_12pyrosm_proto_11HeaderBlock__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, int __pyx_v_cache) {
  int __pyx_v_current_offset;
  int64_t __pyx_v_key;
  int64_t __pyx_v_field_size;
  PyObject *__pyx_v_required_features_elt = 0;
  PyObject *__pyx_v_optional_features_elt = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  uint64_t __pyx_t_6;
  __Pyx_RefNannySetupContext("_protobuf_deserialize", 0);

  /* "pyrosm_proto.pyx":1273
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):
 *         cdef int current_offset = 0             # <<<<<<<<<<<<<<
 *         cdef int64_t key
 *         cdef int64_t field_size
 */
  __pyx_v_current_offset = 0;

  /* "pyrosm_proto.pyx":1278
 *         cdef str required_features_elt
 *         cdef str optional_features_elt
 *         while current_offset < size:             # <<<<<<<<<<<<<<
 *             key = get_varint64(memory, &current_offset)
 *             # bbox
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_current_offset < __pyx_v_size) != 0);
    if (!__pyx_t_1) break;

    /* "pyrosm_proto.pyx":1279
 *         cdef str optional_features_elt
 *         while current_offset < size:
 *             key = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # bbox
 *             if key == 10:
 */
    __pyx_v_key = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

    /* "pyrosm_proto.pyx":1281
 *             key = get_varint64(memory, &current_offset)
 *             # bbox
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._bbox is None:
 */
    switch (__pyx_v_key) {
      case 10:

      /* "pyrosm_proto.pyx":1282
 *             # bbox
 *             if key == 10:
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 if self._bbox is None:
 *                     self._bbox = HeaderBBox.__new__(HeaderBBox)
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":1283
 *             if key == 10:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._bbox is None:             # <<<<<<<<<<<<<<
 *                     self._bbox = HeaderBBox.__new__(HeaderBBox)
 *                     self._bbox._listener = <PyObject *>self
 */
      __pyx_t_1 = (((PyObject *)__pyx_v_self->_bbox) == Py_None);
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "pyrosm_proto.pyx":1284
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._bbox is None:
 *                     self._bbox = HeaderBBox.__new__(HeaderBBox)             # <<<<<<<<<<<<<<
 *                     self._bbox._listener = <PyObject *>self
 *                 self._bbox.reset()
 */
        __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_HeaderBBox(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_HeaderBBox), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1284, __pyx_L1_error)
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
        __Pyx_GOTREF(__pyx_v_self->_bbox);
        __Pyx_DECREF(((PyObject *)__pyx_v_self->_bbox));
        __pyx_v_self->_bbox = ((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyrosm_proto.pyx":1285
 *                 if self._bbox is None:
 *                     self._bbox = HeaderBBox.__new__(HeaderBBox)
 *                     self._bbox._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *                 self._bbox.reset()
 *                 if cache:
 */
        __pyx_v_self->_bbox->_listener = ((PyObject *)__pyx_v_self);

        /* "pyrosm_proto.pyx":1283
 *             if key == 10:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._bbox is None:             # <<<<<<<<<<<<<<
 *                     self._bbox = HeaderBBox.__new__(HeaderBBox)
 *                     self._bbox._listener = <PyObject *>self
 */
      }

      /* "pyrosm_proto.pyx":1286
 *                     self._bbox = HeaderBBox.__new__(HeaderBBox)
 *                     self._bbox._listener = <PyObject *>self
 *                 self._bbox.reset()             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     self._bbox._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->_bbox->__pyx_vtab)->reset(__pyx_v_self->_bbox, 0);

      /* "pyrosm_proto.pyx":1287
 *                     self._bbox._listener = <PyObject *>self
 *                 self._bbox.reset()
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._bbox._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._bbox._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      __pyx_t_2 = (__pyx_v_cache != 0);
      if (__pyx_t_2) {

        /* "pyrosm_proto.pyx":1288
 *                 self._bbox.reset()
 *                 if cache:
 *                     self._bbox._cached_serialization = bytes(memory[current_offset:current_offset+field_size])             # <<<<<<<<<<<<<<
 *                 current_offset += self._bbox._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *             # required_features
 */
        __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1288, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1288, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_self->_bbox->_cached_serialization);
        __Pyx_DECREF(__pyx_v_self->_bbox->_cached_serialization);
        __pyx_v_self->_bbox->_cached_serialization = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyrosm_proto.pyx":1287
 *                     self._bbox._listener = <PyObject *>self
 *                 self._bbox.reset()
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._bbox._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._bbox._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      }

      /* "pyrosm_proto.pyx":1289
 *                 if cache:
 *                     self._bbox._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._bbox._protobuf_deserialize(memory+current_offset, <int>field_size, cache)             # <<<<<<<<<<<<<<
 *             # required_features
 *             elif key == 34:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->_bbox->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self->_bbox, (__pyx_v_memory + __pyx_v_current_offset), ((int)__pyx_v_field_size), __pyx_v_cache));

      /* "pyrosm_proto.pyx":1281
 *             key = get_varint64(memory, &current_offset)
 *             # bbox
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._bbox is None:
 */
      break;
      case 34:

      /* "pyrosm_proto.pyx":1292
 *             # required_features
 *             elif key == 34:
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 required_features_elt = str(memory[current_offset:current_offset + field_size], 'utf-8')
 *                 current_offset += <int>field_size
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":1293
 *             elif key == 34:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 required_features_elt = str(memory[current_offset:current_offset + field_size], 'utf-8')             # <<<<<<<<<<<<<<
 *                 current_offset += <int>field_size
 *                 list.append(self._required_features, required_features_elt)
 */
      __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1293, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1293, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
      __Pyx_INCREF(__pyx_kp_s_utf_8);
      __Pyx_GIVEREF(__pyx_kp_s_utf_8);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_utf_8);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1293, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1293, __pyx_L1_error)
      __Pyx_XDECREF_SET(__pyx_v_required_features_elt, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":1294
 *                 field_size = get_varint64(memory, &current_offset)
 *                 required_features_elt = str(memory[current_offset:current_offset + field_size], 'utf-8')
 *                 current_offset += <int>field_size             # <<<<<<<<<<<<<<
 *                 list.append(self._required_features, required_features_elt)
 *             # optional_features
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((int)__pyx_v_field_size));

      /* "pyrosm_proto.pyx":1295
 *                 required_features_elt = str(memory[current_offset:current_offset + field_size], 'utf-8')
 *                 current_offset += <int>field_size
 *                 list.append(self._required_features, required_features_elt)             # <<<<<<<<<<<<<<
 *             # optional_features
 *             elif key == 42:
 */
      if (unlikely(((PyObject *)__pyx_v_self->_required_features) == Py_None)) {
        PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
        __PYX_ERR(0, 1295, __pyx_L1_error)
      }
      __pyx_t_4 = ((PyObject *)__pyx_v_self->_required_features);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyList_Append(((PyObject*)__pyx_t_4), __pyx_v_required_features_elt); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1295, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":1291
 *                 current_offset += self._bbox._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *             # required_features
 *             elif key == 34:             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 required_features_elt = str(memory[current_offset:current_offset + field_size], 'utf-8')
 */
      break;
      case 42:

      /* "pyrosm_proto.pyx":1298
 *             # optional_features
 *             elif key == 42:
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 optional_features_elt = str(memory[current_offset:current_offset + field_size], 'utf-8')
 *                 current_offset += <int>field_size
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":1299
 *             elif key == 42:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 optional_features_elt = str(memory[current_offset:current_offset + field_size], 'utf-8')             # <<<<<<<<<<<<<<
 *                 current_offset += <int>field_size
 *                 list.append(self._optional_features, optional_features_elt)
 */
      __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1299, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1299, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
      __Pyx_INCREF(__pyx_kp_s_utf_8);
      __Pyx_GIVEREF(__pyx_kp_s_utf_8);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_utf_8);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1299, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1299, __pyx_L1_error)
      __Pyx_XDECREF_SET(__pyx_v_optional_features_elt, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":1300
 *                 field_size = get_varint64(memory, &current_offset)
 *                 optional_features_elt = str(memory[current_offset:current_offset + field_size], 'utf-8')
 *                 current_offset += <int>field_size             # <<<<<<<<<<<<<<
 *                 list.append(self._optional_features, optional_features_elt)
 *             # writingprogram
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((int)__pyx_v_field_size));

      /* "pyrosm_proto.pyx":1301
 *                 optional_features_elt = str(memory[current_offset:current_offset + field_size], 'utf-8')
 *                 current_offset += <int>field_size
 *                 list.append(self._optional_features, optional_features_elt)             # <<<<<<<<<<<<<<
 *             # writingprogram
 *             elif key == 130:
 */
      if (unlikely(((PyObject *)__pyx_v_self->_optional_features) == Py_None)) {
        PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
        __PYX_ERR(0, 1301, __pyx_L1_error)
      }
      __pyx_t_4 = ((PyObject *)__pyx_v_self->_optional_features);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyList_Append(((PyObject*)__pyx_t_4), __pyx_v_optional_features_elt); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1301, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":1297
 *                 list.append(self._required_features, required_features_elt)
 *             # optional_features
 *             elif key == 42:             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 optional_features_elt = str(memory[current_offset:current_offset + field_size], 'utf-8')
 */
      break;
      case 0x82:

      /* "pyrosm_proto.pyx":1304
 *             # writingprogram
 *             elif key == 130:
 *                 self.__field_bitmap0 |= 32768             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._writingprogram = str(memory[current_offset:current_offset + field_size], 'utf-8')
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x8000);

      /* "pyrosm_proto.pyx":1305
 *             elif key == 130:
 *                 self.__field_bitmap0 |= 32768
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 self._writingprogram = str(memory[current_offset:current_offset + field_size], 'utf-8')
 *                 current_offset += <int>field_size
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":1306
 *                 self.__field_bitmap0 |= 32768
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._writingprogram = str(memory[current_offset:current_offset + field_size], 'utf-8')             # <<<<<<<<<<<<<<
 *                 current_offset += <int>field_size
 *             # source
 */
      __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1306, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
      __Pyx_INCREF(__pyx_kp_s_utf_8);
      __Pyx_GIVEREF(__pyx_kp_s_utf_8);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_utf_8);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1306, __pyx_L1_error)
      __Pyx_GIVEREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_v_self->_writingprogram);
      __Pyx_DECREF(__pyx_v_self->_writingprogram);
      __pyx_v_self->_writingprogram = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":1307
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._writingprogram = str(memory[current_offset:current_offset + field_size], 'utf-8')
 *                 current_offset += <int>field_size             # <<<<<<<<<<<<<<
 *             # source
 *             elif key == 138:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((int)__pyx_v_field_size));

      /* "pyrosm_proto.pyx":1303
 *                 list.append(self._optional_features, optional_features_elt)
 *             # writingprogram
 *             elif key == 130:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 32768
 *                 field_size = get_varint64(memory, &current_offset)
 */
      break;
      case 0x8A:

      /* "pyrosm_proto.pyx":1310
 *             # source
 *             elif key == 138:
 *                 self.__field_bitmap0 |= 65536             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._source = str(memory[current_offset:current_offset + field_size], 'utf-8')
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x10000);

      /* "pyrosm_proto.pyx":1311
 *             elif key == 138:
 *                 self.__field_bitmap0 |= 65536
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 self._source = str(memory[current_offset:current_offset + field_size], 'utf-8')
 *                 current_offset += <int>field_size
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":1312
 *                 self.__field_bitmap0 |= 65536
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._source = str(memory[current_offset:current_offset + field_size], 'utf-8')             # <<<<<<<<<<<<<<
 *                 current_offset += <int>field_size
 *             # osmosis_replication_timestamp
 */
      __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
      __Pyx_INCREF(__pyx_kp_s_utf_8);
      __Pyx_GIVEREF(__pyx_kp_s_utf_8);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_utf_8);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1312, __pyx_L1_error)
      __Pyx_GIVEREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_v_self->_source);
      __Pyx_DECREF(__pyx_v_self->_source);
      __pyx_v_self->_source = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":1313
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._source = str(memory[current_offset:current_offset + field_size], 'utf-8')
 *                 current_offset += <int>field_size             # <<<<<<<<<<<<<<
 *             # osmosis_replication_timestamp
 *             elif key == 256:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((int)__pyx_v_field_size));

      /* "pyrosm_proto.pyx":1309
 *                 current_offset += <int>field_size
 *             # source
 *             elif key == 138:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 65536
 *                 field_size = get_varint64(memory, &current_offset)
 */
      break;
      case 0x100:

      /* "pyrosm_proto.pyx":1316
 *             # osmosis_replication_timestamp
 *             elif key == 256:
 *                 self.__field_bitmap0 |= 2147483648             # <<<<<<<<<<<<<<
 *                 self._osmosis_replication_timestamp = get_varint64(memory, &current_offset)
 *             # osmosis_replication_sequence_number
 */
      __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1316, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyNumber_InPlaceOr(__pyx_t_4, __pyx_int_2147483648); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1316, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyInt_As_uint64_t(__pyx_t_3); if (unlikely((__pyx_t_6 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_self->__pyx___field_bitmap0 = __pyx_t_6;

      /* "pyrosm_proto.pyx":1317
 *             elif key == 256:
 *                 self.__field_bitmap0 |= 2147483648
 *                 self._osmosis_replication_timestamp = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # osmosis_replication_sequence_number
 *             elif key == 264:
 */
      __pyx_v_self->_osmosis_replication_timestamp = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":1315
 *                 current_offset += <int>field_size
 *             # osmosis_replication_timestamp
 *             elif key == 256:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 2147483648
 *                 self._osmosis_replication_timestamp = get_varint64(memory, &current_offset)
 */
      break;
      case 0x108:

      /* "pyrosm_proto.pyx":1320
 *             # osmosis_replication_sequence_number
 *             elif key == 264:
 *                 self.__field_bitmap0 |= 4294967296             # <<<<<<<<<<<<<<
 *                 self._osmosis_replication_sequence_number = get_varint64(memory, &current_offset)
 *             # osmosis_replication_base_url
 */
      __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyNumber_InPlaceOr(__pyx_t_3, __pyx_int_4294967296); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyInt_As_uint64_t(__pyx_t_4); if (unlikely((__pyx_t_6 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_self->__pyx___field_bitmap0 = __pyx_t_6;

      /* "pyrosm_proto.pyx":1321
 *             elif key == 264:
 *                 self.__field_bitmap0 |= 4294967296
 *                 self._osmosis_replication_sequence_number = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # osmosis_replication_base_url
 *             elif key == 274:
 */
      __pyx_v_self->_osmosis_replication_sequence_number = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":1319
 *                 self._osmosis_replication_timestamp = get_varint64(memory, &current_offset)
 *             # osmosis_replication_sequence_number
 *             elif key == 264:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 4294967296
 *                 self._osmosis_replication_sequence_number = get_varint64(memory, &current_offset)
 */
      break;
      case 0x112:

      /* "pyrosm_proto.pyx":1324
 *             # osmosis_replication_base_url
 *             elif key == 274:
 *                 self.__field_bitmap0 |= 8589934592             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._osmosis_replication_base_url = str(memory[current_offset:current_offset + field_size], 'utf-8')
 */
      __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyNumber_InPlaceOr(__pyx_t_4, __pyx_int_8589934592); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyInt_As_uint64_t(__pyx_t_3); if (unlikely((__pyx_t_6 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1324, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_self->__pyx___field_bitmap0 = __pyx_t_6;

      /* "pyrosm_proto.pyx":1325
 *             elif key == 274:
 *                 self.__field_bitmap0 |= 8589934592
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 self._osmosis_replication_base_url = str(memory[current_offset:current_offset + field_size], 'utf-8')
 *                 current_offset += <int>field_size
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":1326
 *                 self.__field_bitmap0 |= 8589934592
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._osmosis_replication_base_url = str(memory[current_offset:current_offset + field_size], 'utf-8')             # <<<<<<<<<<<<<<
 *                 current_offset += <int>field_size
 *             # Unknown field - need to skip proper number of bytes
 */
      __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1326, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
      __Pyx_INCREF(__pyx_kp_s_utf_8);
      __Pyx_GIVEREF(__pyx_kp_s_utf_8);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_s_utf_8);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1326, __pyx_L1_error)
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_v_self->_osmosis_replication_base_url);
      __Pyx_DECREF(__pyx_v_self->_osmosis_replication_base_url);
      __pyx_v_self->_osmosis_replication_base_url = ((PyObject*)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "pyrosm_proto.pyx":1327
 *                 field_size = get_varint64(memory, &current_offset)
 *                 self._osmosis_replication_base_url = str(memory[current_offset:current_offset + field_size], 'utf-8')
 *                 current_offset += <int>field_size             # <<<<<<<<<<<<<<
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((int)__pyx_v_field_size));

      /* "pyrosm_proto.pyx":1323
 *                 self._osmosis_replication_sequence_number = get_varint64(memory, &current_offset)
 *             # osmosis_replication_base_url
 *             elif key == 274:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 8589934592
 *                 field_size = get_varint64(memory, &current_offset)
 */
      break;
      default:

      /* "pyrosm_proto.pyx":1330
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)             # <<<<<<<<<<<<<<
 * 
 *         self._is_present_in_parent = True
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        if (unlikely(!(__pyx_f_12pyrobuf_util_skip_generic(__pyx_v_memory, (&__pyx_v_current_offset), __pyx_v_size, (__pyx_v_key & 0x7)) != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 1330, __pyx_L1_error)
        }
      }
      #endif
      break;
    }
  }

  /* "pyrosm_proto.pyx":1332
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)
 * 
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 * 
 *         return current_offset
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":1334
 *         self._is_present_in_parent = True
 * 
 *         return current_offset             # <<<<<<<<<<<<<<
 * 
 *     cpdef void Clear(self):
 */
  __pyx_r = __pyx_v_current_offset;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1272
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pyrosm_proto.HeaderBlock._protobuf_deserialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_required_features_elt);
  __Pyx_XDECREF(__pyx_v_optional_features_elt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1336
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_11HeaderBlock_Clear(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11HeaderBlock_11Clear)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1336, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":1338
 *     cpdef void Clear(self):
 *         """Clears all data that was set in the message."""
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1339
 *         """Clears all data that was set in the message."""
 *         self.reset()
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void ClearField(self, field_name):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1336
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.HeaderBlock.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_10Clear[] = "Clears all data that was set in the message.";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Clear (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_10Clear(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_10Clear(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_11HeaderBlock_Clear(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __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("pyrosm_proto.HeaderBlock.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1341
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'bbox':
 */

static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static void __pyx_f_12pyrosm_proto_11HeaderBlock_ClearField(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  uint64_t __pyx_t_7;
  __Pyx_RefNannySetupContext("ClearField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ClearField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11HeaderBlock_13ClearField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":1343
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'bbox':             # <<<<<<<<<<<<<<
 *             if self._bbox is not None:
 *                 self._bbox._listener = <PyObject *>null_listener
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_bbox, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1343, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":1344
 *         """Clears the contents of a given field."""
 *         if field_name == 'bbox':
 *             if self._bbox is not None:             # <<<<<<<<<<<<<<
 *                 self._bbox._listener = <PyObject *>null_listener
 *             self._bbox = None
 */
    __pyx_t_5 = (((PyObject *)__pyx_v_self->_bbox) != Py_None);
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "pyrosm_proto.pyx":1345
 *         if field_name == 'bbox':
 *             if self._bbox is not None:
 *                 self._bbox._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._bbox = None
 *         elif field_name == 'required_features':
 */
      __pyx_v_self->_bbox->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

      /* "pyrosm_proto.pyx":1344
 *         """Clears the contents of a given field."""
 *         if field_name == 'bbox':
 *             if self._bbox is not None:             # <<<<<<<<<<<<<<
 *                 self._bbox._listener = <PyObject *>null_listener
 *             self._bbox = None
 */
    }

    /* "pyrosm_proto.pyx":1346
 *             if self._bbox is not None:
 *                 self._bbox._listener = <PyObject *>null_listener
 *             self._bbox = None             # <<<<<<<<<<<<<<
 *         elif field_name == 'required_features':
 *             self._required_features._listener = <PyObject *>null_listener
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->_bbox);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_bbox));
    __pyx_v_self->_bbox = ((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)Py_None);

    /* "pyrosm_proto.pyx":1343
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'bbox':             # <<<<<<<<<<<<<<
 *             if self._bbox is not None:
 *                 self._bbox._listener = <PyObject *>null_listener
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1347
 *                 self._bbox._listener = <PyObject *>null_listener
 *             self._bbox = None
 *         elif field_name == 'required_features':             # <<<<<<<<<<<<<<
 *             self._required_features._listener = <PyObject *>null_listener
 *             self._required_features = StringList.__new__(StringList)
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_required_features, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1347, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":1348
 *             self._bbox = None
 *         elif field_name == 'required_features':
 *             self._required_features._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._required_features = StringList.__new__(StringList)
 *             self._required_features._listener = <PyObject *>self
 */
    __pyx_v_self->_required_features->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":1349
 *         elif field_name == 'required_features':
 *             self._required_features._listener = <PyObject *>null_listener
 *             self._required_features = StringList.__new__(StringList)             # <<<<<<<<<<<<<<
 *             self._required_features._listener = <PyObject *>self
 *         elif field_name == 'optional_features':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_StringList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_StringList)))) __PYX_ERR(0, 1349, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_required_features);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_required_features));
    __pyx_v_self->_required_features = ((struct __pyx_obj_12pyrobuf_list_StringList *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":1350
 *             self._required_features._listener = <PyObject *>null_listener
 *             self._required_features = StringList.__new__(StringList)
 *             self._required_features._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'optional_features':
 *             self._optional_features._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_required_features->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":1347
 *                 self._bbox._listener = <PyObject *>null_listener
 *             self._bbox = None
 *         elif field_name == 'required_features':             # <<<<<<<<<<<<<<
 *             self._required_features._listener = <PyObject *>null_listener
 *             self._required_features = StringList.__new__(StringList)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1351
 *             self._required_features = StringList.__new__(StringList)
 *             self._required_features._listener = <PyObject *>self
 *         elif field_name == 'optional_features':             # <<<<<<<<<<<<<<
 *             self._optional_features._listener = <PyObject *>null_listener
 *             self._optional_features = StringList.__new__(StringList)
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_optional_features, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1351, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":1352
 *             self._required_features._listener = <PyObject *>self
 *         elif field_name == 'optional_features':
 *             self._optional_features._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._optional_features = StringList.__new__(StringList)
 *             self._optional_features._listener = <PyObject *>self
 */
    __pyx_v_self->_optional_features->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":1353
 *         elif field_name == 'optional_features':
 *             self._optional_features._listener = <PyObject *>null_listener
 *             self._optional_features = StringList.__new__(StringList)             # <<<<<<<<<<<<<<
 *             self._optional_features._listener = <PyObject *>self
 *         elif field_name == 'writingprogram':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_StringList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_StringList)))) __PYX_ERR(0, 1353, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_optional_features);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_optional_features));
    __pyx_v_self->_optional_features = ((struct __pyx_obj_12pyrobuf_list_StringList *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":1354
 *             self._optional_features._listener = <PyObject *>null_listener
 *             self._optional_features = StringList.__new__(StringList)
 *             self._optional_features._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'writingprogram':
 *             self.__field_bitmap0 &= ~32768
 */
    __pyx_v_self->_optional_features->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":1351
 *             self._required_features = StringList.__new__(StringList)
 *             self._required_features._listener = <PyObject *>self
 *         elif field_name == 'optional_features':             # <<<<<<<<<<<<<<
 *             self._optional_features._listener = <PyObject *>null_listener
 *             self._optional_features = StringList.__new__(StringList)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1355
 *             self._optional_features = StringList.__new__(StringList)
 *             self._optional_features._listener = <PyObject *>self
 *         elif field_name == 'writingprogram':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~32768
 *             self._writingprogram = ""
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_writingprogram, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1355, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":1356
 *             self._optional_features._listener = <PyObject *>self
 *         elif field_name == 'writingprogram':
 *             self.__field_bitmap0 &= ~32768             # <<<<<<<<<<<<<<
 *             self._writingprogram = ""
 *         elif field_name == 'source':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~0x8000));

    /* "pyrosm_proto.pyx":1357
 *         elif field_name == 'writingprogram':
 *             self.__field_bitmap0 &= ~32768
 *             self._writingprogram = ""             # <<<<<<<<<<<<<<
 *         elif field_name == 'source':
 *             self.__field_bitmap0 &= ~65536
 */
    __Pyx_INCREF(__pyx_kp_s__3);
    __Pyx_GIVEREF(__pyx_kp_s__3);
    __Pyx_GOTREF(__pyx_v_self->_writingprogram);
    __Pyx_DECREF(__pyx_v_self->_writingprogram);
    __pyx_v_self->_writingprogram = __pyx_kp_s__3;

    /* "pyrosm_proto.pyx":1355
 *             self._optional_features = StringList.__new__(StringList)
 *             self._optional_features._listener = <PyObject *>self
 *         elif field_name == 'writingprogram':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~32768
 *             self._writingprogram = ""
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1358
 *             self.__field_bitmap0 &= ~32768
 *             self._writingprogram = ""
 *         elif field_name == 'source':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~65536
 *             self._source = ""
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_source, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1358, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":1359
 *             self._writingprogram = ""
 *         elif field_name == 'source':
 *             self.__field_bitmap0 &= ~65536             # <<<<<<<<<<<<<<
 *             self._source = ""
 *         elif field_name == 'osmosis_replication_timestamp':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~0x10000));

    /* "pyrosm_proto.pyx":1360
 *         elif field_name == 'source':
 *             self.__field_bitmap0 &= ~65536
 *             self._source = ""             # <<<<<<<<<<<<<<
 *         elif field_name == 'osmosis_replication_timestamp':
 *             self.__field_bitmap0 &= ~2147483648
 */
    __Pyx_INCREF(__pyx_kp_s__3);
    __Pyx_GIVEREF(__pyx_kp_s__3);
    __Pyx_GOTREF(__pyx_v_self->_source);
    __Pyx_DECREF(__pyx_v_self->_source);
    __pyx_v_self->_source = __pyx_kp_s__3;

    /* "pyrosm_proto.pyx":1358
 *             self.__field_bitmap0 &= ~32768
 *             self._writingprogram = ""
 *         elif field_name == 'source':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~65536
 *             self._source = ""
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1361
 *             self.__field_bitmap0 &= ~65536
 *             self._source = ""
 *         elif field_name == 'osmosis_replication_timestamp':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~2147483648
 *             self._osmosis_replication_timestamp = 0
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_osmosis_replication_timestamp, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1361, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":1362
 *             self._source = ""
 *         elif field_name == 'osmosis_replication_timestamp':
 *             self.__field_bitmap0 &= ~2147483648             # <<<<<<<<<<<<<<
 *             self._osmosis_replication_timestamp = 0
 *         elif field_name == 'osmosis_replication_sequence_number':
 */
    __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_Invert(__pyx_int_2147483648); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_InPlaceAnd(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyInt_As_uint64_t(__pyx_t_3); if (unlikely((__pyx_t_7 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1362, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_self->__pyx___field_bitmap0 = __pyx_t_7;

    /* "pyrosm_proto.pyx":1363
 *         elif field_name == 'osmosis_replication_timestamp':
 *             self.__field_bitmap0 &= ~2147483648
 *             self._osmosis_replication_timestamp = 0             # <<<<<<<<<<<<<<
 *         elif field_name == 'osmosis_replication_sequence_number':
 *             self.__field_bitmap0 &= ~4294967296
 */
    __pyx_v_self->_osmosis_replication_timestamp = 0;

    /* "pyrosm_proto.pyx":1361
 *             self.__field_bitmap0 &= ~65536
 *             self._source = ""
 *         elif field_name == 'osmosis_replication_timestamp':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~2147483648
 *             self._osmosis_replication_timestamp = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1364
 *             self.__field_bitmap0 &= ~2147483648
 *             self._osmosis_replication_timestamp = 0
 *         elif field_name == 'osmosis_replication_sequence_number':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~4294967296
 *             self._osmosis_replication_sequence_number = 0
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_osmosis_replication_sequence_num, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1364, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":1365
 *             self._osmosis_replication_timestamp = 0
 *         elif field_name == 'osmosis_replication_sequence_number':
 *             self.__field_bitmap0 &= ~4294967296             # <<<<<<<<<<<<<<
 *             self._osmosis_replication_sequence_number = 0
 *         elif field_name == 'osmosis_replication_base_url':
 */
    __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Invert(__pyx_int_4294967296); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyNumber_InPlaceAnd(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __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_t_7 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_7 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1365, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_self->__pyx___field_bitmap0 = __pyx_t_7;

    /* "pyrosm_proto.pyx":1366
 *         elif field_name == 'osmosis_replication_sequence_number':
 *             self.__field_bitmap0 &= ~4294967296
 *             self._osmosis_replication_sequence_number = 0             # <<<<<<<<<<<<<<
 *         elif field_name == 'osmosis_replication_base_url':
 *             self.__field_bitmap0 &= ~8589934592
 */
    __pyx_v_self->_osmosis_replication_sequence_number = 0;

    /* "pyrosm_proto.pyx":1364
 *             self.__field_bitmap0 &= ~2147483648
 *             self._osmosis_replication_timestamp = 0
 *         elif field_name == 'osmosis_replication_sequence_number':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~4294967296
 *             self._osmosis_replication_sequence_number = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1367
 *             self.__field_bitmap0 &= ~4294967296
 *             self._osmosis_replication_sequence_number = 0
 *         elif field_name == 'osmosis_replication_base_url':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~8589934592
 *             self._osmosis_replication_base_url = ""
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_osmosis_replication_base_url, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1367, __pyx_L1_error)
  if (likely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":1368
 *             self._osmosis_replication_sequence_number = 0
 *         elif field_name == 'osmosis_replication_base_url':
 *             self.__field_bitmap0 &= ~8589934592             # <<<<<<<<<<<<<<
 *             self._osmosis_replication_base_url = ""
 *         else:
 */
    __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_Invert(__pyx_int_8589934592); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_InPlaceAnd(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyInt_As_uint64_t(__pyx_t_3); if (unlikely((__pyx_t_7 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1368, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_self->__pyx___field_bitmap0 = __pyx_t_7;

    /* "pyrosm_proto.pyx":1369
 *         elif field_name == 'osmosis_replication_base_url':
 *             self.__field_bitmap0 &= ~8589934592
 *             self._osmosis_replication_base_url = ""             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 */
    __Pyx_INCREF(__pyx_kp_s__3);
    __Pyx_GIVEREF(__pyx_kp_s__3);
    __Pyx_GOTREF(__pyx_v_self->_osmosis_replication_base_url);
    __Pyx_DECREF(__pyx_v_self->_osmosis_replication_base_url);
    __pyx_v_self->_osmosis_replication_base_url = __pyx_kp_s__3;

    /* "pyrosm_proto.pyx":1367
 *             self.__field_bitmap0 &= ~4294967296
 *             self._osmosis_replication_sequence_number = 0
 *         elif field_name == 'osmosis_replication_base_url':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~8589934592
 *             self._osmosis_replication_base_url = ""
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1371
 *             self._osmosis_replication_base_url = ""
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_v_field_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1371, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":1373
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void CopyFrom(self, HeaderBlock other_msg):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1341
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'bbox':
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.HeaderBlock.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_12ClearField[] = "Clears the contents of a given field.";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ClearField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_12ClearField(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_12ClearField(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ClearField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_11HeaderBlock_ClearField(__pyx_v_self, __pyx_v_field_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __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("pyrosm_proto.HeaderBlock.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1375
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, HeaderBlock other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_11HeaderBlock_CopyFrom(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CopyFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1375, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11HeaderBlock_15CopyFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1375, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":1382
 *             other_msg (HeaderBlock): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":1383
 *         """
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 *         self.reset()
 *         self.MergeFrom(other_msg)
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":1382
 *             other_msg (HeaderBlock): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  }

  /* "pyrosm_proto.pyx":1384
 *         if self is other_msg:
 *             return
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self.MergeFrom(other_msg)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1385
 *             return
 *         self.reset()
 *         self.MergeFrom(other_msg)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint HasField(self, field_name) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->MergeFrom(__pyx_v_self, __pyx_v_other_msg, 0);

  /* "pyrosm_proto.pyx":1375
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, HeaderBlock other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.HeaderBlock.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_14CopyFrom[] = "\n        Copies the content of the specified message into the current message.\n\n        Params:\n            other_msg (HeaderBlock): Message to copy into the current one.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CopyFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_HeaderBlock, 1, "other_msg", 0))) __PYX_ERR(0, 1375, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_14CopyFrom(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_14CopyFrom(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_11HeaderBlock_CopyFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1375, __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("pyrosm_proto.HeaderBlock.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1387
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static int __pyx_f_12pyrosm_proto_11HeaderBlock_HasField(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("HasField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_HasField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11HeaderBlock_17HasField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1387, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1387, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":1394
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'bbox':             # <<<<<<<<<<<<<<
 *             return self._bbox is not None and self._bbox._is_present_in_parent
 *         if field_name == 'writingprogram':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_bbox, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1394, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":1395
 *         """
 *         if field_name == 'bbox':
 *             return self._bbox is not None and self._bbox._is_present_in_parent             # <<<<<<<<<<<<<<
 *         if field_name == 'writingprogram':
 *             return self.__field_bitmap0 & 32768 == 32768
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_bbox) != Py_None);
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_5 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->_bbox->_is_present_in_parent != 0);
    __pyx_t_5 = __pyx_t_7;
    __pyx_L4_bool_binop_done:;
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":1394
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'bbox':             # <<<<<<<<<<<<<<
 *             return self._bbox is not None and self._bbox._is_present_in_parent
 *         if field_name == 'writingprogram':
 */
  }

  /* "pyrosm_proto.pyx":1396
 *         if field_name == 'bbox':
 *             return self._bbox is not None and self._bbox._is_present_in_parent
 *         if field_name == 'writingprogram':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 32768 == 32768
 *         if field_name == 'source':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_writingprogram, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1396, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":1397
 *             return self._bbox is not None and self._bbox._is_present_in_parent
 *         if field_name == 'writingprogram':
 *             return self.__field_bitmap0 & 32768 == 32768             # <<<<<<<<<<<<<<
 *         if field_name == 'source':
 *             return self.__field_bitmap0 & 65536 == 65536
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 0x8000) == 0x8000);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":1396
 *         if field_name == 'bbox':
 *             return self._bbox is not None and self._bbox._is_present_in_parent
 *         if field_name == 'writingprogram':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 32768 == 32768
 *         if field_name == 'source':
 */
  }

  /* "pyrosm_proto.pyx":1398
 *         if field_name == 'writingprogram':
 *             return self.__field_bitmap0 & 32768 == 32768
 *         if field_name == 'source':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 65536 == 65536
 *         if field_name == 'osmosis_replication_timestamp':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_source, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1398, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":1399
 *             return self.__field_bitmap0 & 32768 == 32768
 *         if field_name == 'source':
 *             return self.__field_bitmap0 & 65536 == 65536             # <<<<<<<<<<<<<<
 *         if field_name == 'osmosis_replication_timestamp':
 *             return self.__field_bitmap0 & 2147483648 == 2147483648
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 0x10000) == 0x10000);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":1398
 *         if field_name == 'writingprogram':
 *             return self.__field_bitmap0 & 32768 == 32768
 *         if field_name == 'source':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 65536 == 65536
 *         if field_name == 'osmosis_replication_timestamp':
 */
  }

  /* "pyrosm_proto.pyx":1400
 *         if field_name == 'source':
 *             return self.__field_bitmap0 & 65536 == 65536
 *         if field_name == 'osmosis_replication_timestamp':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 2147483648 == 2147483648
 *         if field_name == 'osmosis_replication_sequence_number':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_osmosis_replication_timestamp, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1400, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":1401
 *             return self.__field_bitmap0 & 65536 == 65536
 *         if field_name == 'osmosis_replication_timestamp':
 *             return self.__field_bitmap0 & 2147483648 == 2147483648             # <<<<<<<<<<<<<<
 *         if field_name == 'osmosis_replication_sequence_number':
 *             return self.__field_bitmap0 & 4294967296 == 4294967296
 */
    __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_2147483648); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_2147483648, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1401, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":1400
 *         if field_name == 'source':
 *             return self.__field_bitmap0 & 65536 == 65536
 *         if field_name == 'osmosis_replication_timestamp':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 2147483648 == 2147483648
 *         if field_name == 'osmosis_replication_sequence_number':
 */
  }

  /* "pyrosm_proto.pyx":1402
 *         if field_name == 'osmosis_replication_timestamp':
 *             return self.__field_bitmap0 & 2147483648 == 2147483648
 *         if field_name == 'osmosis_replication_sequence_number':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 4294967296 == 4294967296
 *         if field_name == 'osmosis_replication_base_url':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_osmosis_replication_sequence_num, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1402, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":1403
 *             return self.__field_bitmap0 & 2147483648 == 2147483648
 *         if field_name == 'osmosis_replication_sequence_number':
 *             return self.__field_bitmap0 & 4294967296 == 4294967296             # <<<<<<<<<<<<<<
 *         if field_name == 'osmosis_replication_base_url':
 *             return self.__field_bitmap0 & 8589934592 == 8589934592
 */
    __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_4294967296); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_4294967296, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1403, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":1402
 *         if field_name == 'osmosis_replication_timestamp':
 *             return self.__field_bitmap0 & 2147483648 == 2147483648
 *         if field_name == 'osmosis_replication_sequence_number':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 4294967296 == 4294967296
 *         if field_name == 'osmosis_replication_base_url':
 */
  }

  /* "pyrosm_proto.pyx":1404
 *         if field_name == 'osmosis_replication_sequence_number':
 *             return self.__field_bitmap0 & 4294967296 == 4294967296
 *         if field_name == 'osmosis_replication_base_url':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 8589934592 == 8589934592
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_osmosis_replication_base_url, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1404, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":1405
 *             return self.__field_bitmap0 & 4294967296 == 4294967296
 *         if field_name == 'osmosis_replication_base_url':
 *             return self.__field_bitmap0 & 8589934592 == 8589934592             # <<<<<<<<<<<<<<
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 */
    __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_8589934592); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_8589934592, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1405, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":1404
 *         if field_name == 'osmosis_replication_sequence_number':
 *             return self.__field_bitmap0 & 4294967296 == 4294967296
 *         if field_name == 'osmosis_replication_base_url':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 8589934592 == 8589934592
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  }

  /* "pyrosm_proto.pyx":1406
 *         if field_name == 'osmosis_replication_base_url':
 *             return self.__field_bitmap0 & 8589934592 == 8589934592
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint IsInitialized(self):
 */
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_singular, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 1406, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1387
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

  /* 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("pyrosm_proto.HeaderBlock.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_16HasField[] = "\n        Checks if a certain field is set for the message.\n\n        Params:\n            field_name (str): The name of the field to check.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_16HasField(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_16HasField(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("HasField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_11HeaderBlock_HasField(__pyx_v_self, __pyx_v_field_name, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1387, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1408
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_12pyrosm_proto_11HeaderBlock_IsInitialized(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_IsInitialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11HeaderBlock_19IsInitialized)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1408, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1408, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":1418
 * 
 * 
 *         if self._bbox is not None and self._bbox._is_present_in_parent and not self._bbox.IsInitialized():             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_bbox) != Py_None);
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_self->_bbox->_is_present_in_parent != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->_bbox->__pyx_vtab)->IsInitialized(__pyx_v_self->_bbox, 0) != 0)) != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":1419
 * 
 *         if self._bbox is not None and self._bbox._is_present_in_parent and not self._bbox.IsInitialized():
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         return True
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":1418
 * 
 * 
 *         if self._bbox is not None and self._bbox._is_present_in_parent and not self._bbox.IsInitialized():             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  }

  /* "pyrosm_proto.pyx":1421
 *             return False
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef void MergeFrom(self, HeaderBlock other_msg):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1408
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

  /* 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_WriteUnraisable("pyrosm_proto.HeaderBlock.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_18IsInitialized[] = "\n        Checks if the message is initialized.\n\n        Returns:\n            bool: True if the message is initialized (i.e. all of its required\n                fields are set).\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsInitialized (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_18IsInitialized(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_18IsInitialized(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_12pyrosm_proto_11HeaderBlock_IsInitialized(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __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("pyrosm_proto.HeaderBlock.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1423
 *         return True
 * 
 *     cpdef void MergeFrom(self, HeaderBlock other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_11HeaderBlock_MergeFrom(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int64_t __pyx_t_8;
  uint64_t __pyx_t_9;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11HeaderBlock_21MergeFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":1432
 *         cdef int i
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":1433
 * 
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":1432
 *         cdef int i
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "pyrosm_proto.pyx":1436
 * 
 * 
 *         if other_msg._bbox is not None and other_msg._bbox._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             if self._bbox is None:
 *                 self._bbox = HeaderBBox.__new__(HeaderBBox)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_other_msg->_bbox) != Py_None);
  __pyx_t_7 = (__pyx_t_5 != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_other_msg->_bbox->_is_present_in_parent != 0);
  __pyx_t_6 = __pyx_t_7;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":1437
 * 
 *         if other_msg._bbox is not None and other_msg._bbox._is_present_in_parent:
 *             if self._bbox is None:             # <<<<<<<<<<<<<<
 *                 self._bbox = HeaderBBox.__new__(HeaderBBox)
 *                 self._bbox.reset()
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_bbox) == Py_None);
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (__pyx_t_7) {

      /* "pyrosm_proto.pyx":1438
 *         if other_msg._bbox is not None and other_msg._bbox._is_present_in_parent:
 *             if self._bbox is None:
 *                 self._bbox = HeaderBBox.__new__(HeaderBBox)             # <<<<<<<<<<<<<<
 *                 self._bbox.reset()
 *                 self._bbox._listener = <PyObject *>self
 */
      __pyx_t_1 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_HeaderBBox(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_HeaderBBox), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error)
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
      __Pyx_GOTREF(__pyx_v_self->_bbox);
      __Pyx_DECREF(((PyObject *)__pyx_v_self->_bbox));
      __pyx_v_self->_bbox = ((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyrosm_proto.pyx":1439
 *             if self._bbox is None:
 *                 self._bbox = HeaderBBox.__new__(HeaderBBox)
 *                 self._bbox.reset()             # <<<<<<<<<<<<<<
 *                 self._bbox._listener = <PyObject *>self
 *             self._bbox.MergeFrom(other_msg._bbox)
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->_bbox->__pyx_vtab)->reset(__pyx_v_self->_bbox, 0);

      /* "pyrosm_proto.pyx":1440
 *                 self._bbox = HeaderBBox.__new__(HeaderBBox)
 *                 self._bbox.reset()
 *                 self._bbox._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *             self._bbox.MergeFrom(other_msg._bbox)
 *         self._required_features += other_msg._required_features
 */
      __pyx_v_self->_bbox->_listener = ((PyObject *)__pyx_v_self);

      /* "pyrosm_proto.pyx":1437
 * 
 *         if other_msg._bbox is not None and other_msg._bbox._is_present_in_parent:
 *             if self._bbox is None:             # <<<<<<<<<<<<<<
 *                 self._bbox = HeaderBBox.__new__(HeaderBBox)
 *                 self._bbox.reset()
 */
    }

    /* "pyrosm_proto.pyx":1441
 *                 self._bbox.reset()
 *                 self._bbox._listener = <PyObject *>self
 *             self._bbox.MergeFrom(other_msg._bbox)             # <<<<<<<<<<<<<<
 *         self._required_features += other_msg._required_features
 *         self._optional_features += other_msg._optional_features
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_bbox);
    __Pyx_INCREF(__pyx_t_1);
    ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->_bbox->__pyx_vtab)->MergeFrom(__pyx_v_self->_bbox, ((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_t_1), 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":1436
 * 
 * 
 *         if other_msg._bbox is not None and other_msg._bbox._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             if self._bbox is None:
 *                 self._bbox = HeaderBBox.__new__(HeaderBBox)
 */
  }

  /* "pyrosm_proto.pyx":1442
 *                 self._bbox._listener = <PyObject *>self
 *             self._bbox.MergeFrom(other_msg._bbox)
 *         self._required_features += other_msg._required_features             # <<<<<<<<<<<<<<
 *         self._optional_features += other_msg._optional_features
 *         if other_msg.__field_bitmap0 & 32768 == 32768:
 */
  __pyx_t_1 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_self->_required_features), ((PyObject *)__pyx_v_other_msg->_required_features)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_StringList))))) __PYX_ERR(0, 1442, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_required_features);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_required_features));
  __pyx_v_self->_required_features = ((struct __pyx_obj_12pyrobuf_list_StringList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1443
 *             self._bbox.MergeFrom(other_msg._bbox)
 *         self._required_features += other_msg._required_features
 *         self._optional_features += other_msg._optional_features             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 32768 == 32768:
 *             self._writingprogram = other_msg._writingprogram
 */
  __pyx_t_1 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_self->_optional_features), ((PyObject *)__pyx_v_other_msg->_optional_features)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_StringList))))) __PYX_ERR(0, 1443, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_optional_features);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_optional_features));
  __pyx_v_self->_optional_features = ((struct __pyx_obj_12pyrobuf_list_StringList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1444
 *         self._required_features += other_msg._required_features
 *         self._optional_features += other_msg._optional_features
 *         if other_msg.__field_bitmap0 & 32768 == 32768:             # <<<<<<<<<<<<<<
 *             self._writingprogram = other_msg._writingprogram
 *             self.__field_bitmap0 |= 32768
 */
  __pyx_t_7 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 0x8000) == 0x8000) != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":1445
 *         self._optional_features += other_msg._optional_features
 *         if other_msg.__field_bitmap0 & 32768 == 32768:
 *             self._writingprogram = other_msg._writingprogram             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 32768
 *         if other_msg.__field_bitmap0 & 65536 == 65536:
 */
    __pyx_t_1 = __pyx_v_other_msg->_writingprogram;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_writingprogram);
    __Pyx_DECREF(__pyx_v_self->_writingprogram);
    __pyx_v_self->_writingprogram = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":1446
 *         if other_msg.__field_bitmap0 & 32768 == 32768:
 *             self._writingprogram = other_msg._writingprogram
 *             self.__field_bitmap0 |= 32768             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 65536 == 65536:
 *             self._source = other_msg._source
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x8000);

    /* "pyrosm_proto.pyx":1444
 *         self._required_features += other_msg._required_features
 *         self._optional_features += other_msg._optional_features
 *         if other_msg.__field_bitmap0 & 32768 == 32768:             # <<<<<<<<<<<<<<
 *             self._writingprogram = other_msg._writingprogram
 *             self.__field_bitmap0 |= 32768
 */
  }

  /* "pyrosm_proto.pyx":1447
 *             self._writingprogram = other_msg._writingprogram
 *             self.__field_bitmap0 |= 32768
 *         if other_msg.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             self._source = other_msg._source
 *             self.__field_bitmap0 |= 65536
 */
  __pyx_t_7 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 0x10000) == 0x10000) != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":1448
 *             self.__field_bitmap0 |= 32768
 *         if other_msg.__field_bitmap0 & 65536 == 65536:
 *             self._source = other_msg._source             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 65536
 *         if other_msg.__field_bitmap0 & 2147483648 == 2147483648:
 */
    __pyx_t_1 = __pyx_v_other_msg->_source;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_source);
    __Pyx_DECREF(__pyx_v_self->_source);
    __pyx_v_self->_source = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":1449
 *         if other_msg.__field_bitmap0 & 65536 == 65536:
 *             self._source = other_msg._source
 *             self.__field_bitmap0 |= 65536             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 2147483648 == 2147483648:
 *             self._osmosis_replication_timestamp = other_msg._osmosis_replication_timestamp
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x10000);

    /* "pyrosm_proto.pyx":1447
 *             self._writingprogram = other_msg._writingprogram
 *             self.__field_bitmap0 |= 32768
 *         if other_msg.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             self._source = other_msg._source
 *             self.__field_bitmap0 |= 65536
 */
  }

  /* "pyrosm_proto.pyx":1450
 *             self._source = other_msg._source
 *             self.__field_bitmap0 |= 65536
 *         if other_msg.__field_bitmap0 & 2147483648 == 2147483648:             # <<<<<<<<<<<<<<
 *             self._osmosis_replication_timestamp = other_msg._osmosis_replication_timestamp
 *             self.__field_bitmap0 |= 2147483648
 */
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_other_msg->__pyx___field_bitmap0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_2147483648); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_2147483648, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":1451
 *             self.__field_bitmap0 |= 65536
 *         if other_msg.__field_bitmap0 & 2147483648 == 2147483648:
 *             self._osmosis_replication_timestamp = other_msg._osmosis_replication_timestamp             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 2147483648
 *         if other_msg.__field_bitmap0 & 4294967296 == 4294967296:
 */
    __pyx_t_8 = __pyx_v_other_msg->_osmosis_replication_timestamp;
    __pyx_v_self->_osmosis_replication_timestamp = __pyx_t_8;

    /* "pyrosm_proto.pyx":1452
 *         if other_msg.__field_bitmap0 & 2147483648 == 2147483648:
 *             self._osmosis_replication_timestamp = other_msg._osmosis_replication_timestamp
 *             self.__field_bitmap0 |= 2147483648             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 4294967296 == 4294967296:
 *             self._osmosis_replication_sequence_number = other_msg._osmosis_replication_sequence_number
 */
    __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_InPlaceOr(__pyx_t_1, __pyx_int_2147483648); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_9 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1452, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_self->__pyx___field_bitmap0 = __pyx_t_9;

    /* "pyrosm_proto.pyx":1450
 *             self._source = other_msg._source
 *             self.__field_bitmap0 |= 65536
 *         if other_msg.__field_bitmap0 & 2147483648 == 2147483648:             # <<<<<<<<<<<<<<
 *             self._osmosis_replication_timestamp = other_msg._osmosis_replication_timestamp
 *             self.__field_bitmap0 |= 2147483648
 */
  }

  /* "pyrosm_proto.pyx":1453
 *             self._osmosis_replication_timestamp = other_msg._osmosis_replication_timestamp
 *             self.__field_bitmap0 |= 2147483648
 *         if other_msg.__field_bitmap0 & 4294967296 == 4294967296:             # <<<<<<<<<<<<<<
 *             self._osmosis_replication_sequence_number = other_msg._osmosis_replication_sequence_number
 *             self.__field_bitmap0 |= 4294967296
 */
  __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_other_msg->__pyx___field_bitmap0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyNumber_And(__pyx_t_2, __pyx_int_4294967296); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_4294967296, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":1454
 *             self.__field_bitmap0 |= 2147483648
 *         if other_msg.__field_bitmap0 & 4294967296 == 4294967296:
 *             self._osmosis_replication_sequence_number = other_msg._osmosis_replication_sequence_number             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 4294967296
 *         if other_msg.__field_bitmap0 & 8589934592 == 8589934592:
 */
    __pyx_t_8 = __pyx_v_other_msg->_osmosis_replication_sequence_number;
    __pyx_v_self->_osmosis_replication_sequence_number = __pyx_t_8;

    /* "pyrosm_proto.pyx":1455
 *         if other_msg.__field_bitmap0 & 4294967296 == 4294967296:
 *             self._osmosis_replication_sequence_number = other_msg._osmosis_replication_sequence_number
 *             self.__field_bitmap0 |= 4294967296             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 8589934592 == 8589934592:
 *             self._osmosis_replication_base_url = other_msg._osmosis_replication_base_url
 */
    __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyNumber_InPlaceOr(__pyx_t_2, __pyx_int_4294967296); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_9 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1455, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_self->__pyx___field_bitmap0 = __pyx_t_9;

    /* "pyrosm_proto.pyx":1453
 *             self._osmosis_replication_timestamp = other_msg._osmosis_replication_timestamp
 *             self.__field_bitmap0 |= 2147483648
 *         if other_msg.__field_bitmap0 & 4294967296 == 4294967296:             # <<<<<<<<<<<<<<
 *             self._osmosis_replication_sequence_number = other_msg._osmosis_replication_sequence_number
 *             self.__field_bitmap0 |= 4294967296
 */
  }

  /* "pyrosm_proto.pyx":1456
 *             self._osmosis_replication_sequence_number = other_msg._osmosis_replication_sequence_number
 *             self.__field_bitmap0 |= 4294967296
 *         if other_msg.__field_bitmap0 & 8589934592 == 8589934592:             # <<<<<<<<<<<<<<
 *             self._osmosis_replication_base_url = other_msg._osmosis_replication_base_url
 *             self.__field_bitmap0 |= 8589934592
 */
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_other_msg->__pyx___field_bitmap0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_8589934592); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_8589934592, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":1457
 *             self.__field_bitmap0 |= 4294967296
 *         if other_msg.__field_bitmap0 & 8589934592 == 8589934592:
 *             self._osmosis_replication_base_url = other_msg._osmosis_replication_base_url             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 8589934592
 * 
 */
    __pyx_t_1 = __pyx_v_other_msg->_osmosis_replication_base_url;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_osmosis_replication_base_url);
    __Pyx_DECREF(__pyx_v_self->_osmosis_replication_base_url);
    __pyx_v_self->_osmosis_replication_base_url = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":1458
 *         if other_msg.__field_bitmap0 & 8589934592 == 8589934592:
 *             self._osmosis_replication_base_url = other_msg._osmosis_replication_base_url
 *             self.__field_bitmap0 |= 8589934592             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_InPlaceOr(__pyx_t_1, __pyx_int_8589934592); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_9 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1458, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_self->__pyx___field_bitmap0 = __pyx_t_9;

    /* "pyrosm_proto.pyx":1456
 *             self._osmosis_replication_sequence_number = other_msg._osmosis_replication_sequence_number
 *             self.__field_bitmap0 |= 4294967296
 *         if other_msg.__field_bitmap0 & 8589934592 == 8589934592:             # <<<<<<<<<<<<<<
 *             self._osmosis_replication_base_url = other_msg._osmosis_replication_base_url
 *             self.__field_bitmap0 |= 8589934592
 */
  }

  /* "pyrosm_proto.pyx":1460
 *             self.__field_bitmap0 |= 8589934592
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1423
 *         return True
 * 
 *     cpdef void MergeFrom(self, HeaderBlock other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.HeaderBlock.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_20MergeFrom[] = "\n        Merges the contents of the specified message into the current message.\n\n        Params:\n            other_msg: Message to merge into the current message.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_HeaderBlock, 1, "other_msg", 0))) __PYX_ERR(0, 1423, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_20MergeFrom(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_20MergeFrom(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_11HeaderBlock_MergeFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1423, __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("pyrosm_proto.HeaderBlock.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1462
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_11HeaderBlock_MergeFromString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_MergeFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  unsigned char const *__pyx_t_10;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11HeaderBlock_23MergeFromString)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1462, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1462, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1462, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1462, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1462, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":1476
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, False)
 */
  __pyx_t_7 = (__pyx_v_size != Py_None);
  if ((__pyx_t_7 != 0)) {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1476, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_8;
  } else {
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1476, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_9;
  }
  __pyx_v_length = __pyx_t_5;

  /* "pyrosm_proto.pyx":1478
 *         length = size if size is not None else len(data)
 * 
 *         buf = self._protobuf_deserialize(data, length, False)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_10 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 1478, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_10, __pyx_v_length, 0);

  /* "pyrosm_proto.pyx":1480
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  __pyx_t_7 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "pyrosm_proto.pyx":1481
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_GIVEREF(__pyx_v_size);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_size);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Truncated_message_got_s_expected, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1481, __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, 1481, __pyx_L1_error)

    /* "pyrosm_proto.pyx":1480
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  }

  /* "pyrosm_proto.pyx":1483
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1485
 *         self._Modified()
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1462
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_22MergeFromString[] = "\n        Merges serialized protocol buffer data into this message.\n\n        Params:\n            data (bytes): a string of binary data.\n            size (int): optional - the length of the data string\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "MergeFromString") < 0)) __PYX_ERR(0, 1462, __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_data = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MergeFromString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1462, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_22MergeFromString(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), __pyx_v_data, __pyx_v_size);

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_22MergeFromString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_MergeFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_HeaderBlock->MergeFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1462, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1487
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_11HeaderBlock_ParseFromString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_ParseFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_reset = ((int)1);
  int __pyx_v_cache = ((int)0);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  unsigned char const *__pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_reset = __pyx_optional_args->reset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cache = __pyx_optional_args->cache;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1487, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11HeaderBlock_25ParseFromString)) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1487, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1487, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1487, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1487, __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(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1487, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_size);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 3+__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, 1487, __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, 1487, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":1503
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         if reset:
 */
  __pyx_t_9 = (__pyx_v_size != Py_None);
  if ((__pyx_t_9 != 0)) {
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1503, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1503, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_11;
  }
  __pyx_v_length = __pyx_t_7;

  /* "pyrosm_proto.pyx":1505
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_9 = (__pyx_v_reset != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":1506
 * 
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":1505
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":1508
 *             self.reset()
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_12 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 1508, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_12, __pyx_v_length, __pyx_v_cache);

  /* "pyrosm_proto.pyx":1510
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  __pyx_t_9 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "pyrosm_proto.pyx":1511
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message")             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s_Truncated_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Truncated_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1511, __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, 1511, __pyx_L1_error)

    /* "pyrosm_proto.pyx":1510
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  }

  /* "pyrosm_proto.pyx":1513
 *             raise DecodeError("Truncated message")
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1515
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  __pyx_t_9 = (__pyx_v_cache != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":1516
 * 
 *         if cache:
 *             self._cached_serialization = data             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) __PYX_ERR(0, 1516, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":1515
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  }

  /* "pyrosm_proto.pyx":1518
 *             self._cached_serialization = data
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1487
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_24ParseFromString[] = "\n        Populate the message class from a string of protobuf encoded binary data.\n\n        Params:\n            data (bytes): a string of binary data\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n            cache (bool): optional - whether to cache serialized data\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_v_reset;
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,&__pyx_n_s_cache,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromString") < 0)) __PYX_ERR(0, 1487, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    if (values[2]) {
      __pyx_v_reset = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1487, __pyx_L3_error)
    } else {
      __pyx_v_reset = ((int)1);
    }
    if (values[3]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1487, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromString", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1487, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_24ParseFromString(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset, __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_24ParseFromString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_ParseFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.reset = __pyx_v_reset;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_HeaderBlock->ParseFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1487, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1521
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FromString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_26FromString(((PyTypeObject*)__pyx_v_cls), ((PyObject *)__pyx_v_s));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("FromString", 0);

  /* "pyrosm_proto.pyx":1522
 *     @classmethod
 *     def FromString(cls, s):
 *         message = cls()             # <<<<<<<<<<<<<<
 *         message.MergeFromString(s)
 *         return message
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1523
 *     def FromString(cls, s):
 *         message = cls()
 *         message.MergeFromString(s)             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1523, __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;

  /* "pyrosm_proto.pyx":1524
 *         message = cls()
 *         message.MergeFromString(s)
 *         return message             # <<<<<<<<<<<<<<
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1521
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.FromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1526
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # bbox
 */

static void __pyx_f_12pyrosm_proto_11HeaderBlock__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_cache) {
  PyObject *__pyx_v_bbox_buf = 0;
  PyObject *__pyx_v_required_features_elt = 0;
  PyObject *__pyx_v_required_features_elt_bytes = 0;
  PyObject *__pyx_v_optional_features_elt = 0;
  PyObject *__pyx_v_optional_features_elt_bytes = 0;
  PyObject *__pyx_v_writingprogram_bytes = 0;
  PyObject *__pyx_v_source_bytes = 0;
  PyObject *__pyx_v_osmosis_replication_base_url_bytes = 0;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("_protobuf_serialize", 0);
  __Pyx_INCREF(__pyx_v_buf);

  /* "pyrosm_proto.pyx":1530
 *         # bbox
 *         cdef bytearray bbox_buf
 *         if self._bbox is not None and self._bbox._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             if self._bbox._cached_serialization is not None:
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_bbox) != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_self->_bbox->_is_present_in_parent != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":1531
 *         cdef bytearray bbox_buf
 *         if self._bbox is not None and self._bbox._is_present_in_parent:
 *             set_varint64(10, buf)             # <<<<<<<<<<<<<<
 *             if self._bbox._cached_serialization is not None:
 *                 set_varint64(len(self._bbox._cached_serialization), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(10, __pyx_v_buf));

    /* "pyrosm_proto.pyx":1532
 *         if self._bbox is not None and self._bbox._is_present_in_parent:
 *             set_varint64(10, buf)
 *             if self._bbox._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(self._bbox._cached_serialization), buf)
 *                 buf += self._bbox._cached_serialization
 */
    __pyx_t_1 = (__pyx_v_self->_bbox->_cached_serialization != ((PyObject*)Py_None));
    __pyx_t_3 = (__pyx_t_1 != 0);
    if (__pyx_t_3) {

      /* "pyrosm_proto.pyx":1533
 *             set_varint64(10, buf)
 *             if self._bbox._cached_serialization is not None:
 *                 set_varint64(len(self._bbox._cached_serialization), buf)             # <<<<<<<<<<<<<<
 *                 buf += self._bbox._cached_serialization
 *             else:
 */
      __pyx_t_4 = __pyx_v_self->_bbox->_cached_serialization;
      __Pyx_INCREF(__pyx_t_4);
      if (unlikely(__pyx_t_4 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(0, 1533, __pyx_L1_error)
      }
      __pyx_t_5 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1533, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_5, __pyx_v_buf));

      /* "pyrosm_proto.pyx":1534
 *             if self._bbox._cached_serialization is not None:
 *                 set_varint64(len(self._bbox._cached_serialization), buf)
 *                 buf += self._bbox._cached_serialization             # <<<<<<<<<<<<<<
 *             else:
 *                 bbox_buf = bytearray()
 */
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_self->_bbox->_cached_serialization); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1534, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":1532
 *         if self._bbox is not None and self._bbox._is_present_in_parent:
 *             set_varint64(10, buf)
 *             if self._bbox._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(self._bbox._cached_serialization), buf)
 *                 buf += self._bbox._cached_serialization
 */
      goto __pyx_L6;
    }

    /* "pyrosm_proto.pyx":1536
 *                 buf += self._bbox._cached_serialization
 *             else:
 *                 bbox_buf = bytearray()             # <<<<<<<<<<<<<<
 *                 self._bbox._protobuf_serialize(bbox_buf, cache)
 *                 set_varint64(len(bbox_buf), buf)
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_bbox_buf = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":1537
 *             else:
 *                 bbox_buf = bytearray()
 *                 self._bbox._protobuf_serialize(bbox_buf, cache)             # <<<<<<<<<<<<<<
 *                 set_varint64(len(bbox_buf), buf)
 *                 buf += bbox_buf
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->_bbox->__pyx_vtab)->_protobuf_serialize(__pyx_v_self->_bbox, __pyx_v_bbox_buf, __pyx_v_cache);

      /* "pyrosm_proto.pyx":1538
 *                 bbox_buf = bytearray()
 *                 self._bbox._protobuf_serialize(bbox_buf, cache)
 *                 set_varint64(len(bbox_buf), buf)             # <<<<<<<<<<<<<<
 *                 buf += bbox_buf
 *                 if cache:
 */
      __pyx_t_5 = PyByteArray_GET_SIZE(__pyx_v_bbox_buf); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1538, __pyx_L1_error)
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_5, __pyx_v_buf));

      /* "pyrosm_proto.pyx":1539
 *                 self._bbox._protobuf_serialize(bbox_buf, cache)
 *                 set_varint64(len(bbox_buf), buf)
 *                 buf += bbox_buf             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     self._bbox._cached_serialization = bytes(bbox_buf)
 */
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_bbox_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1539, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":1540
 *                 set_varint64(len(bbox_buf), buf)
 *                 buf += bbox_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._bbox._cached_serialization = bytes(bbox_buf)
 *         # required_features
 */
      __pyx_t_3 = (__pyx_v_cache != 0);
      if (__pyx_t_3) {

        /* "pyrosm_proto.pyx":1541
 *                 buf += bbox_buf
 *                 if cache:
 *                     self._bbox._cached_serialization = bytes(bbox_buf)             # <<<<<<<<<<<<<<
 *         # required_features
 *         cdef str required_features_elt
 */
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_bbox_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1541, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_self->_bbox->_cached_serialization);
        __Pyx_DECREF(__pyx_v_self->_bbox->_cached_serialization);
        __pyx_v_self->_bbox->_cached_serialization = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyrosm_proto.pyx":1540
 *                 set_varint64(len(bbox_buf), buf)
 *                 buf += bbox_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._bbox._cached_serialization = bytes(bbox_buf)
 *         # required_features
 */
      }
    }
    __pyx_L6:;

    /* "pyrosm_proto.pyx":1530
 *         # bbox
 *         cdef bytearray bbox_buf
 *         if self._bbox is not None and self._bbox._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             if self._bbox._cached_serialization is not None:
 */
  }

  /* "pyrosm_proto.pyx":1545
 *         cdef str required_features_elt
 *         cdef bytes required_features_elt_bytes
 *         for required_features_elt in self._required_features:             # <<<<<<<<<<<<<<
 *             set_varint64(34, buf)
 *             required_features_elt_bytes = required_features_elt.encode('utf-8')
 */
  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_required_features))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_required_features))) {
    __pyx_t_4 = ((PyObject *)__pyx_v_self->_required_features); __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(((PyObject *)__pyx_v_self->_required_features)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1545, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1545, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1545, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1545, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1545, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1545, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    if (!(likely(PyString_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_7)->tp_name), 0))) __PYX_ERR(0, 1545, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_required_features_elt, ((PyObject*)__pyx_t_7));
    __pyx_t_7 = 0;

    /* "pyrosm_proto.pyx":1546
 *         cdef bytes required_features_elt_bytes
 *         for required_features_elt in self._required_features:
 *             set_varint64(34, buf)             # <<<<<<<<<<<<<<
 *             required_features_elt_bytes = required_features_elt.encode('utf-8')
 *             set_varint64(len(required_features_elt_bytes), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(34, __pyx_v_buf));

    /* "pyrosm_proto.pyx":1547
 *         for required_features_elt in self._required_features:
 *             set_varint64(34, buf)
 *             required_features_elt_bytes = required_features_elt.encode('utf-8')             # <<<<<<<<<<<<<<
 *             set_varint64(len(required_features_elt_bytes), buf)
 *             buf += required_features_elt_bytes
 */
    __pyx_t_7 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_required_features_elt, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_7)->tp_name), 0))) __PYX_ERR(0, 1547, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_required_features_elt_bytes, ((PyObject*)__pyx_t_7));
    __pyx_t_7 = 0;

    /* "pyrosm_proto.pyx":1548
 *             set_varint64(34, buf)
 *             required_features_elt_bytes = required_features_elt.encode('utf-8')
 *             set_varint64(len(required_features_elt_bytes), buf)             # <<<<<<<<<<<<<<
 *             buf += required_features_elt_bytes
 *         # optional_features
 */
    if (unlikely(__pyx_v_required_features_elt_bytes == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 1548, __pyx_L1_error)
    }
    __pyx_t_8 = PyBytes_GET_SIZE(__pyx_v_required_features_elt_bytes); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1548, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_8, __pyx_v_buf));

    /* "pyrosm_proto.pyx":1549
 *             required_features_elt_bytes = required_features_elt.encode('utf-8')
 *             set_varint64(len(required_features_elt_bytes), buf)
 *             buf += required_features_elt_bytes             # <<<<<<<<<<<<<<
 *         # optional_features
 *         cdef str optional_features_elt
 */
    __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_required_features_elt_bytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_7));
    __pyx_t_7 = 0;

    /* "pyrosm_proto.pyx":1545
 *         cdef str required_features_elt
 *         cdef bytes required_features_elt_bytes
 *         for required_features_elt in self._required_features:             # <<<<<<<<<<<<<<
 *             set_varint64(34, buf)
 *             required_features_elt_bytes = required_features_elt.encode('utf-8')
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":1553
 *         cdef str optional_features_elt
 *         cdef bytes optional_features_elt_bytes
 *         for optional_features_elt in self._optional_features:             # <<<<<<<<<<<<<<
 *             set_varint64(42, buf)
 *             optional_features_elt_bytes = optional_features_elt.encode('utf-8')
 */
  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_optional_features))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_optional_features))) {
    __pyx_t_4 = ((PyObject *)__pyx_v_self->_optional_features); __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(((PyObject *)__pyx_v_self->_optional_features)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1553, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1553, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1553, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1553, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1553, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    if (!(likely(PyString_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_7)->tp_name), 0))) __PYX_ERR(0, 1553, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_optional_features_elt, ((PyObject*)__pyx_t_7));
    __pyx_t_7 = 0;

    /* "pyrosm_proto.pyx":1554
 *         cdef bytes optional_features_elt_bytes
 *         for optional_features_elt in self._optional_features:
 *             set_varint64(42, buf)             # <<<<<<<<<<<<<<
 *             optional_features_elt_bytes = optional_features_elt.encode('utf-8')
 *             set_varint64(len(optional_features_elt_bytes), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(42, __pyx_v_buf));

    /* "pyrosm_proto.pyx":1555
 *         for optional_features_elt in self._optional_features:
 *             set_varint64(42, buf)
 *             optional_features_elt_bytes = optional_features_elt.encode('utf-8')             # <<<<<<<<<<<<<<
 *             set_varint64(len(optional_features_elt_bytes), buf)
 *             buf += optional_features_elt_bytes
 */
    __pyx_t_7 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_optional_features_elt, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_7)->tp_name), 0))) __PYX_ERR(0, 1555, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_optional_features_elt_bytes, ((PyObject*)__pyx_t_7));
    __pyx_t_7 = 0;

    /* "pyrosm_proto.pyx":1556
 *             set_varint64(42, buf)
 *             optional_features_elt_bytes = optional_features_elt.encode('utf-8')
 *             set_varint64(len(optional_features_elt_bytes), buf)             # <<<<<<<<<<<<<<
 *             buf += optional_features_elt_bytes
 *         # writingprogram
 */
    if (unlikely(__pyx_v_optional_features_elt_bytes == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 1556, __pyx_L1_error)
    }
    __pyx_t_8 = PyBytes_GET_SIZE(__pyx_v_optional_features_elt_bytes); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1556, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_8, __pyx_v_buf));

    /* "pyrosm_proto.pyx":1557
 *             optional_features_elt_bytes = optional_features_elt.encode('utf-8')
 *             set_varint64(len(optional_features_elt_bytes), buf)
 *             buf += optional_features_elt_bytes             # <<<<<<<<<<<<<<
 *         # writingprogram
 *         cdef bytes writingprogram_bytes
 */
    __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_optional_features_elt_bytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_7));
    __pyx_t_7 = 0;

    /* "pyrosm_proto.pyx":1553
 *         cdef str optional_features_elt
 *         cdef bytes optional_features_elt_bytes
 *         for optional_features_elt in self._optional_features:             # <<<<<<<<<<<<<<
 *             set_varint64(42, buf)
 *             optional_features_elt_bytes = optional_features_elt.encode('utf-8')
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":1560
 *         # writingprogram
 *         cdef bytes writingprogram_bytes
 *         if self.__field_bitmap0 & 32768 == 32768:             # <<<<<<<<<<<<<<
 *             set_varint64(130, buf)
 *             writingprogram_bytes = self._writingprogram.encode('utf-8')
 */
  __pyx_t_3 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x8000) == 0x8000) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":1561
 *         cdef bytes writingprogram_bytes
 *         if self.__field_bitmap0 & 32768 == 32768:
 *             set_varint64(130, buf)             # <<<<<<<<<<<<<<
 *             writingprogram_bytes = self._writingprogram.encode('utf-8')
 *             set_varint64(len(writingprogram_bytes), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(0x82, __pyx_v_buf));

    /* "pyrosm_proto.pyx":1562
 *         if self.__field_bitmap0 & 32768 == 32768:
 *             set_varint64(130, buf)
 *             writingprogram_bytes = self._writingprogram.encode('utf-8')             # <<<<<<<<<<<<<<
 *             set_varint64(len(writingprogram_bytes), buf)
 *             buf += writingprogram_bytes
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_writingprogram, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1562, __pyx_L1_error)
    __pyx_v_writingprogram_bytes = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":1563
 *             set_varint64(130, buf)
 *             writingprogram_bytes = self._writingprogram.encode('utf-8')
 *             set_varint64(len(writingprogram_bytes), buf)             # <<<<<<<<<<<<<<
 *             buf += writingprogram_bytes
 *         # source
 */
    if (unlikely(__pyx_v_writingprogram_bytes == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 1563, __pyx_L1_error)
    }
    __pyx_t_5 = PyBytes_GET_SIZE(__pyx_v_writingprogram_bytes); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1563, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_5, __pyx_v_buf));

    /* "pyrosm_proto.pyx":1564
 *             writingprogram_bytes = self._writingprogram.encode('utf-8')
 *             set_varint64(len(writingprogram_bytes), buf)
 *             buf += writingprogram_bytes             # <<<<<<<<<<<<<<
 *         # source
 *         cdef bytes source_bytes
 */
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_writingprogram_bytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":1560
 *         # writingprogram
 *         cdef bytes writingprogram_bytes
 *         if self.__field_bitmap0 & 32768 == 32768:             # <<<<<<<<<<<<<<
 *             set_varint64(130, buf)
 *             writingprogram_bytes = self._writingprogram.encode('utf-8')
 */
  }

  /* "pyrosm_proto.pyx":1567
 *         # source
 *         cdef bytes source_bytes
 *         if self.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             set_varint64(138, buf)
 *             source_bytes = self._source.encode('utf-8')
 */
  __pyx_t_3 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x10000) == 0x10000) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":1568
 *         cdef bytes source_bytes
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             set_varint64(138, buf)             # <<<<<<<<<<<<<<
 *             source_bytes = self._source.encode('utf-8')
 *             set_varint64(len(source_bytes), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(0x8A, __pyx_v_buf));

    /* "pyrosm_proto.pyx":1569
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             set_varint64(138, buf)
 *             source_bytes = self._source.encode('utf-8')             # <<<<<<<<<<<<<<
 *             set_varint64(len(source_bytes), buf)
 *             buf += source_bytes
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_source, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1569, __pyx_L1_error)
    __pyx_v_source_bytes = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":1570
 *             set_varint64(138, buf)
 *             source_bytes = self._source.encode('utf-8')
 *             set_varint64(len(source_bytes), buf)             # <<<<<<<<<<<<<<
 *             buf += source_bytes
 *         # osmosis_replication_timestamp
 */
    if (unlikely(__pyx_v_source_bytes == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 1570, __pyx_L1_error)
    }
    __pyx_t_5 = PyBytes_GET_SIZE(__pyx_v_source_bytes); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1570, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_5, __pyx_v_buf));

    /* "pyrosm_proto.pyx":1571
 *             source_bytes = self._source.encode('utf-8')
 *             set_varint64(len(source_bytes), buf)
 *             buf += source_bytes             # <<<<<<<<<<<<<<
 *         # osmosis_replication_timestamp
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:
 */
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_source_bytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":1567
 *         # source
 *         cdef bytes source_bytes
 *         if self.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             set_varint64(138, buf)
 *             source_bytes = self._source.encode('utf-8')
 */
  }

  /* "pyrosm_proto.pyx":1573
 *             buf += source_bytes
 *         # osmosis_replication_timestamp
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:             # <<<<<<<<<<<<<<
 *             set_varint64(256, buf)
 *             set_varint64(self._osmosis_replication_timestamp, buf)
 */
  __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = PyNumber_And(__pyx_t_4, __pyx_int_2147483648); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_7, __pyx_int_2147483648, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":1574
 *         # osmosis_replication_timestamp
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:
 *             set_varint64(256, buf)             # <<<<<<<<<<<<<<
 *             set_varint64(self._osmosis_replication_timestamp, buf)
 *         # osmosis_replication_sequence_number
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(0x100, __pyx_v_buf));

    /* "pyrosm_proto.pyx":1575
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:
 *             set_varint64(256, buf)
 *             set_varint64(self._osmosis_replication_timestamp, buf)             # <<<<<<<<<<<<<<
 *         # osmosis_replication_sequence_number
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_v_self->_osmosis_replication_timestamp, __pyx_v_buf));

    /* "pyrosm_proto.pyx":1573
 *             buf += source_bytes
 *         # osmosis_replication_timestamp
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:             # <<<<<<<<<<<<<<
 *             set_varint64(256, buf)
 *             set_varint64(self._osmosis_replication_timestamp, buf)
 */
  }

  /* "pyrosm_proto.pyx":1577
 *             set_varint64(self._osmosis_replication_timestamp, buf)
 *         # osmosis_replication_sequence_number
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:             # <<<<<<<<<<<<<<
 *             set_varint64(264, buf)
 *             set_varint64(self._osmosis_replication_sequence_number, buf)
 */
  __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = PyNumber_And(__pyx_t_4, __pyx_int_4294967296); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_7, __pyx_int_4294967296, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":1578
 *         # osmosis_replication_sequence_number
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:
 *             set_varint64(264, buf)             # <<<<<<<<<<<<<<
 *             set_varint64(self._osmosis_replication_sequence_number, buf)
 *         # osmosis_replication_base_url
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(0x108, __pyx_v_buf));

    /* "pyrosm_proto.pyx":1579
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:
 *             set_varint64(264, buf)
 *             set_varint64(self._osmosis_replication_sequence_number, buf)             # <<<<<<<<<<<<<<
 *         # osmosis_replication_base_url
 *         cdef bytes osmosis_replication_base_url_bytes
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_v_self->_osmosis_replication_sequence_number, __pyx_v_buf));

    /* "pyrosm_proto.pyx":1577
 *             set_varint64(self._osmosis_replication_timestamp, buf)
 *         # osmosis_replication_sequence_number
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:             # <<<<<<<<<<<<<<
 *             set_varint64(264, buf)
 *             set_varint64(self._osmosis_replication_sequence_number, buf)
 */
  }

  /* "pyrosm_proto.pyx":1582
 *         # osmosis_replication_base_url
 *         cdef bytes osmosis_replication_base_url_bytes
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:             # <<<<<<<<<<<<<<
 *             set_varint64(274, buf)
 *             osmosis_replication_base_url_bytes = self._osmosis_replication_base_url.encode('utf-8')
 */
  __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = PyNumber_And(__pyx_t_4, __pyx_int_8589934592); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_7, __pyx_int_8589934592, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1582, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1582, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":1583
 *         cdef bytes osmosis_replication_base_url_bytes
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:
 *             set_varint64(274, buf)             # <<<<<<<<<<<<<<
 *             osmosis_replication_base_url_bytes = self._osmosis_replication_base_url.encode('utf-8')
 *             set_varint64(len(osmosis_replication_base_url_bytes), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(0x112, __pyx_v_buf));

    /* "pyrosm_proto.pyx":1584
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:
 *             set_varint64(274, buf)
 *             osmosis_replication_base_url_bytes = self._osmosis_replication_base_url.encode('utf-8')             # <<<<<<<<<<<<<<
 *             set_varint64(len(osmosis_replication_base_url_bytes), buf)
 *             buf += osmosis_replication_base_url_bytes
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_osmosis_replication_base_url, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1584, __pyx_L1_error)
    __pyx_v_osmosis_replication_base_url_bytes = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":1585
 *             set_varint64(274, buf)
 *             osmosis_replication_base_url_bytes = self._osmosis_replication_base_url.encode('utf-8')
 *             set_varint64(len(osmosis_replication_base_url_bytes), buf)             # <<<<<<<<<<<<<<
 *             buf += osmosis_replication_base_url_bytes
 * 
 */
    if (unlikely(__pyx_v_osmosis_replication_base_url_bytes == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 1585, __pyx_L1_error)
    }
    __pyx_t_5 = PyBytes_GET_SIZE(__pyx_v_osmosis_replication_base_url_bytes); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1585, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_5, __pyx_v_buf));

    /* "pyrosm_proto.pyx":1586
 *             osmosis_replication_base_url_bytes = self._osmosis_replication_base_url.encode('utf-8')
 *             set_varint64(len(osmosis_replication_base_url_bytes), buf)
 *             buf += osmosis_replication_base_url_bytes             # <<<<<<<<<<<<<<
 * 
 *     cpdef void _Modified(self):
 */
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_osmosis_replication_base_url_bytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":1582
 *         # osmosis_replication_base_url
 *         cdef bytes osmosis_replication_base_url_bytes
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:             # <<<<<<<<<<<<<<
 *             set_varint64(274, buf)
 *             osmosis_replication_base_url_bytes = self._osmosis_replication_base_url.encode('utf-8')
 */
  }

  /* "pyrosm_proto.pyx":1526
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # bbox
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_WriteUnraisable("pyrosm_proto.HeaderBlock._protobuf_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bbox_buf);
  __Pyx_XDECREF(__pyx_v_required_features_elt);
  __Pyx_XDECREF(__pyx_v_required_features_elt_bytes);
  __Pyx_XDECREF(__pyx_v_optional_features_elt);
  __Pyx_XDECREF(__pyx_v_optional_features_elt_bytes);
  __Pyx_XDECREF(__pyx_v_writingprogram_bytes);
  __Pyx_XDECREF(__pyx_v_source_bytes);
  __Pyx_XDECREF(__pyx_v_osmosis_replication_base_url_bytes);
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_RefNannyFinishContext();
}

/* "pyrosm_proto.pyx":1588
 *             buf += osmosis_replication_base_url_bytes
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_11HeaderBlock__Modified(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Modified); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1588, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11HeaderBlock_29_Modified)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1588, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":1589
 * 
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":1590
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()             # <<<<<<<<<<<<<<
 *         self._cached_serialization = None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_listener), __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1590, __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;

  /* "pyrosm_proto.pyx":1591
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
  __Pyx_DECREF(__pyx_v_self->_cached_serialization);
  __pyx_v_self->_cached_serialization = ((PyObject*)Py_None);

  /* "pyrosm_proto.pyx":1588
 *             buf += osmosis_replication_base_url_bytes
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.HeaderBlock._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_Modified (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_28_Modified(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_28_Modified(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_11HeaderBlock__Modified(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1588, __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("pyrosm_proto.HeaderBlock._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1593
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_11HeaderBlock_SerializeToString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_SerializeToString *__pyx_optional_args) {
  int __pyx_v_cache = ((int)0);
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_out = 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;
  int __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cache = __pyx_optional_args->cache;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1593, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11HeaderBlock_31SerializeToString)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1593, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1593, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 1593, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":1602
 * 
 * 
 *         if self._bbox is not None and self._bbox._is_present_in_parent and not self._bbox.IsInitialized():             # <<<<<<<<<<<<<<
 *             raise Exception("Message HeaderBlock is missing required field: bbox")
 * 
 */
  __pyx_t_7 = (((PyObject *)__pyx_v_self->_bbox) != Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_self->_bbox->_is_present_in_parent != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->_bbox->__pyx_vtab)->IsInitialized(__pyx_v_self->_bbox, 0) != 0)) != 0);
  __pyx_t_6 = __pyx_t_8;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":1603
 * 
 *         if self._bbox is not None and self._bbox._is_present_in_parent and not self._bbox.IsInitialized():
 *             raise Exception("Message HeaderBlock is missing required field: bbox")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1603, __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, 1603, __pyx_L1_error)

    /* "pyrosm_proto.pyx":1602
 * 
 * 
 *         if self._bbox is not None and self._bbox._is_present_in_parent and not self._bbox.IsInitialized():             # <<<<<<<<<<<<<<
 *             raise Exception("Message HeaderBlock is missing required field: bbox")
 * 
 */
  }

  /* "pyrosm_proto.pyx":1605
 *             raise Exception("Message HeaderBlock is missing required field: bbox")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_6 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_8 = (__pyx_t_6 != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":1606
 * 
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":1605
 *             raise Exception("Message HeaderBlock is missing required field: bbox")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":1608
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1609
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)             # <<<<<<<<<<<<<<
 *         cdef bytes out = bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, __pyx_v_cache);

  /* "pyrosm_proto.pyx":1610
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1612
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  __pyx_t_8 = (__pyx_v_cache != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":1613
 * 
 *         if cache:
 *             self._cached_serialization = out             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = __pyx_v_out;

    /* "pyrosm_proto.pyx":1612
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  }

  /* "pyrosm_proto.pyx":1615
 *             self._cached_serialization = out
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializePartialToString(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1593
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.HeaderBlock.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_30SerializeToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cache,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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SerializeToString") < 0)) __PYX_ERR(0, 1593, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1593, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("SerializeToString", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1593, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_30SerializeToString(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_30SerializeToString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_SerializeToString __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_HeaderBlock->SerializeToString(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1593, __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("pyrosm_proto.HeaderBlock.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1617
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_11HeaderBlock_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_buf = 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;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11HeaderBlock_33SerializePartialToString)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1617, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":1624
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_5 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":1625
 *         """
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":1624
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":1627
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1628
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)             # <<<<<<<<<<<<<<
 *         return bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, 0);

  /* "pyrosm_proto.pyx":1629
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *     def SetInParent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1617
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.HeaderBlock.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_32SerializePartialToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_32SerializePartialToString(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_11HeaderBlock_SerializePartialToString(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __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("pyrosm_proto.HeaderBlock.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1631
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_34SetInParent[] = "\n        Mark this an present in the parent.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_34SetInParent(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_34SetInParent(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent", 0);

  /* "pyrosm_proto.pyx":1635
 *         Mark this an present in the parent.
 *         """
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1631
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1637
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_36ParseFromJson[] = "\n        Populate the message class from a json string.\n\n        Params:\n            data (str): a json string\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromJson (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromJson") < 0)) __PYX_ERR(0, 1637, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    __pyx_v_reset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromJson", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1637, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_36ParseFromJson(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("ParseFromJson", 0);
  __Pyx_INCREF(__pyx_v_size);

  /* "pyrosm_proto.pyx":1646
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":1647
 *         """
 *         if size is None:
 *             size = len(data)             # <<<<<<<<<<<<<<
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1647, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":1646
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  }

  /* "pyrosm_proto.pyx":1648
 *         if size is None:
 *             size = len(data)
 *         d = json.loads(data[:size])             # <<<<<<<<<<<<<<
 *         self.ParseFromDict(d, reset)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_json); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_d = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":1649
 *             size = len(data)
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToJson(self, **kwargs):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1649, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1649, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1649, __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_d);
    __Pyx_GIVEREF(__pyx_v_d);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_d);
    __Pyx_INCREF(__pyx_v_reset);
    __Pyx_GIVEREF(__pyx_v_reset);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_reset);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":1637
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1651
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_38SerializeToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializeToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializeToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_38SerializeToJson(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializeToJson", 0);

  /* "pyrosm_proto.pyx":1658
 *             str: a json formatted string
 *         """
 *         d = self.SerializeToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1659
 *         """
 *         d = self.SerializeToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToJson(self, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1651
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.SerializeToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1661
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_40SerializePartialToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializePartialToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializePartialToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_40SerializePartialToJson(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToJson", 0);

  /* "pyrosm_proto.pyx":1668
 *             str: a json formatted string
 *         """
 *         d = self.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1669
 *         """
 *         d = self.SerializePartialToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromDict(self, d, reset=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1661
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.SerializePartialToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1671
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_42ParseFromDict[] = "\n        Populate the message class from a Python dictionary.\n\n        Params:\n            d (dict): a Python dictionary representing the message\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,&__pyx_n_s_reset,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 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_reset);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromDict") < 0)) __PYX_ERR(0, 1671, __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_d = values[0];
    __pyx_v_reset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromDict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1671, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_42ParseFromDict(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), __pyx_v_d, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset) {
  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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  __Pyx_RefNannySetupContext("ParseFromDict", 0);

  /* "pyrosm_proto.pyx":1679
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reset); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1679, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":1680
 *         """
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         assert type(d) == dict
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":1679
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":1682
 *             self.reset()
 * 
 *         assert type(d) == dict             # <<<<<<<<<<<<<<
 *         try:
 *             self.bbox.ParseFromDict(d["bbox"])
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_d)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1682, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1682, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 1682, __pyx_L1_error)
    }
  }
  #endif

  /* "pyrosm_proto.pyx":1683
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.bbox.ParseFromDict(d["bbox"])
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":1684
 *         assert type(d) == dict
 *         try:
 *             self.bbox.ParseFromDict(d["bbox"])             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bbox); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1684, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1684, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_bbox); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1684, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1684, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":1683
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.bbox.ParseFromDict(d["bbox"])
 *         except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrosm_proto.pyx":1685
 *         try:
 *             self.bbox.ParseFromDict(d["bbox"])
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":1683
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.bbox.ParseFromDict(d["bbox"])
 *         except KeyError:
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":1687
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.required_features = d["required_features"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":1688
 *             pass
 *         try:
 *             self.required_features = d["required_features"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_required_features); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_required_features, __pyx_t_2) < 0) __PYX_ERR(0, 1688, __pyx_L10_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":1687
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.required_features = d["required_features"]
 *         except KeyError:
 */
    }
    __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_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrosm_proto.pyx":1689
 *         try:
 *             self.required_features = d["required_features"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    goto __pyx_L12_except_error;
    __pyx_L12_except_error:;

    /* "pyrosm_proto.pyx":1687
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.required_features = d["required_features"]
 *         except KeyError:
 */
    __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:;
  }

  /* "pyrosm_proto.pyx":1691
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.optional_features = d["optional_features"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":1692
 *             pass
 *         try:
 *             self.optional_features = d["optional_features"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_optional_features); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1692, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_optional_features, __pyx_t_2) < 0) __PYX_ERR(0, 1692, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":1691
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.optional_features = d["optional_features"]
 *         except KeyError:
 */
    }
    __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_L21_try_end;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrosm_proto.pyx":1693
 *         try:
 *             self.optional_features = d["optional_features"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L17_exception_handled;
    }
    goto __pyx_L18_except_error;
    __pyx_L18_except_error:;

    /* "pyrosm_proto.pyx":1691
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.optional_features = d["optional_features"]
 *         except KeyError:
 */
    __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_L17_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_L21_try_end:;
  }

  /* "pyrosm_proto.pyx":1695
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.writingprogram = d["writingprogram"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":1696
 *             pass
 *         try:
 *             self.writingprogram = d["writingprogram"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_writingprogram); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_writingprogram, __pyx_t_2) < 0) __PYX_ERR(0, 1696, __pyx_L22_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":1695
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.writingprogram = d["writingprogram"]
 *         except KeyError:
 */
    }
    __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_L27_try_end;
    __pyx_L22_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrosm_proto.pyx":1697
 *         try:
 *             self.writingprogram = d["writingprogram"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L23_exception_handled;
    }
    goto __pyx_L24_except_error;
    __pyx_L24_except_error:;

    /* "pyrosm_proto.pyx":1695
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.writingprogram = d["writingprogram"]
 *         except KeyError:
 */
    __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_L23_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_L27_try_end:;
  }

  /* "pyrosm_proto.pyx":1699
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.source = d["source"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":1700
 *             pass
 *         try:
 *             self.source = d["source"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1700, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_source, __pyx_t_2) < 0) __PYX_ERR(0, 1700, __pyx_L28_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":1699
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.source = d["source"]
 *         except KeyError:
 */
    }
    __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_L33_try_end;
    __pyx_L28_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrosm_proto.pyx":1701
 *         try:
 *             self.source = d["source"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L29_exception_handled;
    }
    goto __pyx_L30_except_error;
    __pyx_L30_except_error:;

    /* "pyrosm_proto.pyx":1699
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.source = d["source"]
 *         except KeyError:
 */
    __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_L29_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_L33_try_end:;
  }

  /* "pyrosm_proto.pyx":1703
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_timestamp = d["osmosis_replication_timestamp"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":1704
 *             pass
 *         try:
 *             self.osmosis_replication_timestamp = d["osmosis_replication_timestamp"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_osmosis_replication_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1704, __pyx_L34_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_osmosis_replication_timestamp, __pyx_t_2) < 0) __PYX_ERR(0, 1704, __pyx_L34_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":1703
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_timestamp = d["osmosis_replication_timestamp"]
 *         except KeyError:
 */
    }
    __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_L39_try_end;
    __pyx_L34_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrosm_proto.pyx":1705
 *         try:
 *             self.osmosis_replication_timestamp = d["osmosis_replication_timestamp"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L35_exception_handled;
    }
    goto __pyx_L36_except_error;
    __pyx_L36_except_error:;

    /* "pyrosm_proto.pyx":1703
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_timestamp = d["osmosis_replication_timestamp"]
 *         except KeyError:
 */
    __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_L35_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_L39_try_end:;
  }

  /* "pyrosm_proto.pyx":1707
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_sequence_number = d["osmosis_replication_sequence_number"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":1708
 *             pass
 *         try:
 *             self.osmosis_replication_sequence_number = d["osmosis_replication_sequence_number"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_osmosis_replication_sequence_num); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1708, __pyx_L40_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_osmosis_replication_sequence_num, __pyx_t_2) < 0) __PYX_ERR(0, 1708, __pyx_L40_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":1707
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_sequence_number = d["osmosis_replication_sequence_number"]
 *         except KeyError:
 */
    }
    __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_L45_try_end;
    __pyx_L40_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrosm_proto.pyx":1709
 *         try:
 *             self.osmosis_replication_sequence_number = d["osmosis_replication_sequence_number"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L41_exception_handled;
    }
    goto __pyx_L42_except_error;
    __pyx_L42_except_error:;

    /* "pyrosm_proto.pyx":1707
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_sequence_number = d["osmosis_replication_sequence_number"]
 *         except KeyError:
 */
    __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_L41_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_L45_try_end:;
  }

  /* "pyrosm_proto.pyx":1711
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_base_url = d["osmosis_replication_base_url"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":1712
 *             pass
 *         try:
 *             self.osmosis_replication_base_url = d["osmosis_replication_base_url"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_osmosis_replication_base_url); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1712, __pyx_L46_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_osmosis_replication_base_url, __pyx_t_2) < 0) __PYX_ERR(0, 1712, __pyx_L46_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":1711
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_base_url = d["osmosis_replication_base_url"]
 *         except KeyError:
 */
    }
    __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_L51_try_end;
    __pyx_L46_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrosm_proto.pyx":1713
 *         try:
 *             self.osmosis_replication_base_url = d["osmosis_replication_base_url"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L47_exception_handled;
    }
    goto __pyx_L48_except_error;
    __pyx_L48_except_error:;

    /* "pyrosm_proto.pyx":1711
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_base_url = d["osmosis_replication_base_url"]
 *         except KeyError:
 */
    __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_L47_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_L51_try_end:;
  }

  /* "pyrosm_proto.pyx":1716
 *             pass
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1718
 *         self._Modified()
 * 
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1671
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1720
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_44SerializeToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_44SerializeToDict(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_bbox_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  __Pyx_RefNannySetupContext("SerializeToDict", 0);

  /* "pyrosm_proto.pyx":1727
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         bbox_dict = self.bbox.SerializeToDict()
 *         if bbox_dict != {}:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1728
 *         """
 *         out = {}
 *         bbox_dict = self.bbox.SerializeToDict()             # <<<<<<<<<<<<<<
 *         if bbox_dict != {}:
 *             out["bbox"] = bbox_dict
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bbox); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_bbox_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1729
 *         out = {}
 *         bbox_dict = self.bbox.SerializeToDict()
 *         if bbox_dict != {}:             # <<<<<<<<<<<<<<
 *             out["bbox"] = bbox_dict
 *         if len(self.required_features) > 0:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_bbox_dict, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1730
 *         bbox_dict = self.bbox.SerializeToDict()
 *         if bbox_dict != {}:
 *             out["bbox"] = bbox_dict             # <<<<<<<<<<<<<<
 *         if len(self.required_features) > 0:
 *             out["required_features"] = list(self.required_features)
 */
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_bbox, __pyx_v_bbox_dict) < 0)) __PYX_ERR(0, 1730, __pyx_L1_error)

    /* "pyrosm_proto.pyx":1729
 *         out = {}
 *         bbox_dict = self.bbox.SerializeToDict()
 *         if bbox_dict != {}:             # <<<<<<<<<<<<<<
 *             out["bbox"] = bbox_dict
 *         if len(self.required_features) > 0:
 */
  }

  /* "pyrosm_proto.pyx":1731
 *         if bbox_dict != {}:
 *             out["bbox"] = bbox_dict
 *         if len(self.required_features) > 0:             # <<<<<<<<<<<<<<
 *             out["required_features"] = list(self.required_features)
 *         if len(self.optional_features) > 0:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_required_features); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1731, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((__pyx_t_5 > 0) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1732
 *             out["bbox"] = bbox_dict
 *         if len(self.required_features) > 0:
 *             out["required_features"] = list(self.required_features)             # <<<<<<<<<<<<<<
 *         if len(self.optional_features) > 0:
 *             out["optional_features"] = list(self.optional_features)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_required_features); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_required_features, __pyx_t_1) < 0)) __PYX_ERR(0, 1732, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":1731
 *         if bbox_dict != {}:
 *             out["bbox"] = bbox_dict
 *         if len(self.required_features) > 0:             # <<<<<<<<<<<<<<
 *             out["required_features"] = list(self.required_features)
 *         if len(self.optional_features) > 0:
 */
  }

  /* "pyrosm_proto.pyx":1733
 *         if len(self.required_features) > 0:
 *             out["required_features"] = list(self.required_features)
 *         if len(self.optional_features) > 0:             # <<<<<<<<<<<<<<
 *             out["optional_features"] = list(self.optional_features)
 *         if self.__field_bitmap0 & 32768 == 32768:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_optional_features); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_t_5 > 0) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1734
 *             out["required_features"] = list(self.required_features)
 *         if len(self.optional_features) > 0:
 *             out["optional_features"] = list(self.optional_features)             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 32768 == 32768:
 *             out["writingprogram"] = self.writingprogram
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_optional_features); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_optional_features, __pyx_t_3) < 0)) __PYX_ERR(0, 1734, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1733
 *         if len(self.required_features) > 0:
 *             out["required_features"] = list(self.required_features)
 *         if len(self.optional_features) > 0:             # <<<<<<<<<<<<<<
 *             out["optional_features"] = list(self.optional_features)
 *         if self.__field_bitmap0 & 32768 == 32768:
 */
  }

  /* "pyrosm_proto.pyx":1735
 *         if len(self.optional_features) > 0:
 *             out["optional_features"] = list(self.optional_features)
 *         if self.__field_bitmap0 & 32768 == 32768:             # <<<<<<<<<<<<<<
 *             out["writingprogram"] = self.writingprogram
 *         if self.__field_bitmap0 & 65536 == 65536:
 */
  __pyx_t_4 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x8000) == 0x8000) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1736
 *             out["optional_features"] = list(self.optional_features)
 *         if self.__field_bitmap0 & 32768 == 32768:
 *             out["writingprogram"] = self.writingprogram             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["source"] = self.source
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_writingprogram); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_writingprogram, __pyx_t_3) < 0)) __PYX_ERR(0, 1736, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1735
 *         if len(self.optional_features) > 0:
 *             out["optional_features"] = list(self.optional_features)
 *         if self.__field_bitmap0 & 32768 == 32768:             # <<<<<<<<<<<<<<
 *             out["writingprogram"] = self.writingprogram
 *         if self.__field_bitmap0 & 65536 == 65536:
 */
  }

  /* "pyrosm_proto.pyx":1737
 *         if self.__field_bitmap0 & 32768 == 32768:
 *             out["writingprogram"] = self.writingprogram
 *         if self.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             out["source"] = self.source
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:
 */
  __pyx_t_4 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x10000) == 0x10000) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1738
 *             out["writingprogram"] = self.writingprogram
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["source"] = self.source             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:
 *             out["osmosis_replication_timestamp"] = self.osmosis_replication_timestamp
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_source, __pyx_t_3) < 0)) __PYX_ERR(0, 1738, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1737
 *         if self.__field_bitmap0 & 32768 == 32768:
 *             out["writingprogram"] = self.writingprogram
 *         if self.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             out["source"] = self.source
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:
 */
  }

  /* "pyrosm_proto.pyx":1739
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["source"] = self.source
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:             # <<<<<<<<<<<<<<
 *             out["osmosis_replication_timestamp"] = self.osmosis_replication_timestamp
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:
 */
  __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_And(__pyx_t_3, __pyx_int_2147483648); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_int_2147483648, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1740
 *             out["source"] = self.source
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:
 *             out["osmosis_replication_timestamp"] = self.osmosis_replication_timestamp             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:
 *             out["osmosis_replication_sequence_number"] = self.osmosis_replication_sequence_number
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_osmosis_replication_timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_osmosis_replication_timestamp, __pyx_t_3) < 0)) __PYX_ERR(0, 1740, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1739
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["source"] = self.source
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:             # <<<<<<<<<<<<<<
 *             out["osmosis_replication_timestamp"] = self.osmosis_replication_timestamp
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:
 */
  }

  /* "pyrosm_proto.pyx":1741
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:
 *             out["osmosis_replication_timestamp"] = self.osmosis_replication_timestamp
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:             # <<<<<<<<<<<<<<
 *             out["osmosis_replication_sequence_number"] = self.osmosis_replication_sequence_number
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:
 */
  __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_And(__pyx_t_3, __pyx_int_4294967296); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_int_4294967296, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1741, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1741, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1742
 *             out["osmosis_replication_timestamp"] = self.osmosis_replication_timestamp
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:
 *             out["osmosis_replication_sequence_number"] = self.osmosis_replication_sequence_number             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:
 *             out["osmosis_replication_base_url"] = self.osmosis_replication_base_url
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_osmosis_replication_sequence_num); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_osmosis_replication_sequence_num, __pyx_t_3) < 0)) __PYX_ERR(0, 1742, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1741
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:
 *             out["osmosis_replication_timestamp"] = self.osmosis_replication_timestamp
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:             # <<<<<<<<<<<<<<
 *             out["osmosis_replication_sequence_number"] = self.osmosis_replication_sequence_number
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:
 */
  }

  /* "pyrosm_proto.pyx":1743
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:
 *             out["osmosis_replication_sequence_number"] = self.osmosis_replication_sequence_number
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:             # <<<<<<<<<<<<<<
 *             out["osmosis_replication_base_url"] = self.osmosis_replication_base_url
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_And(__pyx_t_3, __pyx_int_8589934592); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_int_8589934592, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1744
 *             out["osmosis_replication_sequence_number"] = self.osmosis_replication_sequence_number
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:
 *             out["osmosis_replication_base_url"] = self.osmosis_replication_base_url             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_osmosis_replication_base_url); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_osmosis_replication_base_url, __pyx_t_3) < 0)) __PYX_ERR(0, 1744, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1743
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:
 *             out["osmosis_replication_sequence_number"] = self.osmosis_replication_sequence_number
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:             # <<<<<<<<<<<<<<
 *             out["osmosis_replication_base_url"] = self.osmosis_replication_base_url
 * 
 */
  }

  /* "pyrosm_proto.pyx":1746
 *             out["osmosis_replication_base_url"] = self.osmosis_replication_base_url
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1720
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.SerializeToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_bbox_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1748
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_46SerializePartialToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_46SerializePartialToDict(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_bbox_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  __Pyx_RefNannySetupContext("SerializePartialToDict", 0);

  /* "pyrosm_proto.pyx":1755
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         bbox_dict = self.bbox.SerializePartialToDict()
 *         if bbox_dict != {}:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1756
 *         """
 *         out = {}
 *         bbox_dict = self.bbox.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         if bbox_dict != {}:
 *             out["bbox"] = bbox_dict
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bbox); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_bbox_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1757
 *         out = {}
 *         bbox_dict = self.bbox.SerializePartialToDict()
 *         if bbox_dict != {}:             # <<<<<<<<<<<<<<
 *             out["bbox"] = bbox_dict
 *         if len(self.required_features) > 0:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_bbox_dict, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1758
 *         bbox_dict = self.bbox.SerializePartialToDict()
 *         if bbox_dict != {}:
 *             out["bbox"] = bbox_dict             # <<<<<<<<<<<<<<
 *         if len(self.required_features) > 0:
 *             out["required_features"] = list(self.required_features)
 */
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_bbox, __pyx_v_bbox_dict) < 0)) __PYX_ERR(0, 1758, __pyx_L1_error)

    /* "pyrosm_proto.pyx":1757
 *         out = {}
 *         bbox_dict = self.bbox.SerializePartialToDict()
 *         if bbox_dict != {}:             # <<<<<<<<<<<<<<
 *             out["bbox"] = bbox_dict
 *         if len(self.required_features) > 0:
 */
  }

  /* "pyrosm_proto.pyx":1759
 *         if bbox_dict != {}:
 *             out["bbox"] = bbox_dict
 *         if len(self.required_features) > 0:             # <<<<<<<<<<<<<<
 *             out["required_features"] = list(self.required_features)
 *         if len(self.optional_features) > 0:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_required_features); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1759, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((__pyx_t_5 > 0) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1760
 *             out["bbox"] = bbox_dict
 *         if len(self.required_features) > 0:
 *             out["required_features"] = list(self.required_features)             # <<<<<<<<<<<<<<
 *         if len(self.optional_features) > 0:
 *             out["optional_features"] = list(self.optional_features)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_required_features); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_required_features, __pyx_t_1) < 0)) __PYX_ERR(0, 1760, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":1759
 *         if bbox_dict != {}:
 *             out["bbox"] = bbox_dict
 *         if len(self.required_features) > 0:             # <<<<<<<<<<<<<<
 *             out["required_features"] = list(self.required_features)
 *         if len(self.optional_features) > 0:
 */
  }

  /* "pyrosm_proto.pyx":1761
 *         if len(self.required_features) > 0:
 *             out["required_features"] = list(self.required_features)
 *         if len(self.optional_features) > 0:             # <<<<<<<<<<<<<<
 *             out["optional_features"] = list(self.optional_features)
 *         if self.__field_bitmap0 & 32768 == 32768:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_optional_features); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_t_5 > 0) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1762
 *             out["required_features"] = list(self.required_features)
 *         if len(self.optional_features) > 0:
 *             out["optional_features"] = list(self.optional_features)             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 32768 == 32768:
 *             out["writingprogram"] = self.writingprogram
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_optional_features); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_optional_features, __pyx_t_3) < 0)) __PYX_ERR(0, 1762, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1761
 *         if len(self.required_features) > 0:
 *             out["required_features"] = list(self.required_features)
 *         if len(self.optional_features) > 0:             # <<<<<<<<<<<<<<
 *             out["optional_features"] = list(self.optional_features)
 *         if self.__field_bitmap0 & 32768 == 32768:
 */
  }

  /* "pyrosm_proto.pyx":1763
 *         if len(self.optional_features) > 0:
 *             out["optional_features"] = list(self.optional_features)
 *         if self.__field_bitmap0 & 32768 == 32768:             # <<<<<<<<<<<<<<
 *             out["writingprogram"] = self.writingprogram
 *         if self.__field_bitmap0 & 65536 == 65536:
 */
  __pyx_t_4 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x8000) == 0x8000) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1764
 *             out["optional_features"] = list(self.optional_features)
 *         if self.__field_bitmap0 & 32768 == 32768:
 *             out["writingprogram"] = self.writingprogram             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["source"] = self.source
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_writingprogram); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_writingprogram, __pyx_t_3) < 0)) __PYX_ERR(0, 1764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1763
 *         if len(self.optional_features) > 0:
 *             out["optional_features"] = list(self.optional_features)
 *         if self.__field_bitmap0 & 32768 == 32768:             # <<<<<<<<<<<<<<
 *             out["writingprogram"] = self.writingprogram
 *         if self.__field_bitmap0 & 65536 == 65536:
 */
  }

  /* "pyrosm_proto.pyx":1765
 *         if self.__field_bitmap0 & 32768 == 32768:
 *             out["writingprogram"] = self.writingprogram
 *         if self.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             out["source"] = self.source
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:
 */
  __pyx_t_4 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x10000) == 0x10000) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1766
 *             out["writingprogram"] = self.writingprogram
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["source"] = self.source             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:
 *             out["osmosis_replication_timestamp"] = self.osmosis_replication_timestamp
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_source, __pyx_t_3) < 0)) __PYX_ERR(0, 1766, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1765
 *         if self.__field_bitmap0 & 32768 == 32768:
 *             out["writingprogram"] = self.writingprogram
 *         if self.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             out["source"] = self.source
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:
 */
  }

  /* "pyrosm_proto.pyx":1767
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["source"] = self.source
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:             # <<<<<<<<<<<<<<
 *             out["osmosis_replication_timestamp"] = self.osmosis_replication_timestamp
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:
 */
  __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_And(__pyx_t_3, __pyx_int_2147483648); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_int_2147483648, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1768
 *             out["source"] = self.source
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:
 *             out["osmosis_replication_timestamp"] = self.osmosis_replication_timestamp             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:
 *             out["osmosis_replication_sequence_number"] = self.osmosis_replication_sequence_number
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_osmosis_replication_timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_osmosis_replication_timestamp, __pyx_t_3) < 0)) __PYX_ERR(0, 1768, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1767
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["source"] = self.source
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:             # <<<<<<<<<<<<<<
 *             out["osmosis_replication_timestamp"] = self.osmosis_replication_timestamp
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:
 */
  }

  /* "pyrosm_proto.pyx":1769
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:
 *             out["osmosis_replication_timestamp"] = self.osmosis_replication_timestamp
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:             # <<<<<<<<<<<<<<
 *             out["osmosis_replication_sequence_number"] = self.osmosis_replication_sequence_number
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:
 */
  __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_And(__pyx_t_3, __pyx_int_4294967296); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_int_4294967296, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1769, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1769, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1770
 *             out["osmosis_replication_timestamp"] = self.osmosis_replication_timestamp
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:
 *             out["osmosis_replication_sequence_number"] = self.osmosis_replication_sequence_number             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:
 *             out["osmosis_replication_base_url"] = self.osmosis_replication_base_url
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_osmosis_replication_sequence_num); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_osmosis_replication_sequence_num, __pyx_t_3) < 0)) __PYX_ERR(0, 1770, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1769
 *         if self.__field_bitmap0 & 2147483648 == 2147483648:
 *             out["osmosis_replication_timestamp"] = self.osmosis_replication_timestamp
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:             # <<<<<<<<<<<<<<
 *             out["osmosis_replication_sequence_number"] = self.osmosis_replication_sequence_number
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:
 */
  }

  /* "pyrosm_proto.pyx":1771
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:
 *             out["osmosis_replication_sequence_number"] = self.osmosis_replication_sequence_number
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:             # <<<<<<<<<<<<<<
 *             out["osmosis_replication_base_url"] = self.osmosis_replication_base_url
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->__pyx___field_bitmap0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_And(__pyx_t_3, __pyx_int_8589934592); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_int_8589934592, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":1772
 *             out["osmosis_replication_sequence_number"] = self.osmosis_replication_sequence_number
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:
 *             out["osmosis_replication_base_url"] = self.osmosis_replication_base_url             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_osmosis_replication_base_url); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_osmosis_replication_base_url, __pyx_t_3) < 0)) __PYX_ERR(0, 1772, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1771
 *         if self.__field_bitmap0 & 4294967296 == 4294967296:
 *             out["osmosis_replication_sequence_number"] = self.osmosis_replication_sequence_number
 *         if self.__field_bitmap0 & 8589934592 == 8589934592:             # <<<<<<<<<<<<<<
 *             out["osmosis_replication_base_url"] = self.osmosis_replication_base_url
 * 
 */
  }

  /* "pyrosm_proto.pyx":1774
 *             out["osmosis_replication_base_url"] = self.osmosis_replication_base_url
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def Items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1748
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.SerializePartialToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_bbox_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_11HeaderBlock_50generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":1776
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_48Items[] = "\n        Iterator over the field names and values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_48Items(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_48Items(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_8_Items(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_8_Items, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1776, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_11HeaderBlock_50generator8, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Items, __pyx_n_s_HeaderBlock_Items, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 1776, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_11HeaderBlock_50generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    case 7: goto __pyx_L10_resume_from_yield;
    case 8: goto __pyx_L11_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1776, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1783
 *             iterator
 *         """
 *         yield 'bbox', self.bbox             # <<<<<<<<<<<<<<
 *         yield 'required_features', self.required_features
 *         yield 'optional_features', self.optional_features
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_bbox); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_bbox);
  __Pyx_GIVEREF(__pyx_n_s_bbox);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_bbox);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1783, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1784
 *         """
 *         yield 'bbox', self.bbox
 *         yield 'required_features', self.required_features             # <<<<<<<<<<<<<<
 *         yield 'optional_features', self.optional_features
 *         yield 'writingprogram', self.writingprogram
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_required_features); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_required_features);
  __Pyx_GIVEREF(__pyx_n_s_required_features);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_required_features);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1784, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1785
 *         yield 'bbox', self.bbox
 *         yield 'required_features', self.required_features
 *         yield 'optional_features', self.optional_features             # <<<<<<<<<<<<<<
 *         yield 'writingprogram', self.writingprogram
 *         yield 'source', self.source
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_optional_features); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_optional_features);
  __Pyx_GIVEREF(__pyx_n_s_optional_features);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_optional_features);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1785, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1786
 *         yield 'required_features', self.required_features
 *         yield 'optional_features', self.optional_features
 *         yield 'writingprogram', self.writingprogram             # <<<<<<<<<<<<<<
 *         yield 'source', self.source
 *         yield 'osmosis_replication_timestamp', self.osmosis_replication_timestamp
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_writingprogram); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_writingprogram);
  __Pyx_GIVEREF(__pyx_n_s_writingprogram);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_writingprogram);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1786, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1787
 *         yield 'optional_features', self.optional_features
 *         yield 'writingprogram', self.writingprogram
 *         yield 'source', self.source             # <<<<<<<<<<<<<<
 *         yield 'osmosis_replication_timestamp', self.osmosis_replication_timestamp
 *         yield 'osmosis_replication_sequence_number', self.osmosis_replication_sequence_number
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_source);
  __Pyx_GIVEREF(__pyx_n_s_source);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_source);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1787, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1788
 *         yield 'writingprogram', self.writingprogram
 *         yield 'source', self.source
 *         yield 'osmosis_replication_timestamp', self.osmosis_replication_timestamp             # <<<<<<<<<<<<<<
 *         yield 'osmosis_replication_sequence_number', self.osmosis_replication_sequence_number
 *         yield 'osmosis_replication_base_url', self.osmosis_replication_base_url
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_osmosis_replication_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_osmosis_replication_timestamp);
  __Pyx_GIVEREF(__pyx_n_s_osmosis_replication_timestamp);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_osmosis_replication_timestamp);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1788, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1789
 *         yield 'source', self.source
 *         yield 'osmosis_replication_timestamp', self.osmosis_replication_timestamp
 *         yield 'osmosis_replication_sequence_number', self.osmosis_replication_sequence_number             # <<<<<<<<<<<<<<
 *         yield 'osmosis_replication_base_url', self.osmosis_replication_base_url
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_osmosis_replication_sequence_num); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_osmosis_replication_sequence_num);
  __Pyx_GIVEREF(__pyx_n_s_osmosis_replication_sequence_num);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_osmosis_replication_sequence_num);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 7;
  return __pyx_r;
  __pyx_L10_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1789, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1790
 *         yield 'osmosis_replication_timestamp', self.osmosis_replication_timestamp
 *         yield 'osmosis_replication_sequence_number', self.osmosis_replication_sequence_number
 *         yield 'osmosis_replication_base_url', self.osmosis_replication_base_url             # <<<<<<<<<<<<<<
 * 
 *     def Fields(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_osmosis_replication_base_url); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_osmosis_replication_base_url);
  __Pyx_GIVEREF(__pyx_n_s_osmosis_replication_base_url);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_osmosis_replication_base_url);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 8;
  return __pyx_r;
  __pyx_L11_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1790, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":1776
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_11HeaderBlock_53generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":1792
 *         yield 'osmosis_replication_base_url', self.osmosis_replication_base_url
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_51Fields[] = "\n        Iterator over the field names of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_51Fields(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_9_Fields(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_9_Fields, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1792, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_11HeaderBlock_53generator9, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Fields, __pyx_n_s_HeaderBlock_Fields, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 1792, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_11HeaderBlock_53generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    case 7: goto __pyx_L10_resume_from_yield;
    case 8: goto __pyx_L11_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1792, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1799
 *             iterator
 *         """
 *         yield 'bbox'             # <<<<<<<<<<<<<<
 *         yield 'required_features'
 *         yield 'optional_features'
 */
  __Pyx_INCREF(__pyx_n_s_bbox);
  __pyx_r = __pyx_n_s_bbox;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1799, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1800
 *         """
 *         yield 'bbox'
 *         yield 'required_features'             # <<<<<<<<<<<<<<
 *         yield 'optional_features'
 *         yield 'writingprogram'
 */
  __Pyx_INCREF(__pyx_n_s_required_features);
  __pyx_r = __pyx_n_s_required_features;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1800, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1801
 *         yield 'bbox'
 *         yield 'required_features'
 *         yield 'optional_features'             # <<<<<<<<<<<<<<
 *         yield 'writingprogram'
 *         yield 'source'
 */
  __Pyx_INCREF(__pyx_n_s_optional_features);
  __pyx_r = __pyx_n_s_optional_features;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1801, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1802
 *         yield 'required_features'
 *         yield 'optional_features'
 *         yield 'writingprogram'             # <<<<<<<<<<<<<<
 *         yield 'source'
 *         yield 'osmosis_replication_timestamp'
 */
  __Pyx_INCREF(__pyx_n_s_writingprogram);
  __pyx_r = __pyx_n_s_writingprogram;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1802, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1803
 *         yield 'optional_features'
 *         yield 'writingprogram'
 *         yield 'source'             # <<<<<<<<<<<<<<
 *         yield 'osmosis_replication_timestamp'
 *         yield 'osmosis_replication_sequence_number'
 */
  __Pyx_INCREF(__pyx_n_s_source);
  __pyx_r = __pyx_n_s_source;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1803, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1804
 *         yield 'writingprogram'
 *         yield 'source'
 *         yield 'osmosis_replication_timestamp'             # <<<<<<<<<<<<<<
 *         yield 'osmosis_replication_sequence_number'
 *         yield 'osmosis_replication_base_url'
 */
  __Pyx_INCREF(__pyx_n_s_osmosis_replication_timestamp);
  __pyx_r = __pyx_n_s_osmosis_replication_timestamp;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1804, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1805
 *         yield 'source'
 *         yield 'osmosis_replication_timestamp'
 *         yield 'osmosis_replication_sequence_number'             # <<<<<<<<<<<<<<
 *         yield 'osmosis_replication_base_url'
 * 
 */
  __Pyx_INCREF(__pyx_n_s_osmosis_replication_sequence_num);
  __pyx_r = __pyx_n_s_osmosis_replication_sequence_num;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 7;
  return __pyx_r;
  __pyx_L10_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1805, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1806
 *         yield 'osmosis_replication_timestamp'
 *         yield 'osmosis_replication_sequence_number'
 *         yield 'osmosis_replication_base_url'             # <<<<<<<<<<<<<<
 * 
 *     def Values(self):
 */
  __Pyx_INCREF(__pyx_n_s_osmosis_replication_base_url);
  __pyx_r = __pyx_n_s_osmosis_replication_base_url;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 8;
  return __pyx_r;
  __pyx_L11_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1806, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":1792
 *         yield 'osmosis_replication_base_url', self.osmosis_replication_base_url
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_11HeaderBlock_56generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":1808
 *         yield 'osmosis_replication_base_url'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_54Values[] = "\n        Iterator over the values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_54Values(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_54Values(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_10_Values(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_10_Values, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1808, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_11HeaderBlock_56generator10, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Values, __pyx_n_s_HeaderBlock_Values, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 1808, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_11HeaderBlock_56generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    case 7: goto __pyx_L10_resume_from_yield;
    case 8: goto __pyx_L11_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1808, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1815
 *             iterator
 *         """
 *         yield self.bbox             # <<<<<<<<<<<<<<
 *         yield self.required_features
 *         yield self.optional_features
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_bbox); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1815, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1816
 *         """
 *         yield self.bbox
 *         yield self.required_features             # <<<<<<<<<<<<<<
 *         yield self.optional_features
 *         yield self.writingprogram
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_required_features); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1816, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1817
 *         yield self.bbox
 *         yield self.required_features
 *         yield self.optional_features             # <<<<<<<<<<<<<<
 *         yield self.writingprogram
 *         yield self.source
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_optional_features); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1817, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1818
 *         yield self.required_features
 *         yield self.optional_features
 *         yield self.writingprogram             # <<<<<<<<<<<<<<
 *         yield self.source
 *         yield self.osmosis_replication_timestamp
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_writingprogram); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1818, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1819
 *         yield self.optional_features
 *         yield self.writingprogram
 *         yield self.source             # <<<<<<<<<<<<<<
 *         yield self.osmosis_replication_timestamp
 *         yield self.osmosis_replication_sequence_number
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1819, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1820
 *         yield self.writingprogram
 *         yield self.source
 *         yield self.osmosis_replication_timestamp             # <<<<<<<<<<<<<<
 *         yield self.osmosis_replication_sequence_number
 *         yield self.osmosis_replication_base_url
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_osmosis_replication_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1820, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1821
 *         yield self.source
 *         yield self.osmosis_replication_timestamp
 *         yield self.osmosis_replication_sequence_number             # <<<<<<<<<<<<<<
 *         yield self.osmosis_replication_base_url
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_osmosis_replication_sequence_num); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 7;
  return __pyx_r;
  __pyx_L10_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1821, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1822
 *         yield self.osmosis_replication_timestamp
 *         yield self.osmosis_replication_sequence_number
 *         yield self.osmosis_replication_base_url             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_osmosis_replication_base_url); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 8;
  return __pyx_r;
  __pyx_L11_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1822, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":1808
 *         yield 'osmosis_replication_base_url'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_11HeaderBlock_59generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":1826
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11HeaderBlock_57Setters[] = "\n        Iterator over functions to set the fields in a message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_57Setters(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_57Setters(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_11_Setters(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_11_Setters, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1826, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_11HeaderBlock_59generator11, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Setters, __pyx_n_s_HeaderBlock_Setters, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 1826, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.Setters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1833
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.bbox = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_1setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_1setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":1834
 *         """
 *         def setter(value):
 *             self.bbox = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1834, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_bbox, __pyx_v_value) < 0) __PYX_ERR(0, 1834, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1833
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.bbox = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1836
 *             self.bbox = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.required_features = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_3setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_3setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_2setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":1837
 *         yield setter
 *         def setter(value):
 *             self.required_features = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1837, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_required_features, __pyx_v_value) < 0) __PYX_ERR(0, 1837, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1836
 *             self.bbox = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.required_features = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1839
 *             self.required_features = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.optional_features = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_5setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_5setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_4setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":1840
 *         yield setter
 *         def setter(value):
 *             self.optional_features = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1840, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_optional_features, __pyx_v_value) < 0) __PYX_ERR(0, 1840, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1839
 *             self.required_features = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.optional_features = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1842
 *             self.optional_features = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.writingprogram = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_7setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_7setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_6setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":1843
 *         yield setter
 *         def setter(value):
 *             self.writingprogram = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1843, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_writingprogram, __pyx_v_value) < 0) __PYX_ERR(0, 1843, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1842
 *             self.optional_features = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.writingprogram = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1845
 *             self.writingprogram = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.source = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_9setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_9setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_8setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":1846
 *         yield setter
 *         def setter(value):
 *             self.source = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1846, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_source, __pyx_v_value) < 0) __PYX_ERR(0, 1846, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1845
 *             self.writingprogram = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.source = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1848
 *             self.source = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_timestamp = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_11setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_11setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_11setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_11setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_10setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_10setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":1849
 *         yield setter
 *         def setter(value):
 *             self.osmosis_replication_timestamp = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1849, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_osmosis_replication_timestamp, __pyx_v_value) < 0) __PYX_ERR(0, 1849, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1848
 *             self.source = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_timestamp = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1851
 *             self.osmosis_replication_timestamp = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_sequence_number = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_13setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_13setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_13setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_13setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_12setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_12setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":1852
 *         yield setter
 *         def setter(value):
 *             self.osmosis_replication_sequence_number = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1852, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_osmosis_replication_sequence_num, __pyx_v_value) < 0) __PYX_ERR(0, 1852, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1851
 *             self.osmosis_replication_timestamp = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_sequence_number = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1854
 *             self.osmosis_replication_sequence_number = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_base_url = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_15setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_15setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_15setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_7Setters_15setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_14setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_7Setters_14setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":1855
 *         yield setter
 *         def setter(value):
 *             self.osmosis_replication_base_url = value             # <<<<<<<<<<<<<<
 *         yield setter
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1855, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_osmosis_replication_base_url, __pyx_v_value) < 0) __PYX_ERR(0, 1855, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1854
 *             self.osmosis_replication_sequence_number = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_base_url = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1826
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

static PyObject *__pyx_gb_12pyrosm_proto_11HeaderBlock_59generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    case 7: goto __pyx_L10_resume_from_yield;
    case 8: goto __pyx_L11_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1826, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1833
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.bbox = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_1setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_setter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1835
 *         def setter(value):
 *             self.bbox = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.required_features = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1835, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1836
 *             self.bbox = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.required_features = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_3setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1838
 *         def setter(value):
 *             self.required_features = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.optional_features = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1838, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1839
 *             self.required_features = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.optional_features = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_5setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1841
 *         def setter(value):
 *             self.optional_features = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.writingprogram = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1841, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1842
 *             self.optional_features = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.writingprogram = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_7setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1844
 *         def setter(value):
 *             self.writingprogram = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.source = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1844, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1845
 *             self.writingprogram = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.source = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_9setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1847
 *         def setter(value):
 *             self.source = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.osmosis_replication_timestamp = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1847, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1848
 *             self.source = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_timestamp = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_11setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1850
 *         def setter(value):
 *             self.osmosis_replication_timestamp = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.osmosis_replication_sequence_number = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1850, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1851
 *             self.osmosis_replication_timestamp = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_sequence_number = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_13setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1853
 *         def setter(value):
 *             self.osmosis_replication_sequence_number = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.osmosis_replication_base_url = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 7;
  return __pyx_r;
  __pyx_L10_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1853, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1854
 *             self.osmosis_replication_sequence_number = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_base_url = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_11HeaderBlock_7Setters_15setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1856
 *         def setter(value):
 *             self.osmosis_replication_base_url = value
 *         yield setter             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 8;
  return __pyx_r;
  __pyx_L11_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1856, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":1826
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

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

/* "pyrosm_proto.pxd":95
 *     cdef uint64_t __field_bitmap0
 * 
 *     cdef public bint _is_present_in_parent             # <<<<<<<<<<<<<<
 *     cdef bytes _cached_serialization
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_21_is_present_in_parent___get__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_present_in_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 95, __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("pyrosm_proto.HeaderBlock._is_present_in_parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_11HeaderBlock_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11HeaderBlock_21_is_present_in_parent_2__set__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_11HeaderBlock_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 95, __pyx_L1_error)
  __pyx_v_self->_is_present_in_parent = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock._is_present_in_parent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_61__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_61__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_12pyrosm_proto_11HeaderBlock_60__reduce_cython__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_63__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11HeaderBlock_63__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_12pyrosm_proto_11HeaderBlock_62__setstate_cython__(((struct __pyx_obj_12pyrosm_proto_HeaderBlock *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_12pyrosm_proto_11HeaderBlock_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_HeaderBlock *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBlock.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1863
 * cdef class HeaderBBox:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10HeaderBBox_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_10HeaderBBox_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox___cinit__(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static int __pyx_pf_12pyrosm_proto_10HeaderBBox___cinit__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrosm_proto.pyx":1864
 * 
 *     def __cinit__(self):
 *         self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

  /* "pyrosm_proto.pyx":1863
 * cdef class HeaderBBox:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

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

/* "pyrosm_proto.pyx":1868
 * 
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10HeaderBBox_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_10HeaderBBox_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_2__init__(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), __pyx_v_kwargs);

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

static int __pyx_pf_12pyrosm_proto_10HeaderBBox_2__init__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_field_name = NULL;
  PyObject *__pyx_v_field_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrosm_proto.pyx":1869
 * 
 *     def __init__(self, **kwargs):
 *         self.reset()             # <<<<<<<<<<<<<<
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1870
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1870, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":1871
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     setattr(self, field_name, field_value)
 */
    __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1871, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1871, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1871, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1871, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1871, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1871, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 1871, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1871, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1871, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1871, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1871, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 1871, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":1872
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "pyrosm_proto.pyx":1873
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     setattr(self, field_name, field_value)             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 */
          __pyx_t_13 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name, __pyx_v_field_value); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 1873, __pyx_L8_error)

          /* "pyrosm_proto.pyx":1872
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L15_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrosm_proto.pyx":1874
 *                 try:
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return
 */
        __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_14) {
          __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 1874, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_6);

          /* "pyrosm_proto.pyx":1875
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))             # <<<<<<<<<<<<<<
 *         return
 * 
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1875, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_field_name);
          __Pyx_GIVEREF(__pyx_v_field_name);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_field_name);
          __pyx_t_15 = __Pyx_PyString_Format(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1875, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1875, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 1875, __pyx_L10_except_error)
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;

        /* "pyrosm_proto.pyx":1872
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 */
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L15_try_end:;
      }

      /* "pyrosm_proto.pyx":1871
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     setattr(self, field_name, field_value)
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":1870
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  }

  /* "pyrosm_proto.pyx":1876
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1868
 * 
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XDECREF(__pyx_v_field_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1878
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'left',
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_4__str__(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_4__str__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_messages = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyrosm_proto.pyx":1879
 * 
 *     def __str__(self):
 *         fields = [             # <<<<<<<<<<<<<<
 *                           'left',
 *                           'right',
 */
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_left);
  __Pyx_GIVEREF(__pyx_n_s_left);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_left);
  __Pyx_INCREF(__pyx_n_s_right);
  __Pyx_GIVEREF(__pyx_n_s_right);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_right);
  __Pyx_INCREF(__pyx_n_s_top);
  __Pyx_GIVEREF(__pyx_n_s_top);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_top);
  __Pyx_INCREF(__pyx_n_s_bottom);
  __Pyx_GIVEREF(__pyx_n_s_bottom);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_bottom);
  __pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1884
 *                           'top',
 *                           'bottom',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]             # <<<<<<<<<<<<<<
 *         messages = []
 *         for message in messages:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1884, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1884, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1884, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1884, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1885
 *                           'bottom',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []             # <<<<<<<<<<<<<<
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_messages = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1886
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  __pyx_t_1 = __pyx_v_messages; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1886, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":1887
 *         messages = []
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))             # <<<<<<<<<<<<<<
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1887, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":1888
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    __pyx_t_4 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1888, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1888, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1888, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1888, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1888, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1888, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1888, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1888, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1888, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1888, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":1889
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))             # <<<<<<<<<<<<<<
 *             components.append('}')
 *         return '\n'.join(components)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_line);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":1888
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":1890
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 *             components.append('}')             # <<<<<<<<<<<<<<
 *         return '\n'.join(components)
 * 
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_kp_s__2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1890, __pyx_L1_error)

    /* "pyrosm_proto.pyx":1886
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":1891
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 *         return '\n'.join(components)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1878
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'left',
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_messages);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1893
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_10HeaderBBox_reset(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1893, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10HeaderBBox_7reset)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1893, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":1896
 *         # reset values and populate defaults
 * 
 *         self.__field_bitmap0 = 0             # <<<<<<<<<<<<<<
 * 
 *         self._left = 0
 */
  __pyx_v_self->__pyx___field_bitmap0 = 0;

  /* "pyrosm_proto.pyx":1898
 *         self.__field_bitmap0 = 0
 * 
 *         self._left = 0             # <<<<<<<<<<<<<<
 *         self._right = 0
 *         self._top = 0
 */
  __pyx_v_self->_left = 0;

  /* "pyrosm_proto.pyx":1899
 * 
 *         self._left = 0
 *         self._right = 0             # <<<<<<<<<<<<<<
 *         self._top = 0
 *         self._bottom = 0
 */
  __pyx_v_self->_right = 0;

  /* "pyrosm_proto.pyx":1900
 *         self._left = 0
 *         self._right = 0
 *         self._top = 0             # <<<<<<<<<<<<<<
 *         self._bottom = 0
 *         return
 */
  __pyx_v_self->_top = 0;

  /* "pyrosm_proto.pyx":1901
 *         self._right = 0
 *         self._top = 0
 *         self._bottom = 0             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_v_self->_bottom = 0;

  /* "pyrosm_proto.pyx":1902
 *         self._top = 0
 *         self._bottom = 0
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1893
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

  /* 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_WriteUnraisable("pyrosm_proto.HeaderBBox.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_6reset(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_6reset(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10HeaderBBox_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1893, __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("pyrosm_proto.HeaderBBox.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1906
 * 
 *     @property
 *     def left(self):             # <<<<<<<<<<<<<<
 *         return self._left
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_4left_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_4left_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_4left___get__(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_4left___get__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":1907
 *     @property
 *     def left(self):
 *         return self._left             # <<<<<<<<<<<<<<
 * 
 *     @left.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1906
 * 
 *     @property
 *     def left(self):             # <<<<<<<<<<<<<<
 *         return self._left
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.left.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1910
 * 
 *     @left.setter
 *     def left(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         self._left = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10HeaderBBox_4left_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_10HeaderBBox_4left_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_4left_2__set__(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_10HeaderBBox_4left_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":1911
 *     @left.setter
 *     def left(self, value):
 *         self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *         self._left = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

  /* "pyrosm_proto.pyx":1912
 *     def left(self, value):
 *         self.__field_bitmap0 |= 1
 *         self._left = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1912, __pyx_L1_error)
  __pyx_v_self->_left = __pyx_t_1;

  /* "pyrosm_proto.pyx":1913
 *         self.__field_bitmap0 |= 1
 *         self._left = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1910
 * 
 *     @left.setter
 *     def left(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         self._left = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.left.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1916
 * 
 *     @property
 *     def right(self):             # <<<<<<<<<<<<<<
 *         return self._right
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_5right_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_5right_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_5right___get__(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_5right___get__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":1917
 *     @property
 *     def right(self):
 *         return self._right             # <<<<<<<<<<<<<<
 * 
 *     @right.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1916
 * 
 *     @property
 *     def right(self):             # <<<<<<<<<<<<<<
 *         return self._right
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.right.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1920
 * 
 *     @right.setter
 *     def right(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 2
 *         self._right = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10HeaderBBox_5right_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_10HeaderBBox_5right_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_5right_2__set__(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_10HeaderBBox_5right_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":1921
 *     @right.setter
 *     def right(self, value):
 *         self.__field_bitmap0 |= 2             # <<<<<<<<<<<<<<
 *         self._right = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 2);

  /* "pyrosm_proto.pyx":1922
 *     def right(self, value):
 *         self.__field_bitmap0 |= 2
 *         self._right = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1922, __pyx_L1_error)
  __pyx_v_self->_right = __pyx_t_1;

  /* "pyrosm_proto.pyx":1923
 *         self.__field_bitmap0 |= 2
 *         self._right = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1920
 * 
 *     @right.setter
 *     def right(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 2
 *         self._right = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.right.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1926
 * 
 *     @property
 *     def top(self):             # <<<<<<<<<<<<<<
 *         return self._top
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_3top_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_3top_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_3top___get__(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_3top___get__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":1927
 *     @property
 *     def top(self):
 *         return self._top             # <<<<<<<<<<<<<<
 * 
 *     @top.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_top); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1926
 * 
 *     @property
 *     def top(self):             # <<<<<<<<<<<<<<
 *         return self._top
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.top.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1930
 * 
 *     @top.setter
 *     def top(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 4
 *         self._top = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10HeaderBBox_3top_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_10HeaderBBox_3top_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_3top_2__set__(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_10HeaderBBox_3top_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":1931
 *     @top.setter
 *     def top(self, value):
 *         self.__field_bitmap0 |= 4             # <<<<<<<<<<<<<<
 *         self._top = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 4);

  /* "pyrosm_proto.pyx":1932
 *     def top(self, value):
 *         self.__field_bitmap0 |= 4
 *         self._top = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1932, __pyx_L1_error)
  __pyx_v_self->_top = __pyx_t_1;

  /* "pyrosm_proto.pyx":1933
 *         self.__field_bitmap0 |= 4
 *         self._top = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1930
 * 
 *     @top.setter
 *     def top(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 4
 *         self._top = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.top.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1936
 * 
 *     @property
 *     def bottom(self):             # <<<<<<<<<<<<<<
 *         return self._bottom
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_6bottom_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_6bottom_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_6bottom___get__(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_6bottom___get__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":1937
 *     @property
 *     def bottom(self):
 *         return self._bottom             # <<<<<<<<<<<<<<
 * 
 *     @bottom.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_bottom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1936
 * 
 *     @property
 *     def bottom(self):             # <<<<<<<<<<<<<<
 *         return self._bottom
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.bottom.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1940
 * 
 *     @bottom.setter
 *     def bottom(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 8
 *         self._bottom = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10HeaderBBox_6bottom_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_10HeaderBBox_6bottom_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_6bottom_2__set__(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_10HeaderBBox_6bottom_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":1941
 *     @bottom.setter
 *     def bottom(self, value):
 *         self.__field_bitmap0 |= 8             # <<<<<<<<<<<<<<
 *         self._bottom = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 8);

  /* "pyrosm_proto.pyx":1942
 *     def bottom(self, value):
 *         self.__field_bitmap0 |= 8
 *         self._bottom = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1942, __pyx_L1_error)
  __pyx_v_self->_bottom = __pyx_t_1;

  /* "pyrosm_proto.pyx":1943
 *         self.__field_bitmap0 |= 8
 *         self._bottom = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1940
 * 
 *     @bottom.setter
 *     def bottom(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 8
 *         self._bottom = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.bottom.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1946
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

static int __pyx_f_12pyrosm_proto_10HeaderBBox__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, CYTHON_UNUSED int __pyx_v_cache) {
  int __pyx_v_current_offset;
  int64_t __pyx_v_key;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("_protobuf_deserialize", 0);

  /* "pyrosm_proto.pyx":1947
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):
 *         cdef int current_offset = 0             # <<<<<<<<<<<<<<
 *         cdef int64_t key
 *         while current_offset < size:
 */
  __pyx_v_current_offset = 0;

  /* "pyrosm_proto.pyx":1949
 *         cdef int current_offset = 0
 *         cdef int64_t key
 *         while current_offset < size:             # <<<<<<<<<<<<<<
 *             key = get_varint64(memory, &current_offset)
 *             # left
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_current_offset < __pyx_v_size) != 0);
    if (!__pyx_t_1) break;

    /* "pyrosm_proto.pyx":1950
 *         cdef int64_t key
 *         while current_offset < size:
 *             key = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # left
 *             if key == 8:
 */
    __pyx_v_key = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

    /* "pyrosm_proto.pyx":1952
 *             key = get_varint64(memory, &current_offset)
 *             # left
 *             if key == 8:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 self._left = get_signed_varint64(memory, &current_offset)
 */
    switch (__pyx_v_key) {
      case 8:

      /* "pyrosm_proto.pyx":1953
 *             # left
 *             if key == 8:
 *                 self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *                 self._left = get_signed_varint64(memory, &current_offset)
 *             # right
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

      /* "pyrosm_proto.pyx":1954
 *             if key == 8:
 *                 self.__field_bitmap0 |= 1
 *                 self._left = get_signed_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # right
 *             elif key == 16:
 */
      __pyx_v_self->_left = __pyx_f_12pyrobuf_util_get_signed_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":1952
 *             key = get_varint64(memory, &current_offset)
 *             # left
 *             if key == 8:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 self._left = get_signed_varint64(memory, &current_offset)
 */
      break;
      case 16:

      /* "pyrosm_proto.pyx":1957
 *             # right
 *             elif key == 16:
 *                 self.__field_bitmap0 |= 2             # <<<<<<<<<<<<<<
 *                 self._right = get_signed_varint64(memory, &current_offset)
 *             # top
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 2);

      /* "pyrosm_proto.pyx":1958
 *             elif key == 16:
 *                 self.__field_bitmap0 |= 2
 *                 self._right = get_signed_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # top
 *             elif key == 24:
 */
      __pyx_v_self->_right = __pyx_f_12pyrobuf_util_get_signed_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":1956
 *                 self._left = get_signed_varint64(memory, &current_offset)
 *             # right
 *             elif key == 16:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 2
 *                 self._right = get_signed_varint64(memory, &current_offset)
 */
      break;
      case 24:

      /* "pyrosm_proto.pyx":1961
 *             # top
 *             elif key == 24:
 *                 self.__field_bitmap0 |= 4             # <<<<<<<<<<<<<<
 *                 self._top = get_signed_varint64(memory, &current_offset)
 *             # bottom
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 4);

      /* "pyrosm_proto.pyx":1962
 *             elif key == 24:
 *                 self.__field_bitmap0 |= 4
 *                 self._top = get_signed_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # bottom
 *             elif key == 32:
 */
      __pyx_v_self->_top = __pyx_f_12pyrobuf_util_get_signed_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":1960
 *                 self._right = get_signed_varint64(memory, &current_offset)
 *             # top
 *             elif key == 24:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 4
 *                 self._top = get_signed_varint64(memory, &current_offset)
 */
      break;
      case 32:

      /* "pyrosm_proto.pyx":1965
 *             # bottom
 *             elif key == 32:
 *                 self.__field_bitmap0 |= 8             # <<<<<<<<<<<<<<
 *                 self._bottom = get_signed_varint64(memory, &current_offset)
 *             # Unknown field - need to skip proper number of bytes
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 8);

      /* "pyrosm_proto.pyx":1966
 *             elif key == 32:
 *                 self.__field_bitmap0 |= 8
 *                 self._bottom = get_signed_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 */
      __pyx_v_self->_bottom = __pyx_f_12pyrobuf_util_get_signed_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":1964
 *                 self._top = get_signed_varint64(memory, &current_offset)
 *             # bottom
 *             elif key == 32:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 8
 *                 self._bottom = get_signed_varint64(memory, &current_offset)
 */
      break;
      default:

      /* "pyrosm_proto.pyx":1969
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)             # <<<<<<<<<<<<<<
 * 
 *         self._is_present_in_parent = True
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        if (unlikely(!(__pyx_f_12pyrobuf_util_skip_generic(__pyx_v_memory, (&__pyx_v_current_offset), __pyx_v_size, (__pyx_v_key & 0x7)) != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 1969, __pyx_L1_error)
        }
      }
      #endif
      break;
    }
  }

  /* "pyrosm_proto.pyx":1971
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)
 * 
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 * 
 *         return current_offset
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":1973
 *         self._is_present_in_parent = True
 * 
 *         return current_offset             # <<<<<<<<<<<<<<
 * 
 *     cpdef void Clear(self):
 */
  __pyx_r = __pyx_v_current_offset;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":1946
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pyrosm_proto.HeaderBBox._protobuf_deserialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1975
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_9Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_10HeaderBBox_Clear(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1975, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10HeaderBBox_9Clear)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1975, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":1977
 *     cpdef void Clear(self):
 *         """Clears all data that was set in the message."""
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1978
 *         """Clears all data that was set in the message."""
 *         self.reset()
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void ClearField(self, field_name):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1975
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.HeaderBBox.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_9Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_8Clear[] = "Clears all data that was set in the message.";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_9Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Clear (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_8Clear(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_8Clear(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10HeaderBBox_Clear(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1975, __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("pyrosm_proto.HeaderBBox.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1980
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'left':
 */

static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_11ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static void __pyx_f_12pyrosm_proto_10HeaderBBox_ClearField(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("ClearField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ClearField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1980, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10HeaderBBox_11ClearField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1980, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":1982
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'left':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._left = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_left, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1982, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":1983
 *         """Clears the contents of a given field."""
 *         if field_name == 'left':
 *             self.__field_bitmap0 &= ~1             # <<<<<<<<<<<<<<
 *             self._left = 0
 *         elif field_name == 'right':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~1));

    /* "pyrosm_proto.pyx":1984
 *         if field_name == 'left':
 *             self.__field_bitmap0 &= ~1
 *             self._left = 0             # <<<<<<<<<<<<<<
 *         elif field_name == 'right':
 *             self.__field_bitmap0 &= ~2
 */
    __pyx_v_self->_left = 0;

    /* "pyrosm_proto.pyx":1982
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'left':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._left = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1985
 *             self.__field_bitmap0 &= ~1
 *             self._left = 0
 *         elif field_name == 'right':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~2
 *             self._right = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_right, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1985, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":1986
 *             self._left = 0
 *         elif field_name == 'right':
 *             self.__field_bitmap0 &= ~2             # <<<<<<<<<<<<<<
 *             self._right = 0
 *         elif field_name == 'top':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~2));

    /* "pyrosm_proto.pyx":1987
 *         elif field_name == 'right':
 *             self.__field_bitmap0 &= ~2
 *             self._right = 0             # <<<<<<<<<<<<<<
 *         elif field_name == 'top':
 *             self.__field_bitmap0 &= ~4
 */
    __pyx_v_self->_right = 0;

    /* "pyrosm_proto.pyx":1985
 *             self.__field_bitmap0 &= ~1
 *             self._left = 0
 *         elif field_name == 'right':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~2
 *             self._right = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1988
 *             self.__field_bitmap0 &= ~2
 *             self._right = 0
 *         elif field_name == 'top':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~4
 *             self._top = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_top, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1988, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":1989
 *             self._right = 0
 *         elif field_name == 'top':
 *             self.__field_bitmap0 &= ~4             # <<<<<<<<<<<<<<
 *             self._top = 0
 *         elif field_name == 'bottom':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~4));

    /* "pyrosm_proto.pyx":1990
 *         elif field_name == 'top':
 *             self.__field_bitmap0 &= ~4
 *             self._top = 0             # <<<<<<<<<<<<<<
 *         elif field_name == 'bottom':
 *             self.__field_bitmap0 &= ~8
 */
    __pyx_v_self->_top = 0;

    /* "pyrosm_proto.pyx":1988
 *             self.__field_bitmap0 &= ~2
 *             self._right = 0
 *         elif field_name == 'top':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~4
 *             self._top = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1991
 *             self.__field_bitmap0 &= ~4
 *             self._top = 0
 *         elif field_name == 'bottom':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~8
 *             self._bottom = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_bottom, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1991, __pyx_L1_error)
  if (likely(__pyx_t_5)) {

    /* "pyrosm_proto.pyx":1992
 *             self._top = 0
 *         elif field_name == 'bottom':
 *             self.__field_bitmap0 &= ~8             # <<<<<<<<<<<<<<
 *             self._bottom = 0
 *         else:
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~8));

    /* "pyrosm_proto.pyx":1993
 *         elif field_name == 'bottom':
 *             self.__field_bitmap0 &= ~8
 *             self._bottom = 0             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 */
    __pyx_v_self->_bottom = 0;

    /* "pyrosm_proto.pyx":1991
 *             self.__field_bitmap0 &= ~4
 *             self._top = 0
 *         elif field_name == 'bottom':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~8
 *             self._bottom = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":1995
 *             self._bottom = 0
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1995, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1995, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1995, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":1997
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void CopyFrom(self, HeaderBBox other_msg):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":1980
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'left':
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.HeaderBBox.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_11ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_10ClearField[] = "Clears the contents of a given field.";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_11ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ClearField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_10ClearField(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_10ClearField(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ClearField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10HeaderBBox_ClearField(__pyx_v_self, __pyx_v_field_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1980, __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("pyrosm_proto.HeaderBBox.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":1999
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, HeaderBBox other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_13CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_10HeaderBBox_CopyFrom(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CopyFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1999, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10HeaderBBox_13CopyFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1999, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2006
 *             other_msg (HeaderBBox): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":2007
 *         """
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 *         self.reset()
 *         self.MergeFrom(other_msg)
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2006
 *             other_msg (HeaderBBox): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  }

  /* "pyrosm_proto.pyx":2008
 *         if self is other_msg:
 *             return
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self.MergeFrom(other_msg)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2009
 *             return
 *         self.reset()
 *         self.MergeFrom(other_msg)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint HasField(self, field_name) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->MergeFrom(__pyx_v_self, __pyx_v_other_msg, 0);

  /* "pyrosm_proto.pyx":1999
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, HeaderBBox other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.HeaderBBox.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_13CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_12CopyFrom[] = "\n        Copies the content of the specified message into the current message.\n\n        Params:\n            other_msg (HeaderBBox): Message to copy into the current one.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_13CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CopyFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_HeaderBBox, 1, "other_msg", 0))) __PYX_ERR(0, 1999, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_12CopyFrom(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_12CopyFrom(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10HeaderBBox_CopyFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1999, __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("pyrosm_proto.HeaderBBox.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2011
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_15HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static int __pyx_f_12pyrosm_proto_10HeaderBBox_HasField(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("HasField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_HasField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2011, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10HeaderBBox_15HasField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2011, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2011, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2018
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'left':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'right':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_left, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2018, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2019
 *         """
 *         if field_name == 'left':
 *             return self.__field_bitmap0 & 1 == 1             # <<<<<<<<<<<<<<
 *         if field_name == 'right':
 *             return self.__field_bitmap0 & 2 == 2
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2018
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'left':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'right':
 */
  }

  /* "pyrosm_proto.pyx":2020
 *         if field_name == 'left':
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'right':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'top':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_right, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2020, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2021
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'right':
 *             return self.__field_bitmap0 & 2 == 2             # <<<<<<<<<<<<<<
 *         if field_name == 'top':
 *             return self.__field_bitmap0 & 4 == 4
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2020
 *         if field_name == 'left':
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'right':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'top':
 */
  }

  /* "pyrosm_proto.pyx":2022
 *         if field_name == 'right':
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'top':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 4 == 4
 *         if field_name == 'bottom':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_top, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2022, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2023
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'top':
 *             return self.__field_bitmap0 & 4 == 4             # <<<<<<<<<<<<<<
 *         if field_name == 'bottom':
 *             return self.__field_bitmap0 & 8 == 8
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2022
 *         if field_name == 'right':
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'top':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 4 == 4
 *         if field_name == 'bottom':
 */
  }

  /* "pyrosm_proto.pyx":2024
 *         if field_name == 'top':
 *             return self.__field_bitmap0 & 4 == 4
 *         if field_name == 'bottom':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 8 == 8
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_bottom, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2024, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2025
 *             return self.__field_bitmap0 & 4 == 4
 *         if field_name == 'bottom':
 *             return self.__field_bitmap0 & 8 == 8             # <<<<<<<<<<<<<<
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 8) == 8);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2024
 *         if field_name == 'top':
 *             return self.__field_bitmap0 & 4 == 4
 *         if field_name == 'bottom':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 8 == 8
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  }

  /* "pyrosm_proto.pyx":2026
 *         if field_name == 'bottom':
 *             return self.__field_bitmap0 & 8 == 8
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint IsInitialized(self):
 */
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_singular, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 2026, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2011
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

  /* 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("pyrosm_proto.HeaderBBox.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_15HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_14HasField[] = "\n        Checks if a certain field is set for the message.\n\n        Params:\n            field_name (str): The name of the field to check.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_15HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_14HasField(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_14HasField(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("HasField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_10HeaderBBox_HasField(__pyx_v_self, __pyx_v_field_name, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2011, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2028
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_17IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_12pyrosm_proto_10HeaderBBox_IsInitialized(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_IsInitialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10HeaderBBox_17IsInitialized)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2028, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2028, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2038
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             return False
 *         if self.__field_bitmap0 & 2 != 2:
 */
  __pyx_t_5 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2039
 * 
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 2 != 2:
 *             return False
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2038
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             return False
 *         if self.__field_bitmap0 & 2 != 2:
 */
  }

  /* "pyrosm_proto.pyx":2040
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False
 *         if self.__field_bitmap0 & 2 != 2:             # <<<<<<<<<<<<<<
 *             return False
 *         if self.__field_bitmap0 & 4 != 4:
 */
  __pyx_t_5 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) != 2) != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2041
 *             return False
 *         if self.__field_bitmap0 & 2 != 2:
 *             return False             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 != 4:
 *             return False
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2040
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False
 *         if self.__field_bitmap0 & 2 != 2:             # <<<<<<<<<<<<<<
 *             return False
 *         if self.__field_bitmap0 & 4 != 4:
 */
  }

  /* "pyrosm_proto.pyx":2042
 *         if self.__field_bitmap0 & 2 != 2:
 *             return False
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             return False
 *         if self.__field_bitmap0 & 8 != 8:
 */
  __pyx_t_5 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) != 4) != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2043
 *             return False
 *         if self.__field_bitmap0 & 4 != 4:
 *             return False             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 8 != 8:
 *             return False
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2042
 *         if self.__field_bitmap0 & 2 != 2:
 *             return False
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             return False
 *         if self.__field_bitmap0 & 8 != 8:
 */
  }

  /* "pyrosm_proto.pyx":2044
 *         if self.__field_bitmap0 & 4 != 4:
 *             return False
 *         if self.__field_bitmap0 & 8 != 8:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  __pyx_t_5 = (((__pyx_v_self->__pyx___field_bitmap0 & 8) != 8) != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2045
 *             return False
 *         if self.__field_bitmap0 & 8 != 8:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         return True
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2044
 *         if self.__field_bitmap0 & 4 != 4:
 *             return False
 *         if self.__field_bitmap0 & 8 != 8:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  }

  /* "pyrosm_proto.pyx":2047
 *             return False
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef void MergeFrom(self, HeaderBBox other_msg):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2028
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

  /* 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_WriteUnraisable("pyrosm_proto.HeaderBBox.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_17IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_16IsInitialized[] = "\n        Checks if the message is initialized.\n\n        Returns:\n            bool: True if the message is initialized (i.e. all of its required\n                fields are set).\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_17IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsInitialized (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_16IsInitialized(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_16IsInitialized(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_12pyrosm_proto_10HeaderBBox_IsInitialized(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2028, __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("pyrosm_proto.HeaderBBox.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2049
 *         return True
 * 
 *     cpdef void MergeFrom(self, HeaderBBox other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_19MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_10HeaderBBox_MergeFrom(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int64_t __pyx_t_7;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10HeaderBBox_19MergeFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2049, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2057
 *         """
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":2058
 * 
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2057
 *         """
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "pyrosm_proto.pyx":2061
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._left = other_msg._left
 *             self.__field_bitmap0 |= 1
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":2062
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._left = other_msg._left             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:
 */
    __pyx_t_7 = __pyx_v_other_msg->_left;
    __pyx_v_self->_left = __pyx_t_7;

    /* "pyrosm_proto.pyx":2063
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._left = other_msg._left
 *             self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 2 == 2:
 *             self._right = other_msg._right
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

    /* "pyrosm_proto.pyx":2061
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._left = other_msg._left
 *             self.__field_bitmap0 |= 1
 */
  }

  /* "pyrosm_proto.pyx":2064
 *             self._left = other_msg._left
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             self._right = other_msg._right
 *             self.__field_bitmap0 |= 2
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":2065
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:
 *             self._right = other_msg._right             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:
 */
    __pyx_t_7 = __pyx_v_other_msg->_right;
    __pyx_v_self->_right = __pyx_t_7;

    /* "pyrosm_proto.pyx":2066
 *         if other_msg.__field_bitmap0 & 2 == 2:
 *             self._right = other_msg._right
 *             self.__field_bitmap0 |= 2             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 4 == 4:
 *             self._top = other_msg._top
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 2);

    /* "pyrosm_proto.pyx":2064
 *             self._left = other_msg._left
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             self._right = other_msg._right
 *             self.__field_bitmap0 |= 2
 */
  }

  /* "pyrosm_proto.pyx":2067
 *             self._right = other_msg._right
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             self._top = other_msg._top
 *             self.__field_bitmap0 |= 4
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":2068
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:
 *             self._top = other_msg._top             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 4
 *         if other_msg.__field_bitmap0 & 8 == 8:
 */
    __pyx_t_7 = __pyx_v_other_msg->_top;
    __pyx_v_self->_top = __pyx_t_7;

    /* "pyrosm_proto.pyx":2069
 *         if other_msg.__field_bitmap0 & 4 == 4:
 *             self._top = other_msg._top
 *             self.__field_bitmap0 |= 4             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 8 == 8:
 *             self._bottom = other_msg._bottom
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 4);

    /* "pyrosm_proto.pyx":2067
 *             self._right = other_msg._right
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             self._top = other_msg._top
 *             self.__field_bitmap0 |= 4
 */
  }

  /* "pyrosm_proto.pyx":2070
 *             self._top = other_msg._top
 *             self.__field_bitmap0 |= 4
 *         if other_msg.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             self._bottom = other_msg._bottom
 *             self.__field_bitmap0 |= 8
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 8) == 8) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":2071
 *             self.__field_bitmap0 |= 4
 *         if other_msg.__field_bitmap0 & 8 == 8:
 *             self._bottom = other_msg._bottom             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 8
 * 
 */
    __pyx_t_7 = __pyx_v_other_msg->_bottom;
    __pyx_v_self->_bottom = __pyx_t_7;

    /* "pyrosm_proto.pyx":2072
 *         if other_msg.__field_bitmap0 & 8 == 8:
 *             self._bottom = other_msg._bottom
 *             self.__field_bitmap0 |= 8             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 8);

    /* "pyrosm_proto.pyx":2070
 *             self._top = other_msg._top
 *             self.__field_bitmap0 |= 4
 *         if other_msg.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             self._bottom = other_msg._bottom
 *             self.__field_bitmap0 |= 8
 */
  }

  /* "pyrosm_proto.pyx":2074
 *             self.__field_bitmap0 |= 8
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2049
 *         return True
 * 
 *     cpdef void MergeFrom(self, HeaderBBox other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.HeaderBBox.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_19MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_18MergeFrom[] = "\n        Merges the contents of the specified message into the current message.\n\n        Params:\n            other_msg: Message to merge into the current message.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_19MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_HeaderBBox, 1, "other_msg", 0))) __PYX_ERR(0, 2049, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_18MergeFrom(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_18MergeFrom(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10HeaderBBox_MergeFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2049, __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("pyrosm_proto.HeaderBBox.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2076
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_21MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_10HeaderBBox_MergeFromString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_MergeFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  unsigned char const *__pyx_t_10;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2076, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10HeaderBBox_21MergeFromString)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2076, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2076, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2076, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2076, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2076, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2090
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, False)
 */
  __pyx_t_7 = (__pyx_v_size != Py_None);
  if ((__pyx_t_7 != 0)) {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2090, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_8;
  } else {
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2090, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_9;
  }
  __pyx_v_length = __pyx_t_5;

  /* "pyrosm_proto.pyx":2092
 *         length = size if size is not None else len(data)
 * 
 *         buf = self._protobuf_deserialize(data, length, False)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_10 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 2092, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_10, __pyx_v_length, 0);

  /* "pyrosm_proto.pyx":2094
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  __pyx_t_7 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "pyrosm_proto.pyx":2095
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_GIVEREF(__pyx_v_size);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_size);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Truncated_message_got_s_expected, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2095, __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, 2095, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2094
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  }

  /* "pyrosm_proto.pyx":2097
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2099
 *         self._Modified()
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2076
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_21MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_20MergeFromString[] = "\n        Merges serialized protocol buffer data into this message.\n\n        Params:\n            data (bytes): a string of binary data.\n            size (int): optional - the length of the data string\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_21MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "MergeFromString") < 0)) __PYX_ERR(0, 2076, __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_data = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MergeFromString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2076, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_20MergeFromString(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), __pyx_v_data, __pyx_v_size);

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_20MergeFromString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_MergeFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_HeaderBBox->MergeFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2076, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2101
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_23ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_10HeaderBBox_ParseFromString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_ParseFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_reset = ((int)1);
  int __pyx_v_cache = ((int)0);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  unsigned char const *__pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_reset = __pyx_optional_args->reset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cache = __pyx_optional_args->cache;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2101, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10HeaderBBox_23ParseFromString)) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2101, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2101, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2101, __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(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2101, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_size);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 3+__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, 2101, __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, 2101, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2117
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         if reset:
 */
  __pyx_t_9 = (__pyx_v_size != Py_None);
  if ((__pyx_t_9 != 0)) {
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2117, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2117, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_11;
  }
  __pyx_v_length = __pyx_t_7;

  /* "pyrosm_proto.pyx":2119
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_9 = (__pyx_v_reset != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":2120
 * 
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":2119
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":2122
 *             self.reset()
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_12 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 2122, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_12, __pyx_v_length, __pyx_v_cache);

  /* "pyrosm_proto.pyx":2124
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  __pyx_t_9 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "pyrosm_proto.pyx":2125
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message")             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s_Truncated_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Truncated_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2125, __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, 2125, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2124
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  }

  /* "pyrosm_proto.pyx":2127
 *             raise DecodeError("Truncated message")
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2129
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  __pyx_t_9 = (__pyx_v_cache != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":2130
 * 
 *         if cache:
 *             self._cached_serialization = data             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) __PYX_ERR(0, 2130, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":2129
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  }

  /* "pyrosm_proto.pyx":2132
 *             self._cached_serialization = data
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2101
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_23ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_22ParseFromString[] = "\n        Populate the message class from a string of protobuf encoded binary data.\n\n        Params:\n            data (bytes): a string of binary data\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n            cache (bool): optional - whether to cache serialized data\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_23ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_v_reset;
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,&__pyx_n_s_cache,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromString") < 0)) __PYX_ERR(0, 2101, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    if (values[2]) {
      __pyx_v_reset = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2101, __pyx_L3_error)
    } else {
      __pyx_v_reset = ((int)1);
    }
    if (values[3]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2101, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromString", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2101, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_22ParseFromString(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset, __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_22ParseFromString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_ParseFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.reset = __pyx_v_reset;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_HeaderBBox->ParseFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2101, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2135
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_25FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_25FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FromString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_24FromString(((PyTypeObject*)__pyx_v_cls), ((PyObject *)__pyx_v_s));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_24FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("FromString", 0);

  /* "pyrosm_proto.pyx":2136
 *     @classmethod
 *     def FromString(cls, s):
 *         message = cls()             # <<<<<<<<<<<<<<
 *         message.MergeFromString(s)
 *         return message
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2137
 *     def FromString(cls, s):
 *         message = cls()
 *         message.MergeFromString(s)             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2137, __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;

  /* "pyrosm_proto.pyx":2138
 *         message = cls()
 *         message.MergeFromString(s)
 *         return message             # <<<<<<<<<<<<<<
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2135
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.FromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2140
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         # left
 *         if self.__field_bitmap0 & 1 == 1:
 */

static void __pyx_f_12pyrosm_proto_10HeaderBBox__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_buf, CYTHON_UNUSED int __pyx_v_cache) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("_protobuf_serialize", 0);

  /* "pyrosm_proto.pyx":2142
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 *         # left
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(8, buf)
 *             set_signed_varint64(self._left, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":2143
 *         # left
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(8, buf)             # <<<<<<<<<<<<<<
 *             set_signed_varint64(self._left, buf)
 *         # right
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(8, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2144
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(8, buf)
 *             set_signed_varint64(self._left, buf)             # <<<<<<<<<<<<<<
 *         # right
 *         if self.__field_bitmap0 & 2 == 2:
 */
    (void)(__pyx_f_12pyrobuf_util_set_signed_varint64(__pyx_v_self->_left, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2142
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 *         # left
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(8, buf)
 *             set_signed_varint64(self._left, buf)
 */
  }

  /* "pyrosm_proto.pyx":2146
 *             set_signed_varint64(self._left, buf)
 *         # right
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             set_varint64(16, buf)
 *             set_signed_varint64(self._right, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":2147
 *         # right
 *         if self.__field_bitmap0 & 2 == 2:
 *             set_varint64(16, buf)             # <<<<<<<<<<<<<<
 *             set_signed_varint64(self._right, buf)
 *         # top
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(16, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2148
 *         if self.__field_bitmap0 & 2 == 2:
 *             set_varint64(16, buf)
 *             set_signed_varint64(self._right, buf)             # <<<<<<<<<<<<<<
 *         # top
 *         if self.__field_bitmap0 & 4 == 4:
 */
    (void)(__pyx_f_12pyrobuf_util_set_signed_varint64(__pyx_v_self->_right, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2146
 *             set_signed_varint64(self._left, buf)
 *         # right
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             set_varint64(16, buf)
 *             set_signed_varint64(self._right, buf)
 */
  }

  /* "pyrosm_proto.pyx":2150
 *             set_signed_varint64(self._right, buf)
 *         # top
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             set_varint64(24, buf)
 *             set_signed_varint64(self._top, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":2151
 *         # top
 *         if self.__field_bitmap0 & 4 == 4:
 *             set_varint64(24, buf)             # <<<<<<<<<<<<<<
 *             set_signed_varint64(self._top, buf)
 *         # bottom
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(24, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2152
 *         if self.__field_bitmap0 & 4 == 4:
 *             set_varint64(24, buf)
 *             set_signed_varint64(self._top, buf)             # <<<<<<<<<<<<<<
 *         # bottom
 *         if self.__field_bitmap0 & 8 == 8:
 */
    (void)(__pyx_f_12pyrobuf_util_set_signed_varint64(__pyx_v_self->_top, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2150
 *             set_signed_varint64(self._right, buf)
 *         # top
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             set_varint64(24, buf)
 *             set_signed_varint64(self._top, buf)
 */
  }

  /* "pyrosm_proto.pyx":2154
 *             set_signed_varint64(self._top, buf)
 *         # bottom
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             set_varint64(32, buf)
 *             set_signed_varint64(self._bottom, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 8) == 8) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":2155
 *         # bottom
 *         if self.__field_bitmap0 & 8 == 8:
 *             set_varint64(32, buf)             # <<<<<<<<<<<<<<
 *             set_signed_varint64(self._bottom, buf)
 * 
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(32, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2156
 *         if self.__field_bitmap0 & 8 == 8:
 *             set_varint64(32, buf)
 *             set_signed_varint64(self._bottom, buf)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void _Modified(self):
 */
    (void)(__pyx_f_12pyrobuf_util_set_signed_varint64(__pyx_v_self->_bottom, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2154
 *             set_signed_varint64(self._top, buf)
 *         # bottom
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             set_varint64(32, buf)
 *             set_signed_varint64(self._bottom, buf)
 */
  }

  /* "pyrosm_proto.pyx":2140
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         # left
 *         if self.__field_bitmap0 & 1 == 1:
 */

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

/* "pyrosm_proto.pyx":2158
 *             set_signed_varint64(self._bottom, buf)
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_27_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_10HeaderBBox__Modified(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Modified); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10HeaderBBox_27_Modified)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2158, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2159
 * 
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":2160
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()             # <<<<<<<<<<<<<<
 *         self._cached_serialization = None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_listener), __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2160, __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;

  /* "pyrosm_proto.pyx":2161
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
  __Pyx_DECREF(__pyx_v_self->_cached_serialization);
  __pyx_v_self->_cached_serialization = ((PyObject*)Py_None);

  /* "pyrosm_proto.pyx":2158
 *             set_signed_varint64(self._bottom, buf)
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.HeaderBBox._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_27_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_27_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_Modified (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_26_Modified(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_26_Modified(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10HeaderBBox__Modified(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2158, __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("pyrosm_proto.HeaderBBox._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2163
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_29SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_10HeaderBBox_SerializeToString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_SerializeToString *__pyx_optional_args) {
  int __pyx_v_cache = ((int)0);
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_out = 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;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cache = __pyx_optional_args->cache;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10HeaderBBox_29SerializeToString)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2163, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2163, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 2163, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2172
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:
 */
  __pyx_t_6 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":2173
 * 
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'left' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 2 != 2:
 *             raise Exception("required field 'right' not initialized and does not have default")
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2173, __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, 2173, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2172
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:
 */
  }

  /* "pyrosm_proto.pyx":2174
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 */
  __pyx_t_6 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) != 2) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":2175
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:
 *             raise Exception("required field 'right' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'top' not initialized and does not have default")
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2175, __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, 2175, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2174
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 */
  }

  /* "pyrosm_proto.pyx":2176
 *         if self.__field_bitmap0 & 2 != 2:
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:
 */
  __pyx_t_6 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) != 4) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":2177
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'top' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 8 != 8:
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2177, __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, 2177, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2176
 *         if self.__field_bitmap0 & 2 != 2:
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:
 */
  }

  /* "pyrosm_proto.pyx":2178
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 * 
 */
  __pyx_t_6 = (((__pyx_v_self->__pyx___field_bitmap0 & 8) != 8) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":2179
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:
 *             raise Exception("required field 'bottom' not initialized and does not have default")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2179, __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, 2179, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2178
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 * 
 */
  }

  /* "pyrosm_proto.pyx":2181
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_6 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":2182
 * 
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2181
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":2184
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2185
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)             # <<<<<<<<<<<<<<
 *         cdef bytes out = bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, __pyx_v_cache);

  /* "pyrosm_proto.pyx":2186
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2188
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  __pyx_t_7 = (__pyx_v_cache != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":2189
 * 
 *         if cache:
 *             self._cached_serialization = out             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = __pyx_v_out;

    /* "pyrosm_proto.pyx":2188
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  }

  /* "pyrosm_proto.pyx":2191
 *             self._cached_serialization = out
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializePartialToString(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2163
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.HeaderBBox.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_29SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_28SerializeToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_29SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cache,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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SerializeToString") < 0)) __PYX_ERR(0, 2163, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2163, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("SerializeToString", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2163, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_28SerializeToString(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_28SerializeToString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_SerializeToString __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_HeaderBBox->SerializeToString(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2163, __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("pyrosm_proto.HeaderBBox.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2193
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_31SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_10HeaderBBox_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_buf = 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;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10HeaderBBox_31SerializePartialToString)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2193, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 2193, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2200
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_5 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":2201
 *         """
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2200
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":2203
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2204
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)             # <<<<<<<<<<<<<<
 *         return bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, 0);

  /* "pyrosm_proto.pyx":2205
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *     def SetInParent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2193
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.HeaderBBox.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_31SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_30SerializePartialToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_31SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_30SerializePartialToString(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_30SerializePartialToString(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_10HeaderBBox_SerializePartialToString(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2193, __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("pyrosm_proto.HeaderBBox.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2207
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_33SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_32SetInParent[] = "\n        Mark this an present in the parent.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_33SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_32SetInParent(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_32SetInParent(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent", 0);

  /* "pyrosm_proto.pyx":2211
 *         Mark this an present in the parent.
 *         """
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2207
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2213
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_35ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_34ParseFromJson[] = "\n        Populate the message class from a json string.\n\n        Params:\n            data (str): a json string\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_35ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromJson (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromJson") < 0)) __PYX_ERR(0, 2213, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    __pyx_v_reset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromJson", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2213, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_34ParseFromJson(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_34ParseFromJson(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("ParseFromJson", 0);
  __Pyx_INCREF(__pyx_v_size);

  /* "pyrosm_proto.pyx":2222
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":2223
 *         """
 *         if size is None:
 *             size = len(data)             # <<<<<<<<<<<<<<
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2223, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":2222
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  }

  /* "pyrosm_proto.pyx":2224
 *         if size is None:
 *             size = len(data)
 *         d = json.loads(data[:size])             # <<<<<<<<<<<<<<
 *         self.ParseFromDict(d, reset)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_json); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_d = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":2225
 *             size = len(data)
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToJson(self, **kwargs):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2225, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2225, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2225, __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_d);
    __Pyx_GIVEREF(__pyx_v_d);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_d);
    __Pyx_INCREF(__pyx_v_reset);
    __Pyx_GIVEREF(__pyx_v_reset);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_reset);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":2213
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2227
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_37SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_36SerializeToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_37SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializeToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializeToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_36SerializeToJson(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_36SerializeToJson(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializeToJson", 0);

  /* "pyrosm_proto.pyx":2234
 *             str: a json formatted string
 *         """
 *         d = self.SerializeToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2235
 *         """
 *         d = self.SerializeToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToJson(self, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2227
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.SerializeToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2237
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_39SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_38SerializePartialToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_39SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializePartialToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializePartialToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_38SerializePartialToJson(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_38SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToJson", 0);

  /* "pyrosm_proto.pyx":2244
 *             str: a json formatted string
 *         """
 *         d = self.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2245
 *         """
 *         d = self.SerializePartialToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromDict(self, d, reset=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2237
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.SerializePartialToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2247
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_41ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_40ParseFromDict[] = "\n        Populate the message class from a Python dictionary.\n\n        Params:\n            d (dict): a Python dictionary representing the message\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_41ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,&__pyx_n_s_reset,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 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_reset);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromDict") < 0)) __PYX_ERR(0, 2247, __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_d = values[0];
    __pyx_v_reset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromDict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2247, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_40ParseFromDict(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), __pyx_v_d, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_40ParseFromDict(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset) {
  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;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("ParseFromDict", 0);

  /* "pyrosm_proto.pyx":2255
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reset); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2255, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":2256
 *         """
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         assert type(d) == dict
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":2255
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":2258
 *             self.reset()
 * 
 *         assert type(d) == dict             # <<<<<<<<<<<<<<
 *         try:
 *             self.left = d["left"]
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_d)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2258, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2258, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 2258, __pyx_L1_error)
    }
  }
  #endif

  /* "pyrosm_proto.pyx":2259
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.left = d["left"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":2260
 *         assert type(d) == dict
 *         try:
 *             self.left = d["left"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_left); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2260, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_left, __pyx_t_2) < 0) __PYX_ERR(0, 2260, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":2259
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.left = d["left"]
 *         except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":2261
 *         try:
 *             self.left = d["left"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":2259
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.left = d["left"]
 *         except KeyError:
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":2263
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.right = d["right"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":2264
 *             pass
 *         try:
 *             self.right = d["right"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2264, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_right, __pyx_t_2) < 0) __PYX_ERR(0, 2264, __pyx_L10_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":2263
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.right = d["right"]
 *         except KeyError:
 */
    }
    __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_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":2265
 *         try:
 *             self.right = d["right"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    goto __pyx_L12_except_error;
    __pyx_L12_except_error:;

    /* "pyrosm_proto.pyx":2263
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.right = d["right"]
 *         except KeyError:
 */
    __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:;
  }

  /* "pyrosm_proto.pyx":2267
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.top = d["top"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":2268
 *             pass
 *         try:
 *             self.top = d["top"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_top); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2268, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_top, __pyx_t_2) < 0) __PYX_ERR(0, 2268, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":2267
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.top = d["top"]
 *         except KeyError:
 */
    }
    __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_L21_try_end;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":2269
 *         try:
 *             self.top = d["top"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L17_exception_handled;
    }
    goto __pyx_L18_except_error;
    __pyx_L18_except_error:;

    /* "pyrosm_proto.pyx":2267
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.top = d["top"]
 *         except KeyError:
 */
    __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_L17_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_L21_try_end:;
  }

  /* "pyrosm_proto.pyx":2271
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.bottom = d["bottom"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":2272
 *             pass
 *         try:
 *             self.bottom = d["bottom"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_bottom); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2272, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bottom, __pyx_t_2) < 0) __PYX_ERR(0, 2272, __pyx_L22_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":2271
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.bottom = d["bottom"]
 *         except KeyError:
 */
    }
    __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_L27_try_end;
    __pyx_L22_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":2273
 *         try:
 *             self.bottom = d["bottom"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L23_exception_handled;
    }
    goto __pyx_L24_except_error;
    __pyx_L24_except_error:;

    /* "pyrosm_proto.pyx":2271
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.bottom = d["bottom"]
 *         except KeyError:
 */
    __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_L23_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_L27_try_end:;
  }

  /* "pyrosm_proto.pyx":2276
 *             pass
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'left' not initialized and does not have default")
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2277
 * 
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrosm_proto.pyx":2278
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'left' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 2 != 2:
 *             raise Exception("required field 'right' not initialized and does not have default")
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2278, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2277
 * 
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:
 */
  }

  /* "pyrosm_proto.pyx":2279
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) != 2) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrosm_proto.pyx":2280
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:
 *             raise Exception("required field 'right' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'top' not initialized and does not have default")
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2280, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2279
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 */
  }

  /* "pyrosm_proto.pyx":2281
 *         if self.__field_bitmap0 & 2 != 2:
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) != 4) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrosm_proto.pyx":2282
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'top' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 8 != 8:
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2282, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2281
 *         if self.__field_bitmap0 & 2 != 2:
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:
 */
  }

  /* "pyrosm_proto.pyx":2283
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 * 
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 8) != 8) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrosm_proto.pyx":2284
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:
 *             raise Exception("required field 'bottom' not initialized and does not have default")             # <<<<<<<<<<<<<<
 * 
 *         return
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2284, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2283
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 * 
 */
  }

  /* "pyrosm_proto.pyx":2286
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 * 
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2247
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2288
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_43SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_42SerializeToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_43SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_42SerializeToDict(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_42SerializeToDict(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToDict", 0);

  /* "pyrosm_proto.pyx":2295
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'left' not initialized and does not have default")
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2296
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":2297
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'left' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 2 != 2:
 *             raise Exception("required field 'right' not initialized and does not have default")
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __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, 2297, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2296
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:
 */
  }

  /* "pyrosm_proto.pyx":2298
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) != 2) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":2299
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:
 *             raise Exception("required field 'right' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'top' not initialized and does not have default")
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2299, __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, 2299, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2298
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 */
  }

  /* "pyrosm_proto.pyx":2300
 *         if self.__field_bitmap0 & 2 != 2:
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) != 4) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":2301
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'top' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 8 != 8:
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2301, __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, 2301, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2300
 *         if self.__field_bitmap0 & 2 != 2:
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:
 */
  }

  /* "pyrosm_proto.pyx":2302
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 8) != 8) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":2303
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:
 *             raise Exception("required field 'bottom' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["left"] = self.left
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2303, __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, 2303, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2302
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 */
  }

  /* "pyrosm_proto.pyx":2304
 *         if self.__field_bitmap0 & 8 != 8:
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["left"] = self.left
 *         if self.__field_bitmap0 & 2 == 2:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":2305
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["left"] = self.left             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["right"] = self.right
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_left, __pyx_t_1) < 0)) __PYX_ERR(0, 2305, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":2304
 *         if self.__field_bitmap0 & 8 != 8:
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["left"] = self.left
 *         if self.__field_bitmap0 & 2 == 2:
 */
  }

  /* "pyrosm_proto.pyx":2306
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["left"] = self.left
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["right"] = self.right
 *         if self.__field_bitmap0 & 4 == 4:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":2307
 *             out["left"] = self.left
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["right"] = self.right             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["top"] = self.top
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_right, __pyx_t_1) < 0)) __PYX_ERR(0, 2307, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":2306
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["left"] = self.left
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["right"] = self.right
 *         if self.__field_bitmap0 & 4 == 4:
 */
  }

  /* "pyrosm_proto.pyx":2308
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["right"] = self.right
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["top"] = self.top
 *         if self.__field_bitmap0 & 8 == 8:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":2309
 *             out["right"] = self.right
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["top"] = self.top             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["bottom"] = self.bottom
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_top); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_top, __pyx_t_1) < 0)) __PYX_ERR(0, 2309, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":2308
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["right"] = self.right
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["top"] = self.top
 *         if self.__field_bitmap0 & 8 == 8:
 */
  }

  /* "pyrosm_proto.pyx":2310
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["top"] = self.top
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             out["bottom"] = self.bottom
 * 
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 8) == 8) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":2311
 *             out["top"] = self.top
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["bottom"] = self.bottom             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bottom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_bottom, __pyx_t_1) < 0)) __PYX_ERR(0, 2311, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":2310
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["top"] = self.top
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             out["bottom"] = self.bottom
 * 
 */
  }

  /* "pyrosm_proto.pyx":2313
 *             out["bottom"] = self.bottom
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2288
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.SerializeToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2315
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_45SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_44SerializePartialToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_45SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_44SerializePartialToDict(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_44SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializePartialToDict", 0);

  /* "pyrosm_proto.pyx":2322
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["left"] = self.left
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2323
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["left"] = self.left
 *         if self.__field_bitmap0 & 2 == 2:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":2324
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["left"] = self.left             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["right"] = self.right
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_left, __pyx_t_1) < 0)) __PYX_ERR(0, 2324, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":2323
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["left"] = self.left
 *         if self.__field_bitmap0 & 2 == 2:
 */
  }

  /* "pyrosm_proto.pyx":2325
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["left"] = self.left
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["right"] = self.right
 *         if self.__field_bitmap0 & 4 == 4:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":2326
 *             out["left"] = self.left
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["right"] = self.right             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["top"] = self.top
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_right, __pyx_t_1) < 0)) __PYX_ERR(0, 2326, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":2325
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["left"] = self.left
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["right"] = self.right
 *         if self.__field_bitmap0 & 4 == 4:
 */
  }

  /* "pyrosm_proto.pyx":2327
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["right"] = self.right
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["top"] = self.top
 *         if self.__field_bitmap0 & 8 == 8:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":2328
 *             out["right"] = self.right
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["top"] = self.top             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["bottom"] = self.bottom
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_top); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_top, __pyx_t_1) < 0)) __PYX_ERR(0, 2328, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":2327
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["right"] = self.right
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["top"] = self.top
 *         if self.__field_bitmap0 & 8 == 8:
 */
  }

  /* "pyrosm_proto.pyx":2329
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["top"] = self.top
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             out["bottom"] = self.bottom
 * 
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 8) == 8) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":2330
 *             out["top"] = self.top
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["bottom"] = self.bottom             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bottom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_bottom, __pyx_t_1) < 0)) __PYX_ERR(0, 2330, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":2329
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["top"] = self.top
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             out["bottom"] = self.bottom
 * 
 */
  }

  /* "pyrosm_proto.pyx":2332
 *             out["bottom"] = self.bottom
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def Items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2315
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.SerializePartialToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_10HeaderBBox_48generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":2334
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_47Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_46Items[] = "\n        Iterator over the field names and values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_47Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_46Items(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_46Items(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_12_Items(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_12_Items, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2334, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_10HeaderBBox_48generator12, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Items, __pyx_n_s_HeaderBBox_Items, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_10HeaderBBox_48generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2334, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2341
 *             iterator
 *         """
 *         yield 'left', self.left             # <<<<<<<<<<<<<<
 *         yield 'right', self.right
 *         yield 'top', self.top
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_left);
  __Pyx_GIVEREF(__pyx_n_s_left);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_left);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2341, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2342
 *         """
 *         yield 'left', self.left
 *         yield 'right', self.right             # <<<<<<<<<<<<<<
 *         yield 'top', self.top
 *         yield 'bottom', self.bottom
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_right);
  __Pyx_GIVEREF(__pyx_n_s_right);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_right);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2342, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2343
 *         yield 'left', self.left
 *         yield 'right', self.right
 *         yield 'top', self.top             # <<<<<<<<<<<<<<
 *         yield 'bottom', self.bottom
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_top); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_top);
  __Pyx_GIVEREF(__pyx_n_s_top);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_top);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2343, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2344
 *         yield 'right', self.right
 *         yield 'top', self.top
 *         yield 'bottom', self.bottom             # <<<<<<<<<<<<<<
 * 
 *     def Fields(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_bottom); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_bottom);
  __Pyx_GIVEREF(__pyx_n_s_bottom);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_bottom);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2344, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":2334
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_10HeaderBBox_51generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":2346
 *         yield 'bottom', self.bottom
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_50Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_49Fields[] = "\n        Iterator over the field names of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_50Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_49Fields(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_49Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_13_Fields(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_13_Fields, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2346, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_10HeaderBBox_51generator13, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Fields, __pyx_n_s_HeaderBBox_Fields, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 2346, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_10HeaderBBox_51generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2346, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2353
 *             iterator
 *         """
 *         yield 'left'             # <<<<<<<<<<<<<<
 *         yield 'right'
 *         yield 'top'
 */
  __Pyx_INCREF(__pyx_n_s_left);
  __pyx_r = __pyx_n_s_left;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2353, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2354
 *         """
 *         yield 'left'
 *         yield 'right'             # <<<<<<<<<<<<<<
 *         yield 'top'
 *         yield 'bottom'
 */
  __Pyx_INCREF(__pyx_n_s_right);
  __pyx_r = __pyx_n_s_right;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2354, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2355
 *         yield 'left'
 *         yield 'right'
 *         yield 'top'             # <<<<<<<<<<<<<<
 *         yield 'bottom'
 * 
 */
  __Pyx_INCREF(__pyx_n_s_top);
  __pyx_r = __pyx_n_s_top;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2355, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2356
 *         yield 'right'
 *         yield 'top'
 *         yield 'bottom'             # <<<<<<<<<<<<<<
 * 
 *     def Values(self):
 */
  __Pyx_INCREF(__pyx_n_s_bottom);
  __pyx_r = __pyx_n_s_bottom;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2356, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":2346
 *         yield 'bottom', self.bottom
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_10HeaderBBox_54generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":2358
 *         yield 'bottom'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_53Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_52Values[] = "\n        Iterator over the values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_53Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_52Values(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_52Values(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_14_Values(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_14_Values, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2358, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_10HeaderBBox_54generator14, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Values, __pyx_n_s_HeaderBBox_Values, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 2358, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_10HeaderBBox_54generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2358, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2365
 *             iterator
 *         """
 *         yield self.left             # <<<<<<<<<<<<<<
 *         yield self.right
 *         yield self.top
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2365, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2366
 *         """
 *         yield self.left
 *         yield self.right             # <<<<<<<<<<<<<<
 *         yield self.top
 *         yield self.bottom
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2366, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2367
 *         yield self.left
 *         yield self.right
 *         yield self.top             # <<<<<<<<<<<<<<
 *         yield self.bottom
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_top); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2367, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2368
 *         yield self.right
 *         yield self.top
 *         yield self.bottom             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_bottom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2368, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":2358
 *         yield 'bottom'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_10HeaderBBox_57generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":2372
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_56Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10HeaderBBox_55Setters[] = "\n        Iterator over functions to set the fields in a message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_56Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_55Setters(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_55Setters(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_15_Setters(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_15_Setters, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2372, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_10HeaderBBox_57generator15, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Setters, __pyx_n_s_HeaderBBox_Setters, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 2372, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.Setters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2379
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.left = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_10HeaderBBox_7Setters_1setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_7Setters_1setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_7Setters_setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":2380
 *         """
 *         def setter(value):
 *             self.left = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2380, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_left, __pyx_v_value) < 0) __PYX_ERR(0, 2380, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2379
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.left = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2382
 *             self.left = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.right = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_10HeaderBBox_7Setters_3setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_7Setters_3setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_7Setters_2setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":2383
 *         yield setter
 *         def setter(value):
 *             self.right = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2383, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_right, __pyx_v_value) < 0) __PYX_ERR(0, 2383, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2382
 *             self.left = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.right = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2385
 *             self.right = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.top = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_10HeaderBBox_7Setters_5setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_7Setters_5setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_7Setters_4setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":2386
 *         yield setter
 *         def setter(value):
 *             self.top = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2386, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_top, __pyx_v_value) < 0) __PYX_ERR(0, 2386, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2385
 *             self.right = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.top = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2388
 *             self.top = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.bottom = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_10HeaderBBox_7Setters_7setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_7Setters_7setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_7Setters_6setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":2389
 *         yield setter
 *         def setter(value):
 *             self.bottom = value             # <<<<<<<<<<<<<<
 *         yield setter
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2389, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_bottom, __pyx_v_value) < 0) __PYX_ERR(0, 2389, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2388
 *             self.top = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.bottom = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2372
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

static PyObject *__pyx_gb_12pyrosm_proto_10HeaderBBox_57generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2372, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2379
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.left = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_10HeaderBBox_7Setters_1setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_setter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2381
 *         def setter(value):
 *             self.left = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.right = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2381, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2382
 *             self.left = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.right = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_10HeaderBBox_7Setters_3setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2384
 *         def setter(value):
 *             self.right = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.top = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2384, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2385
 *             self.right = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.top = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_10HeaderBBox_7Setters_5setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2387
 *         def setter(value):
 *             self.top = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.bottom = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2387, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2388
 *             self.top = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.bottom = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_10HeaderBBox_7Setters_7setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2390
 *         def setter(value):
 *             self.bottom = value
 *         yield setter             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2390, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":2372
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

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

/* "pyrosm_proto.pxd":130
 *     cdef uint64_t __field_bitmap0
 * 
 *     cdef public bint _is_present_in_parent             # <<<<<<<<<<<<<<
 *     cdef bytes _cached_serialization
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_21_is_present_in_parent___get__(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_present_in_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 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("pyrosm_proto.HeaderBBox._is_present_in_parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10HeaderBBox_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_10HeaderBBox_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10HeaderBBox_21_is_present_in_parent_2__set__(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_10HeaderBBox_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 130, __pyx_L1_error)
  __pyx_v_self->_is_present_in_parent = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox._is_present_in_parent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_59__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_59__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_12pyrosm_proto_10HeaderBBox_58__reduce_cython__(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_58__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_61__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10HeaderBBox_61__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_12pyrosm_proto_10HeaderBBox_60__setstate_cython__(((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_12pyrosm_proto_10HeaderBBox_60__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_HeaderBBox *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.HeaderBBox.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2397
 * cdef class PrimitiveBlock:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock___cinit__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock___cinit__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrosm_proto.pyx":2398
 * 
 *     def __cinit__(self):
 *         self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

  /* "pyrosm_proto.pyx":2397
 * cdef class PrimitiveBlock:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

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

/* "pyrosm_proto.pyx":2400
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._stringtable is not None:
 */

/* Python wrapper */
static void __pyx_pw_12pyrosm_proto_14PrimitiveBlock_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrosm_proto_14PrimitiveBlock_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrosm_proto_14PrimitiveBlock_2__dealloc__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static void __pyx_pf_12pyrosm_proto_14PrimitiveBlock_2__dealloc__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrosm_proto.pyx":2402
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._stringtable is not None:             # <<<<<<<<<<<<<<
 *             self._stringtable._listener = <PyObject *>null_listener
 *         if self._primitivegroup is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_stringtable) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":2403
 *         # Remove any references to self from child messages or repeated fields
 *         if self._stringtable is not None:
 *             self._stringtable._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._primitivegroup is not None:
 *             self._primitivegroup._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_stringtable->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":2402
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._stringtable is not None:             # <<<<<<<<<<<<<<
 *             self._stringtable._listener = <PyObject *>null_listener
 *         if self._primitivegroup is not None:
 */
  }

  /* "pyrosm_proto.pyx":2404
 *         if self._stringtable is not None:
 *             self._stringtable._listener = <PyObject *>null_listener
 *         if self._primitivegroup is not None:             # <<<<<<<<<<<<<<
 *             self._primitivegroup._listener = <PyObject *>null_listener
 * 
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_primitivegroup) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":2405
 *             self._stringtable._listener = <PyObject *>null_listener
 *         if self._primitivegroup is not None:
 *             self._primitivegroup._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, **kwargs):
 */
    __pyx_v_self->_primitivegroup->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":2404
 *         if self._stringtable is not None:
 *             self._stringtable._listener = <PyObject *>null_listener
 *         if self._primitivegroup is not None:             # <<<<<<<<<<<<<<
 *             self._primitivegroup._listener = <PyObject *>null_listener
 * 
 */
  }

  /* "pyrosm_proto.pyx":2400
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._stringtable is not None:
 */

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

/* "pyrosm_proto.pyx":2407
 *             self._primitivegroup._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_4__init__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), __pyx_v_kwargs);

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_4__init__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_field_name = NULL;
  PyObject *__pyx_v_field_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrosm_proto.pyx":2408
 * 
 *     def __init__(self, **kwargs):
 *         self.reset()             # <<<<<<<<<<<<<<
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2409
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2409, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":2410
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('stringtable',):
 */
    __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2410, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2410, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2410, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2410, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2410, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2410, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2410, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2410, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2410, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2410, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2410, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2410, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2410, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":2411
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('stringtable',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "pyrosm_proto.pyx":2412
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('stringtable',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('primitivegroup',):
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_stringtable, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2412, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_13 = (__pyx_t_1 != 0);
          if (__pyx_t_13) {

            /* "pyrosm_proto.pyx":2413
 *                 try:
 *                     if field_name in ('stringtable',):
 *                         getattr(self, field_name).MergeFrom(field_value)             # <<<<<<<<<<<<<<
 *                     elif field_name in ('primitivegroup',):
 *                         getattr(self, field_name).extend(field_value)
 */
            __pyx_t_7 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2413, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2413, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_7 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_7)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2413, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":2412
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('stringtable',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('primitivegroup',):
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":2414
 *                     if field_name in ('stringtable',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('primitivegroup',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_primitivegroup, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 2414, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_1 = (__pyx_t_13 != 0);
          if (__pyx_t_1) {

            /* "pyrosm_proto.pyx":2415
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('primitivegroup',):
 *                         getattr(self, field_name).extend(field_value)             # <<<<<<<<<<<<<<
 *                     else:
 *                         setattr(self, field_name, field_value)
 */
            __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2415, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_extend); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2415, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
              __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
              if (likely(__pyx_t_6)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_7, function);
              }
            }
            __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2415, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":2414
 *                     if field_name in ('stringtable',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('primitivegroup',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":2417
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 *                         setattr(self, field_name, field_value)             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 */
          /*else*/ {
            __pyx_t_14 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name, __pyx_v_field_value); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 2417, __pyx_L8_error)
          }
          __pyx_L16:;

          /* "pyrosm_proto.pyx":2411
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('stringtable',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L15_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrosm_proto.pyx":2418
 *                     else:
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return
 */
        __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_15) {
          __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 2418, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_6);

          /* "pyrosm_proto.pyx":2419
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))             # <<<<<<<<<<<<<<
 *         return
 * 
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2419, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_field_name);
          __Pyx_GIVEREF(__pyx_v_field_name);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_field_name);
          __pyx_t_16 = __Pyx_PyString_Format(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2419, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2419, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 2419, __pyx_L10_except_error)
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;

        /* "pyrosm_proto.pyx":2411
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('stringtable',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L15_try_end:;
      }

      /* "pyrosm_proto.pyx":2410
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('stringtable',):
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":2409
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  }

  /* "pyrosm_proto.pyx":2420
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2407
 *             self._primitivegroup._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XDECREF(__pyx_v_field_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2422
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'granularity',
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_6__str__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_6__str__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_messages = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyrosm_proto.pyx":2423
 * 
 *     def __str__(self):
 *         fields = [             # <<<<<<<<<<<<<<
 *                           'granularity',
 *                           'lat_offset',
 */
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_granularity);
  __Pyx_GIVEREF(__pyx_n_s_granularity);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_granularity);
  __Pyx_INCREF(__pyx_n_s_lat_offset);
  __Pyx_GIVEREF(__pyx_n_s_lat_offset);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_lat_offset);
  __Pyx_INCREF(__pyx_n_s_lon_offset);
  __Pyx_GIVEREF(__pyx_n_s_lon_offset);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_lon_offset);
  __Pyx_INCREF(__pyx_n_s_date_granularity);
  __Pyx_GIVEREF(__pyx_n_s_date_granularity);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_date_granularity);
  __pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2428
 *                           'lon_offset',
 *                           'date_granularity',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]             # <<<<<<<<<<<<<<
 *         messages = [
 *                             'stringtable',
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2428, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2428, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2428, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2428, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2428, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 2428, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2429
 *                           'date_granularity',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = [             # <<<<<<<<<<<<<<
 *                             'stringtable',
 *                             'primitivegroup',]
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_stringtable);
  __Pyx_GIVEREF(__pyx_n_s_stringtable);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_stringtable);
  __Pyx_INCREF(__pyx_n_s_primitivegroup);
  __Pyx_GIVEREF(__pyx_n_s_primitivegroup);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_primitivegroup);
  __pyx_v_messages = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2432
 *                             'stringtable',
 *                             'primitivegroup',]
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  __pyx_t_1 = __pyx_v_messages; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2432, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":2433
 *                             'primitivegroup',]
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))             # <<<<<<<<<<<<<<
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2433, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":2434
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    __pyx_t_4 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2434, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2434, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 2434, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2434, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 2434, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2434, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2434, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":2435
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))             # <<<<<<<<<<<<<<
 *             components.append('}')
 *         return '\n'.join(components)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2435, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_line);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2435, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2435, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":2434
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":2436
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 *             components.append('}')             # <<<<<<<<<<<<<<
 *         return '\n'.join(components)
 * 
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_kp_s__2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2436, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2432
 *                             'stringtable',
 *                             'primitivegroup',]
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2437
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 *         return '\n'.join(components)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2422
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'granularity',
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_messages);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2439
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveBlock_reset(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("reset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2439, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_9reset)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2439, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2442
 *         # reset values and populate defaults
 * 
 *         self.__field_bitmap0 = 0             # <<<<<<<<<<<<<<
 * 
 *         if self._stringtable is not None:
 */
  __pyx_v_self->__pyx___field_bitmap0 = 0;

  /* "pyrosm_proto.pyx":2444
 *         self.__field_bitmap0 = 0
 * 
 *         if self._stringtable is not None:             # <<<<<<<<<<<<<<
 *             self._stringtable._listener = <PyObject *>null_listener
 *         self._stringtable = None
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_stringtable) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":2445
 * 
 *         if self._stringtable is not None:
 *             self._stringtable._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._stringtable = None
 *         if self._primitivegroup is not None:
 */
    __pyx_v_self->_stringtable->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":2444
 *         self.__field_bitmap0 = 0
 * 
 *         if self._stringtable is not None:             # <<<<<<<<<<<<<<
 *             self._stringtable._listener = <PyObject *>null_listener
 *         self._stringtable = None
 */
  }

  /* "pyrosm_proto.pyx":2446
 *         if self._stringtable is not None:
 *             self._stringtable._listener = <PyObject *>null_listener
 *         self._stringtable = None             # <<<<<<<<<<<<<<
 *         if self._primitivegroup is not None:
 *             self._primitivegroup._listener = <PyObject *>null_listener
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_stringtable);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_stringtable));
  __pyx_v_self->_stringtable = ((struct __pyx_obj_12pyrosm_proto_StringTable *)Py_None);

  /* "pyrosm_proto.pyx":2447
 *             self._stringtable._listener = <PyObject *>null_listener
 *         self._stringtable = None
 *         if self._primitivegroup is not None:             # <<<<<<<<<<<<<<
 *             self._primitivegroup._listener = <PyObject *>null_listener
 *         self._primitivegroup = TypedList.__new__(TypedList)
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_primitivegroup) != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2448
 *         self._stringtable = None
 *         if self._primitivegroup is not None:
 *             self._primitivegroup._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._primitivegroup = TypedList.__new__(TypedList)
 *         self._primitivegroup._list_type = PrimitiveGroup
 */
    __pyx_v_self->_primitivegroup->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":2447
 *             self._stringtable._listener = <PyObject *>null_listener
 *         self._stringtable = None
 *         if self._primitivegroup is not None:             # <<<<<<<<<<<<<<
 *             self._primitivegroup._listener = <PyObject *>null_listener
 *         self._primitivegroup = TypedList.__new__(TypedList)
 */
  }

  /* "pyrosm_proto.pyx":2449
 *         if self._primitivegroup is not None:
 *             self._primitivegroup._listener = <PyObject *>null_listener
 *         self._primitivegroup = TypedList.__new__(TypedList)             # <<<<<<<<<<<<<<
 *         self._primitivegroup._list_type = PrimitiveGroup
 *         self._primitivegroup._listener = <PyObject *>self
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 2449, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_primitivegroup);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_primitivegroup));
  __pyx_v_self->_primitivegroup = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2450
 *             self._primitivegroup._listener = <PyObject *>null_listener
 *         self._primitivegroup = TypedList.__new__(TypedList)
 *         self._primitivegroup._list_type = PrimitiveGroup             # <<<<<<<<<<<<<<
 *         self._primitivegroup._listener = <PyObject *>self
 *         self._granularity = 100
 */
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrosm_proto_PrimitiveGroup));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrosm_proto_PrimitiveGroup));
  __Pyx_GOTREF(__pyx_v_self->_primitivegroup->_list_type);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_primitivegroup->_list_type));
  __pyx_v_self->_primitivegroup->_list_type = __pyx_ptype_12pyrosm_proto_PrimitiveGroup;

  /* "pyrosm_proto.pyx":2451
 *         self._primitivegroup = TypedList.__new__(TypedList)
 *         self._primitivegroup._list_type = PrimitiveGroup
 *         self._primitivegroup._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         self._granularity = 100
 *         self._lat_offset = 0
 */
  __pyx_v_self->_primitivegroup->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":2452
 *         self._primitivegroup._list_type = PrimitiveGroup
 *         self._primitivegroup._listener = <PyObject *>self
 *         self._granularity = 100             # <<<<<<<<<<<<<<
 *         self._lat_offset = 0
 *         self._lon_offset = 0
 */
  __pyx_v_self->_granularity = 0x64;

  /* "pyrosm_proto.pyx":2453
 *         self._primitivegroup._listener = <PyObject *>self
 *         self._granularity = 100
 *         self._lat_offset = 0             # <<<<<<<<<<<<<<
 *         self._lon_offset = 0
 *         self._date_granularity = 1000
 */
  __pyx_v_self->_lat_offset = 0;

  /* "pyrosm_proto.pyx":2454
 *         self._granularity = 100
 *         self._lat_offset = 0
 *         self._lon_offset = 0             # <<<<<<<<<<<<<<
 *         self._date_granularity = 1000
 *         return
 */
  __pyx_v_self->_lon_offset = 0;

  /* "pyrosm_proto.pyx":2455
 *         self._lat_offset = 0
 *         self._lon_offset = 0
 *         self._date_granularity = 1000             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_v_self->_date_granularity = 0x3E8;

  /* "pyrosm_proto.pyx":2456
 *         self._lon_offset = 0
 *         self._date_granularity = 1000
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2439
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

  /* 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_WriteUnraisable("pyrosm_proto.PrimitiveBlock.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_8reset(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_8reset(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_14PrimitiveBlock_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2439, __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("pyrosm_proto.PrimitiveBlock.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2460
 * 
 *     @property
 *     def stringtable(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._stringtable is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_11stringtable_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_11stringtable_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_11stringtable___get__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_11stringtable___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":2462
 *     def stringtable(self):
 *         # lazy init sub messages
 *         if self._stringtable is None:             # <<<<<<<<<<<<<<
 *             self._stringtable = StringTable.__new__(StringTable)
 *             self._stringtable.reset()
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_stringtable) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":2463
 *         # lazy init sub messages
 *         if self._stringtable is None:
 *             self._stringtable = StringTable.__new__(StringTable)             # <<<<<<<<<<<<<<
 *             self._stringtable.reset()
 *             self._stringtable._listener = <PyObject *>self
 */
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_StringTable(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_StringTable), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2463, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __Pyx_GOTREF(__pyx_v_self->_stringtable);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_stringtable));
    __pyx_v_self->_stringtable = ((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":2464
 *         if self._stringtable is None:
 *             self._stringtable = StringTable.__new__(StringTable)
 *             self._stringtable.reset()             # <<<<<<<<<<<<<<
 *             self._stringtable._listener = <PyObject *>self
 *         return self._stringtable
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->_stringtable->__pyx_vtab)->reset(__pyx_v_self->_stringtable, 0);

    /* "pyrosm_proto.pyx":2465
 *             self._stringtable = StringTable.__new__(StringTable)
 *             self._stringtable.reset()
 *             self._stringtable._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return self._stringtable
 * 
 */
    __pyx_v_self->_stringtable->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":2462
 *     def stringtable(self):
 *         # lazy init sub messages
 *         if self._stringtable is None:             # <<<<<<<<<<<<<<
 *             self._stringtable = StringTable.__new__(StringTable)
 *             self._stringtable.reset()
 */
  }

  /* "pyrosm_proto.pyx":2466
 *             self._stringtable.reset()
 *             self._stringtable._listener = <PyObject *>self
 *         return self._stringtable             # <<<<<<<<<<<<<<
 * 
 *     @stringtable.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_stringtable));
  __pyx_r = ((PyObject *)__pyx_v_self->_stringtable);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2460
 * 
 *     @property
 *     def stringtable(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._stringtable is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.stringtable.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2469
 * 
 *     @stringtable.setter
 *     def stringtable(self, value):             # <<<<<<<<<<<<<<
 *         if self._stringtable is not None:
 *             self._stringtable._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_11stringtable_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_11stringtable_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_11stringtable_2__set__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_11stringtable_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":2470
 *     @stringtable.setter
 *     def stringtable(self, value):
 *         if self._stringtable is not None:             # <<<<<<<<<<<<<<
 *             self._stringtable._listener = <PyObject *>null_listener
 *         self._stringtable = value
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_stringtable) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":2471
 *     def stringtable(self, value):
 *         if self._stringtable is not None:
 *             self._stringtable._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._stringtable = value
 *         self._stringtable._listener = <PyObject *>self
 */
    __pyx_v_self->_stringtable->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":2470
 *     @stringtable.setter
 *     def stringtable(self, value):
 *         if self._stringtable is not None:             # <<<<<<<<<<<<<<
 *             self._stringtable._listener = <PyObject *>null_listener
 *         self._stringtable = value
 */
  }

  /* "pyrosm_proto.pyx":2472
 *         if self._stringtable is not None:
 *             self._stringtable._listener = <PyObject *>null_listener
 *         self._stringtable = value             # <<<<<<<<<<<<<<
 *         self._stringtable._listener = <PyObject *>self
 *         self._Modified()
 */
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_12pyrosm_proto_StringTable))))) __PYX_ERR(0, 2472, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_stringtable);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_stringtable));
  __pyx_v_self->_stringtable = ((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":2473
 *             self._stringtable._listener = <PyObject *>null_listener
 *         self._stringtable = value
 *         self._stringtable._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_v_self->_stringtable->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":2474
 *         self._stringtable = value
 *         self._stringtable._listener = <PyObject *>self
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2469
 * 
 *     @stringtable.setter
 *     def stringtable(self, value):             # <<<<<<<<<<<<<<
 *         if self._stringtable is not None:
 *             self._stringtable._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.stringtable.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2477
 * 
 *     @property
 *     def primitivegroup(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._primitivegroup is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_14primitivegroup_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_14primitivegroup_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_14primitivegroup___get__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_14primitivegroup___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":2479
 *     def primitivegroup(self):
 *         # lazy init sub messages
 *         if self._primitivegroup is None:             # <<<<<<<<<<<<<<
 *             self._primitivegroup = PrimitiveGroup.__new__(PrimitiveGroup)
 *             self._primitivegroup.reset()
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_primitivegroup) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":2480
 *         # lazy init sub messages
 *         if self._primitivegroup is None:
 *             self._primitivegroup = PrimitiveGroup.__new__(PrimitiveGroup)             # <<<<<<<<<<<<<<
 *             self._primitivegroup.reset()
 *             self._primitivegroup._listener = <PyObject *>self
 */
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_PrimitiveGroup(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_PrimitiveGroup), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2480, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_3), __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 2480, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_primitivegroup);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_primitivegroup));
    __pyx_v_self->_primitivegroup = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":2481
 *         if self._primitivegroup is None:
 *             self._primitivegroup = PrimitiveGroup.__new__(PrimitiveGroup)
 *             self._primitivegroup.reset()             # <<<<<<<<<<<<<<
 *             self._primitivegroup._listener = <PyObject *>self
 *         return self._primitivegroup
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_primitivegroup), __pyx_n_s_reset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":2482
 *             self._primitivegroup = PrimitiveGroup.__new__(PrimitiveGroup)
 *             self._primitivegroup.reset()
 *             self._primitivegroup._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return self._primitivegroup
 * 
 */
    __pyx_v_self->_primitivegroup->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":2479
 *     def primitivegroup(self):
 *         # lazy init sub messages
 *         if self._primitivegroup is None:             # <<<<<<<<<<<<<<
 *             self._primitivegroup = PrimitiveGroup.__new__(PrimitiveGroup)
 *             self._primitivegroup.reset()
 */
  }

  /* "pyrosm_proto.pyx":2483
 *             self._primitivegroup.reset()
 *             self._primitivegroup._listener = <PyObject *>self
 *         return self._primitivegroup             # <<<<<<<<<<<<<<
 * 
 *     @primitivegroup.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_primitivegroup));
  __pyx_r = ((PyObject *)__pyx_v_self->_primitivegroup);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2477
 * 
 *     @property
 *     def primitivegroup(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._primitivegroup is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.primitivegroup.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2486
 * 
 *     @primitivegroup.setter
 *     def primitivegroup(self, value):             # <<<<<<<<<<<<<<
 *         if self._primitivegroup is not None:
 *             self._primitivegroup._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_14primitivegroup_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_14primitivegroup_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_14primitivegroup_2__set__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_14primitivegroup_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":2487
 *     @primitivegroup.setter
 *     def primitivegroup(self, value):
 *         if self._primitivegroup is not None:             # <<<<<<<<<<<<<<
 *             self._primitivegroup._listener = <PyObject *>null_listener
 *         self._primitivegroup = TypedList.__new__(TypedList)
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_primitivegroup) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":2488
 *     def primitivegroup(self, value):
 *         if self._primitivegroup is not None:
 *             self._primitivegroup._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._primitivegroup = TypedList.__new__(TypedList)
 *         self._primitivegroup._list_type = PrimitiveGroup
 */
    __pyx_v_self->_primitivegroup->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":2487
 *     @primitivegroup.setter
 *     def primitivegroup(self, value):
 *         if self._primitivegroup is not None:             # <<<<<<<<<<<<<<
 *             self._primitivegroup._listener = <PyObject *>null_listener
 *         self._primitivegroup = TypedList.__new__(TypedList)
 */
  }

  /* "pyrosm_proto.pyx":2489
 *         if self._primitivegroup is not None:
 *             self._primitivegroup._listener = <PyObject *>null_listener
 *         self._primitivegroup = TypedList.__new__(TypedList)             # <<<<<<<<<<<<<<
 *         self._primitivegroup._list_type = PrimitiveGroup
 *         self._primitivegroup._listener = <PyObject *>self
 */
  __pyx_t_3 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList), __pyx_empty_tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 2489, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_primitivegroup);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_primitivegroup));
  __pyx_v_self->_primitivegroup = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":2490
 *             self._primitivegroup._listener = <PyObject *>null_listener
 *         self._primitivegroup = TypedList.__new__(TypedList)
 *         self._primitivegroup._list_type = PrimitiveGroup             # <<<<<<<<<<<<<<
 *         self._primitivegroup._listener = <PyObject *>self
 *         for val in value:
 */
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrosm_proto_PrimitiveGroup));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrosm_proto_PrimitiveGroup));
  __Pyx_GOTREF(__pyx_v_self->_primitivegroup->_list_type);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_primitivegroup->_list_type));
  __pyx_v_self->_primitivegroup->_list_type = __pyx_ptype_12pyrosm_proto_PrimitiveGroup;

  /* "pyrosm_proto.pyx":2491
 *         self._primitivegroup = TypedList.__new__(TypedList)
 *         self._primitivegroup._list_type = PrimitiveGroup
 *         self._primitivegroup._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         for val in value:
 *             list.append(self._primitivegroup, val)
 */
  __pyx_v_self->_primitivegroup->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":2492
 *         self._primitivegroup._list_type = PrimitiveGroup
 *         self._primitivegroup._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             list.append(self._primitivegroup, val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2492, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2492, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2492, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2492, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2492, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2492, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pyrosm_proto.pyx":2493
 *         self._primitivegroup._listener = <PyObject *>self
 *         for val in value:
 *             list.append(self._primitivegroup, val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    if (unlikely(((PyObject *)__pyx_v_self->_primitivegroup) == Py_None)) {
      PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
      __PYX_ERR(0, 2493, __pyx_L1_error)
    }
    __pyx_t_6 = ((PyObject *)__pyx_v_self->_primitivegroup);
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyList_Append(((PyObject*)__pyx_t_6), __pyx_v_val); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 2493, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyrosm_proto.pyx":2492
 *         self._primitivegroup._list_type = PrimitiveGroup
 *         self._primitivegroup._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             list.append(self._primitivegroup, val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":2494
 *         for val in value:
 *             list.append(self._primitivegroup, val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2486
 * 
 *     @primitivegroup.setter
 *     def primitivegroup(self, value):             # <<<<<<<<<<<<<<
 *         if self._primitivegroup is not None:
 *             self._primitivegroup._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.primitivegroup.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2497
 * 
 *     @property
 *     def granularity(self):             # <<<<<<<<<<<<<<
 *         return self._granularity
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_11granularity_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_11granularity_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_11granularity___get__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_11granularity___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":2498
 *     @property
 *     def granularity(self):
 *         return self._granularity             # <<<<<<<<<<<<<<
 * 
 *     @granularity.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_granularity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2497
 * 
 *     @property
 *     def granularity(self):             # <<<<<<<<<<<<<<
 *         return self._granularity
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.granularity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2501
 * 
 *     @granularity.setter
 *     def granularity(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 65536
 *         self._granularity = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_11granularity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_11granularity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_11granularity_2__set__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_11granularity_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int32_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":2502
 *     @granularity.setter
 *     def granularity(self, value):
 *         self.__field_bitmap0 |= 65536             # <<<<<<<<<<<<<<
 *         self._granularity = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x10000);

  /* "pyrosm_proto.pyx":2503
 *     def granularity(self, value):
 *         self.__field_bitmap0 |= 65536
 *         self._granularity = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2503, __pyx_L1_error)
  __pyx_v_self->_granularity = __pyx_t_1;

  /* "pyrosm_proto.pyx":2504
 *         self.__field_bitmap0 |= 65536
 *         self._granularity = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2501
 * 
 *     @granularity.setter
 *     def granularity(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 65536
 *         self._granularity = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.granularity.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2507
 * 
 *     @property
 *     def date_granularity(self):             # <<<<<<<<<<<<<<
 *         return self._date_granularity
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_16date_granularity_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_16date_granularity_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_16date_granularity___get__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_16date_granularity___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":2508
 *     @property
 *     def date_granularity(self):
 *         return self._date_granularity             # <<<<<<<<<<<<<<
 * 
 *     @date_granularity.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_date_granularity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2507
 * 
 *     @property
 *     def date_granularity(self):             # <<<<<<<<<<<<<<
 *         return self._date_granularity
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.date_granularity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2511
 * 
 *     @date_granularity.setter
 *     def date_granularity(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 131072
 *         self._date_granularity = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_16date_granularity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_16date_granularity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_16date_granularity_2__set__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_16date_granularity_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int32_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":2512
 *     @date_granularity.setter
 *     def date_granularity(self, value):
 *         self.__field_bitmap0 |= 131072             # <<<<<<<<<<<<<<
 *         self._date_granularity = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x20000);

  /* "pyrosm_proto.pyx":2513
 *     def date_granularity(self, value):
 *         self.__field_bitmap0 |= 131072
 *         self._date_granularity = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2513, __pyx_L1_error)
  __pyx_v_self->_date_granularity = __pyx_t_1;

  /* "pyrosm_proto.pyx":2514
 *         self.__field_bitmap0 |= 131072
 *         self._date_granularity = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2511
 * 
 *     @date_granularity.setter
 *     def date_granularity(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 131072
 *         self._date_granularity = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.date_granularity.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2517
 * 
 *     @property
 *     def lat_offset(self):             # <<<<<<<<<<<<<<
 *         return self._lat_offset
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_10lat_offset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_10lat_offset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_10lat_offset___get__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_10lat_offset___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":2518
 *     @property
 *     def lat_offset(self):
 *         return self._lat_offset             # <<<<<<<<<<<<<<
 * 
 *     @lat_offset.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_lat_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2517
 * 
 *     @property
 *     def lat_offset(self):             # <<<<<<<<<<<<<<
 *         return self._lat_offset
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.lat_offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2521
 * 
 *     @lat_offset.setter
 *     def lat_offset(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 262144
 *         self._lat_offset = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_10lat_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_10lat_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_10lat_offset_2__set__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_10lat_offset_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":2522
 *     @lat_offset.setter
 *     def lat_offset(self, value):
 *         self.__field_bitmap0 |= 262144             # <<<<<<<<<<<<<<
 *         self._lat_offset = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x40000);

  /* "pyrosm_proto.pyx":2523
 *     def lat_offset(self, value):
 *         self.__field_bitmap0 |= 262144
 *         self._lat_offset = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2523, __pyx_L1_error)
  __pyx_v_self->_lat_offset = __pyx_t_1;

  /* "pyrosm_proto.pyx":2524
 *         self.__field_bitmap0 |= 262144
 *         self._lat_offset = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2521
 * 
 *     @lat_offset.setter
 *     def lat_offset(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 262144
 *         self._lat_offset = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.lat_offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2527
 * 
 *     @property
 *     def lon_offset(self):             # <<<<<<<<<<<<<<
 *         return self._lon_offset
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_10lon_offset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_10lon_offset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_10lon_offset___get__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_10lon_offset___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":2528
 *     @property
 *     def lon_offset(self):
 *         return self._lon_offset             # <<<<<<<<<<<<<<
 * 
 *     @lon_offset.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_lon_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2527
 * 
 *     @property
 *     def lon_offset(self):             # <<<<<<<<<<<<<<
 *         return self._lon_offset
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.lon_offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2531
 * 
 *     @lon_offset.setter
 *     def lon_offset(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 524288
 *         self._lon_offset = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_10lon_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_10lon_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_10lon_offset_2__set__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_10lon_offset_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":2532
 *     @lon_offset.setter
 *     def lon_offset(self, value):
 *         self.__field_bitmap0 |= 524288             # <<<<<<<<<<<<<<
 *         self._lon_offset = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x80000);

  /* "pyrosm_proto.pyx":2533
 *     def lon_offset(self, value):
 *         self.__field_bitmap0 |= 524288
 *         self._lon_offset = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2533, __pyx_L1_error)
  __pyx_v_self->_lon_offset = __pyx_t_1;

  /* "pyrosm_proto.pyx":2534
 *         self.__field_bitmap0 |= 524288
 *         self._lon_offset = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2531
 * 
 *     @lon_offset.setter
 *     def lon_offset(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 524288
 *         self._lon_offset = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.lon_offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2537
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

static int __pyx_f_12pyrosm_proto_14PrimitiveBlock__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, int __pyx_v_cache) {
  int __pyx_v_current_offset;
  int64_t __pyx_v_key;
  int64_t __pyx_v_field_size;
  struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_primitivegroup_elt = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("_protobuf_deserialize", 0);

  /* "pyrosm_proto.pyx":2538
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):
 *         cdef int current_offset = 0             # <<<<<<<<<<<<<<
 *         cdef int64_t key
 *         cdef int64_t field_size
 */
  __pyx_v_current_offset = 0;

  /* "pyrosm_proto.pyx":2542
 *         cdef int64_t field_size
 *         cdef PrimitiveGroup primitivegroup_elt
 *         while current_offset < size:             # <<<<<<<<<<<<<<
 *             key = get_varint64(memory, &current_offset)
 *             # stringtable
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_current_offset < __pyx_v_size) != 0);
    if (!__pyx_t_1) break;

    /* "pyrosm_proto.pyx":2543
 *         cdef PrimitiveGroup primitivegroup_elt
 *         while current_offset < size:
 *             key = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # stringtable
 *             if key == 10:
 */
    __pyx_v_key = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

    /* "pyrosm_proto.pyx":2545
 *             key = get_varint64(memory, &current_offset)
 *             # stringtable
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._stringtable is None:
 */
    switch (__pyx_v_key) {
      case 10:

      /* "pyrosm_proto.pyx":2546
 *             # stringtable
 *             if key == 10:
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 if self._stringtable is None:
 *                     self._stringtable = StringTable.__new__(StringTable)
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":2547
 *             if key == 10:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._stringtable is None:             # <<<<<<<<<<<<<<
 *                     self._stringtable = StringTable.__new__(StringTable)
 *                     self._stringtable._listener = <PyObject *>self
 */
      __pyx_t_1 = (((PyObject *)__pyx_v_self->_stringtable) == Py_None);
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "pyrosm_proto.pyx":2548
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._stringtable is None:
 *                     self._stringtable = StringTable.__new__(StringTable)             # <<<<<<<<<<<<<<
 *                     self._stringtable._listener = <PyObject *>self
 *                 self._stringtable.reset()
 */
        __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_StringTable(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_StringTable), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2548, __pyx_L1_error)
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
        __Pyx_GOTREF(__pyx_v_self->_stringtable);
        __Pyx_DECREF(((PyObject *)__pyx_v_self->_stringtable));
        __pyx_v_self->_stringtable = ((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyrosm_proto.pyx":2549
 *                 if self._stringtable is None:
 *                     self._stringtable = StringTable.__new__(StringTable)
 *                     self._stringtable._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *                 self._stringtable.reset()
 *                 if cache:
 */
        __pyx_v_self->_stringtable->_listener = ((PyObject *)__pyx_v_self);

        /* "pyrosm_proto.pyx":2547
 *             if key == 10:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._stringtable is None:             # <<<<<<<<<<<<<<
 *                     self._stringtable = StringTable.__new__(StringTable)
 *                     self._stringtable._listener = <PyObject *>self
 */
      }

      /* "pyrosm_proto.pyx":2550
 *                     self._stringtable = StringTable.__new__(StringTable)
 *                     self._stringtable._listener = <PyObject *>self
 *                 self._stringtable.reset()             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     self._stringtable._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->_stringtable->__pyx_vtab)->reset(__pyx_v_self->_stringtable, 0);

      /* "pyrosm_proto.pyx":2551
 *                     self._stringtable._listener = <PyObject *>self
 *                 self._stringtable.reset()
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._stringtable._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._stringtable._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      __pyx_t_2 = (__pyx_v_cache != 0);
      if (__pyx_t_2) {

        /* "pyrosm_proto.pyx":2552
 *                 self._stringtable.reset()
 *                 if cache:
 *                     self._stringtable._cached_serialization = bytes(memory[current_offset:current_offset+field_size])             # <<<<<<<<<<<<<<
 *                 current_offset += self._stringtable._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *             # primitivegroup
 */
        __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2552, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2552, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_self->_stringtable->_cached_serialization);
        __Pyx_DECREF(__pyx_v_self->_stringtable->_cached_serialization);
        __pyx_v_self->_stringtable->_cached_serialization = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyrosm_proto.pyx":2551
 *                     self._stringtable._listener = <PyObject *>self
 *                 self._stringtable.reset()
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._stringtable._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._stringtable._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      }

      /* "pyrosm_proto.pyx":2553
 *                 if cache:
 *                     self._stringtable._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._stringtable._protobuf_deserialize(memory+current_offset, <int>field_size, cache)             # <<<<<<<<<<<<<<
 *             # primitivegroup
 *             elif key == 18:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->_stringtable->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self->_stringtable, (__pyx_v_memory + __pyx_v_current_offset), ((int)__pyx_v_field_size), __pyx_v_cache));

      /* "pyrosm_proto.pyx":2545
 *             key = get_varint64(memory, &current_offset)
 *             # stringtable
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._stringtable is None:
 */
      break;
      case 18:

      /* "pyrosm_proto.pyx":2556
 *             # primitivegroup
 *             elif key == 18:
 *                 primitivegroup_elt = PrimitiveGroup.__new__(PrimitiveGroup)             # <<<<<<<<<<<<<<
 *                 primitivegroup_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)
 */
      __pyx_t_4 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_PrimitiveGroup(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_PrimitiveGroup), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2556, __pyx_L1_error)
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      __Pyx_XDECREF_SET(__pyx_v_primitivegroup_elt, ((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":2557
 *             elif key == 18:
 *                 primitivegroup_elt = PrimitiveGroup.__new__(PrimitiveGroup)
 *                 primitivegroup_elt.reset()             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_primitivegroup_elt->__pyx_vtab)->reset(__pyx_v_primitivegroup_elt, 0);

      /* "pyrosm_proto.pyx":2558
 *                 primitivegroup_elt = PrimitiveGroup.__new__(PrimitiveGroup)
 *                 primitivegroup_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     primitivegroup_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":2559
 *                 primitivegroup_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     primitivegroup_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += primitivegroup_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      __pyx_t_2 = (__pyx_v_cache != 0);
      if (__pyx_t_2) {

        /* "pyrosm_proto.pyx":2560
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:
 *                     primitivegroup_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])             # <<<<<<<<<<<<<<
 *                 current_offset += primitivegroup_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *                 list.append(self._primitivegroup, primitivegroup_elt)
 */
        __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2560, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2560, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GIVEREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_v_primitivegroup_elt->_cached_serialization);
        __Pyx_DECREF(__pyx_v_primitivegroup_elt->_cached_serialization);
        __pyx_v_primitivegroup_elt->_cached_serialization = ((PyObject*)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyrosm_proto.pyx":2559
 *                 primitivegroup_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     primitivegroup_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += primitivegroup_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      }

      /* "pyrosm_proto.pyx":2561
 *                 if cache:
 *                     primitivegroup_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += primitivegroup_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)             # <<<<<<<<<<<<<<
 *                 list.append(self._primitivegroup, primitivegroup_elt)
 *             # granularity
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_primitivegroup_elt->__pyx_vtab)->_protobuf_deserialize(__pyx_v_primitivegroup_elt, (__pyx_v_memory + __pyx_v_current_offset), ((int)__pyx_v_field_size), __pyx_v_cache));

      /* "pyrosm_proto.pyx":2562
 *                     primitivegroup_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += primitivegroup_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *                 list.append(self._primitivegroup, primitivegroup_elt)             # <<<<<<<<<<<<<<
 *             # granularity
 *             elif key == 136:
 */
      if (unlikely(((PyObject *)__pyx_v_self->_primitivegroup) == Py_None)) {
        PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
        __PYX_ERR(0, 2562, __pyx_L1_error)
      }
      __pyx_t_3 = ((PyObject *)__pyx_v_self->_primitivegroup);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyList_Append(((PyObject*)__pyx_t_3), ((PyObject *)__pyx_v_primitivegroup_elt)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 2562, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyrosm_proto.pyx":2555
 *                 current_offset += self._stringtable._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *             # primitivegroup
 *             elif key == 18:             # <<<<<<<<<<<<<<
 *                 primitivegroup_elt = PrimitiveGroup.__new__(PrimitiveGroup)
 *                 primitivegroup_elt.reset()
 */
      break;
      case 0x88:

      /* "pyrosm_proto.pyx":2565
 *             # granularity
 *             elif key == 136:
 *                 self.__field_bitmap0 |= 65536             # <<<<<<<<<<<<<<
 *                 self._granularity = get_varint32(memory, &current_offset)
 *             # date_granularity
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x10000);

      /* "pyrosm_proto.pyx":2566
 *             elif key == 136:
 *                 self.__field_bitmap0 |= 65536
 *                 self._granularity = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # date_granularity
 *             elif key == 144:
 */
      __pyx_v_self->_granularity = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":2564
 *                 list.append(self._primitivegroup, primitivegroup_elt)
 *             # granularity
 *             elif key == 136:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 65536
 *                 self._granularity = get_varint32(memory, &current_offset)
 */
      break;
      case 0x90:

      /* "pyrosm_proto.pyx":2569
 *             # date_granularity
 *             elif key == 144:
 *                 self.__field_bitmap0 |= 131072             # <<<<<<<<<<<<<<
 *                 self._date_granularity = get_varint32(memory, &current_offset)
 *             # lat_offset
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x20000);

      /* "pyrosm_proto.pyx":2570
 *             elif key == 144:
 *                 self.__field_bitmap0 |= 131072
 *                 self._date_granularity = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # lat_offset
 *             elif key == 152:
 */
      __pyx_v_self->_date_granularity = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":2568
 *                 self._granularity = get_varint32(memory, &current_offset)
 *             # date_granularity
 *             elif key == 144:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 131072
 *                 self._date_granularity = get_varint32(memory, &current_offset)
 */
      break;
      case 0x98:

      /* "pyrosm_proto.pyx":2573
 *             # lat_offset
 *             elif key == 152:
 *                 self.__field_bitmap0 |= 262144             # <<<<<<<<<<<<<<
 *                 self._lat_offset = get_varint64(memory, &current_offset)
 *             # lon_offset
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x40000);

      /* "pyrosm_proto.pyx":2574
 *             elif key == 152:
 *                 self.__field_bitmap0 |= 262144
 *                 self._lat_offset = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # lon_offset
 *             elif key == 160:
 */
      __pyx_v_self->_lat_offset = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":2572
 *                 self._date_granularity = get_varint32(memory, &current_offset)
 *             # lat_offset
 *             elif key == 152:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 262144
 *                 self._lat_offset = get_varint64(memory, &current_offset)
 */
      break;
      case 0xA0:

      /* "pyrosm_proto.pyx":2577
 *             # lon_offset
 *             elif key == 160:
 *                 self.__field_bitmap0 |= 524288             # <<<<<<<<<<<<<<
 *                 self._lon_offset = get_varint64(memory, &current_offset)
 *             # Unknown field - need to skip proper number of bytes
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x80000);

      /* "pyrosm_proto.pyx":2578
 *             elif key == 160:
 *                 self.__field_bitmap0 |= 524288
 *                 self._lon_offset = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 */
      __pyx_v_self->_lon_offset = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":2576
 *                 self._lat_offset = get_varint64(memory, &current_offset)
 *             # lon_offset
 *             elif key == 160:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 524288
 *                 self._lon_offset = get_varint64(memory, &current_offset)
 */
      break;
      default:

      /* "pyrosm_proto.pyx":2581
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)             # <<<<<<<<<<<<<<
 * 
 *         self._is_present_in_parent = True
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        if (unlikely(!(__pyx_f_12pyrobuf_util_skip_generic(__pyx_v_memory, (&__pyx_v_current_offset), __pyx_v_size, (__pyx_v_key & 0x7)) != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 2581, __pyx_L1_error)
        }
      }
      #endif
      break;
    }
  }

  /* "pyrosm_proto.pyx":2583
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)
 * 
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 * 
 *         return current_offset
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":2585
 *         self._is_present_in_parent = True
 * 
 *         return current_offset             # <<<<<<<<<<<<<<
 * 
 *     cpdef void Clear(self):
 */
  __pyx_r = __pyx_v_current_offset;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2537
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pyrosm_proto.PrimitiveBlock._protobuf_deserialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_primitivegroup_elt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2587
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveBlock_Clear(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2587, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_11Clear)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2587, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2589
 *     cpdef void Clear(self):
 *         """Clears all data that was set in the message."""
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2590
 *         """Clears all data that was set in the message."""
 *         self.reset()
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void ClearField(self, field_name):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2587
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.PrimitiveBlock.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_10Clear[] = "Clears all data that was set in the message.";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Clear (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_10Clear(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_10Clear(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_14PrimitiveBlock_Clear(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2587, __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("pyrosm_proto.PrimitiveBlock.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2592
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'stringtable':
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveBlock_ClearField(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("ClearField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ClearField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2592, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_13ClearField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2592, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2594
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'stringtable':             # <<<<<<<<<<<<<<
 *             if self._stringtable is not None:
 *                 self._stringtable._listener = <PyObject *>null_listener
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_stringtable, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2594, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2595
 *         """Clears the contents of a given field."""
 *         if field_name == 'stringtable':
 *             if self._stringtable is not None:             # <<<<<<<<<<<<<<
 *                 self._stringtable._listener = <PyObject *>null_listener
 *             self._stringtable = None
 */
    __pyx_t_5 = (((PyObject *)__pyx_v_self->_stringtable) != Py_None);
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "pyrosm_proto.pyx":2596
 *         if field_name == 'stringtable':
 *             if self._stringtable is not None:
 *                 self._stringtable._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._stringtable = None
 *         elif field_name == 'primitivegroup':
 */
      __pyx_v_self->_stringtable->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

      /* "pyrosm_proto.pyx":2595
 *         """Clears the contents of a given field."""
 *         if field_name == 'stringtable':
 *             if self._stringtable is not None:             # <<<<<<<<<<<<<<
 *                 self._stringtable._listener = <PyObject *>null_listener
 *             self._stringtable = None
 */
    }

    /* "pyrosm_proto.pyx":2597
 *             if self._stringtable is not None:
 *                 self._stringtable._listener = <PyObject *>null_listener
 *             self._stringtable = None             # <<<<<<<<<<<<<<
 *         elif field_name == 'primitivegroup':
 *             if self._primitivegroup is not None:
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->_stringtable);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_stringtable));
    __pyx_v_self->_stringtable = ((struct __pyx_obj_12pyrosm_proto_StringTable *)Py_None);

    /* "pyrosm_proto.pyx":2594
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'stringtable':             # <<<<<<<<<<<<<<
 *             if self._stringtable is not None:
 *                 self._stringtable._listener = <PyObject *>null_listener
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":2598
 *                 self._stringtable._listener = <PyObject *>null_listener
 *             self._stringtable = None
 *         elif field_name == 'primitivegroup':             # <<<<<<<<<<<<<<
 *             if self._primitivegroup is not None:
 *                 self._primitivegroup._listener = <PyObject *>null_listener
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_primitivegroup, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2598, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":2599
 *             self._stringtable = None
 *         elif field_name == 'primitivegroup':
 *             if self._primitivegroup is not None:             # <<<<<<<<<<<<<<
 *                 self._primitivegroup._listener = <PyObject *>null_listener
 *             self._primitivegroup = TypedList.__new__(TypedList)
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_primitivegroup) != Py_None);
    __pyx_t_5 = (__pyx_t_6 != 0);
    if (__pyx_t_5) {

      /* "pyrosm_proto.pyx":2600
 *         elif field_name == 'primitivegroup':
 *             if self._primitivegroup is not None:
 *                 self._primitivegroup._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._primitivegroup = TypedList.__new__(TypedList)
 *             self._primitivegroup._list_type = PrimitiveGroup
 */
      __pyx_v_self->_primitivegroup->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

      /* "pyrosm_proto.pyx":2599
 *             self._stringtable = None
 *         elif field_name == 'primitivegroup':
 *             if self._primitivegroup is not None:             # <<<<<<<<<<<<<<
 *                 self._primitivegroup._listener = <PyObject *>null_listener
 *             self._primitivegroup = TypedList.__new__(TypedList)
 */
    }

    /* "pyrosm_proto.pyx":2601
 *             if self._primitivegroup is not None:
 *                 self._primitivegroup._listener = <PyObject *>null_listener
 *             self._primitivegroup = TypedList.__new__(TypedList)             # <<<<<<<<<<<<<<
 *             self._primitivegroup._list_type = PrimitiveGroup
 *             self._primitivegroup._listener = <PyObject *>self
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 2601, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_primitivegroup);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_primitivegroup));
    __pyx_v_self->_primitivegroup = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":2602
 *                 self._primitivegroup._listener = <PyObject *>null_listener
 *             self._primitivegroup = TypedList.__new__(TypedList)
 *             self._primitivegroup._list_type = PrimitiveGroup             # <<<<<<<<<<<<<<
 *             self._primitivegroup._listener = <PyObject *>self
 *         elif field_name == 'granularity':
 */
    __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrosm_proto_PrimitiveGroup));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrosm_proto_PrimitiveGroup));
    __Pyx_GOTREF(__pyx_v_self->_primitivegroup->_list_type);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_primitivegroup->_list_type));
    __pyx_v_self->_primitivegroup->_list_type = __pyx_ptype_12pyrosm_proto_PrimitiveGroup;

    /* "pyrosm_proto.pyx":2603
 *             self._primitivegroup = TypedList.__new__(TypedList)
 *             self._primitivegroup._list_type = PrimitiveGroup
 *             self._primitivegroup._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'granularity':
 *             self.__field_bitmap0 &= ~65536
 */
    __pyx_v_self->_primitivegroup->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":2598
 *                 self._stringtable._listener = <PyObject *>null_listener
 *             self._stringtable = None
 *         elif field_name == 'primitivegroup':             # <<<<<<<<<<<<<<
 *             if self._primitivegroup is not None:
 *                 self._primitivegroup._listener = <PyObject *>null_listener
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":2604
 *             self._primitivegroup._list_type = PrimitiveGroup
 *             self._primitivegroup._listener = <PyObject *>self
 *         elif field_name == 'granularity':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~65536
 *             self._granularity = 100
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_granularity, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2604, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2605
 *             self._primitivegroup._listener = <PyObject *>self
 *         elif field_name == 'granularity':
 *             self.__field_bitmap0 &= ~65536             # <<<<<<<<<<<<<<
 *             self._granularity = 100
 *         elif field_name == 'date_granularity':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~0x10000));

    /* "pyrosm_proto.pyx":2606
 *         elif field_name == 'granularity':
 *             self.__field_bitmap0 &= ~65536
 *             self._granularity = 100             # <<<<<<<<<<<<<<
 *         elif field_name == 'date_granularity':
 *             self.__field_bitmap0 &= ~131072
 */
    __pyx_v_self->_granularity = 0x64;

    /* "pyrosm_proto.pyx":2604
 *             self._primitivegroup._list_type = PrimitiveGroup
 *             self._primitivegroup._listener = <PyObject *>self
 *         elif field_name == 'granularity':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~65536
 *             self._granularity = 100
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":2607
 *             self.__field_bitmap0 &= ~65536
 *             self._granularity = 100
 *         elif field_name == 'date_granularity':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~131072
 *             self._date_granularity = 1000
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_date_granularity, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2607, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2608
 *             self._granularity = 100
 *         elif field_name == 'date_granularity':
 *             self.__field_bitmap0 &= ~131072             # <<<<<<<<<<<<<<
 *             self._date_granularity = 1000
 *         elif field_name == 'lat_offset':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~0x20000));

    /* "pyrosm_proto.pyx":2609
 *         elif field_name == 'date_granularity':
 *             self.__field_bitmap0 &= ~131072
 *             self._date_granularity = 1000             # <<<<<<<<<<<<<<
 *         elif field_name == 'lat_offset':
 *             self.__field_bitmap0 &= ~262144
 */
    __pyx_v_self->_date_granularity = 0x3E8;

    /* "pyrosm_proto.pyx":2607
 *             self.__field_bitmap0 &= ~65536
 *             self._granularity = 100
 *         elif field_name == 'date_granularity':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~131072
 *             self._date_granularity = 1000
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":2610
 *             self.__field_bitmap0 &= ~131072
 *             self._date_granularity = 1000
 *         elif field_name == 'lat_offset':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~262144
 *             self._lat_offset = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_lat_offset, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2610, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2611
 *             self._date_granularity = 1000
 *         elif field_name == 'lat_offset':
 *             self.__field_bitmap0 &= ~262144             # <<<<<<<<<<<<<<
 *             self._lat_offset = 0
 *         elif field_name == 'lon_offset':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~0x40000));

    /* "pyrosm_proto.pyx":2612
 *         elif field_name == 'lat_offset':
 *             self.__field_bitmap0 &= ~262144
 *             self._lat_offset = 0             # <<<<<<<<<<<<<<
 *         elif field_name == 'lon_offset':
 *             self.__field_bitmap0 &= ~524288
 */
    __pyx_v_self->_lat_offset = 0;

    /* "pyrosm_proto.pyx":2610
 *             self.__field_bitmap0 &= ~131072
 *             self._date_granularity = 1000
 *         elif field_name == 'lat_offset':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~262144
 *             self._lat_offset = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":2613
 *             self.__field_bitmap0 &= ~262144
 *             self._lat_offset = 0
 *         elif field_name == 'lon_offset':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~524288
 *             self._lon_offset = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_lon_offset, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2613, __pyx_L1_error)
  if (likely(__pyx_t_5)) {

    /* "pyrosm_proto.pyx":2614
 *             self._lat_offset = 0
 *         elif field_name == 'lon_offset':
 *             self.__field_bitmap0 &= ~524288             # <<<<<<<<<<<<<<
 *             self._lon_offset = 0
 *         else:
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~0x80000));

    /* "pyrosm_proto.pyx":2615
 *         elif field_name == 'lon_offset':
 *             self.__field_bitmap0 &= ~524288
 *             self._lon_offset = 0             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 */
    __pyx_v_self->_lon_offset = 0;

    /* "pyrosm_proto.pyx":2613
 *             self.__field_bitmap0 &= ~262144
 *             self._lat_offset = 0
 *         elif field_name == 'lon_offset':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~524288
 *             self._lon_offset = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":2617
 *             self._lon_offset = 0
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2617, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":2619
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void CopyFrom(self, PrimitiveBlock other_msg):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2592
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'stringtable':
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.PrimitiveBlock.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_12ClearField[] = "Clears the contents of a given field.";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ClearField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_12ClearField(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_12ClearField(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ClearField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_14PrimitiveBlock_ClearField(__pyx_v_self, __pyx_v_field_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2592, __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("pyrosm_proto.PrimitiveBlock.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2621
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, PrimitiveBlock other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveBlock_CopyFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CopyFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_15CopyFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2628
 *             other_msg (PrimitiveBlock): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":2629
 *         """
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 *         self.reset()
 *         self.MergeFrom(other_msg)
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2628
 *             other_msg (PrimitiveBlock): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  }

  /* "pyrosm_proto.pyx":2630
 *         if self is other_msg:
 *             return
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self.MergeFrom(other_msg)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2631
 *             return
 *         self.reset()
 *         self.MergeFrom(other_msg)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint HasField(self, field_name) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->MergeFrom(__pyx_v_self, __pyx_v_other_msg, 0);

  /* "pyrosm_proto.pyx":2621
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, PrimitiveBlock other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.PrimitiveBlock.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_14CopyFrom[] = "\n        Copies the content of the specified message into the current message.\n\n        Params:\n            other_msg (PrimitiveBlock): Message to copy into the current one.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CopyFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_PrimitiveBlock, 1, "other_msg", 0))) __PYX_ERR(0, 2621, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_14CopyFrom(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_14CopyFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_14PrimitiveBlock_CopyFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2621, __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("pyrosm_proto.PrimitiveBlock.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2633
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveBlock_HasField(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("HasField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_HasField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_17HasField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2633, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2633, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2640
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'stringtable':             # <<<<<<<<<<<<<<
 *             return self._stringtable is not None and self._stringtable._is_present_in_parent
 *         if field_name == 'granularity':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_stringtable, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2640, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2641
 *         """
 *         if field_name == 'stringtable':
 *             return self._stringtable is not None and self._stringtable._is_present_in_parent             # <<<<<<<<<<<<<<
 *         if field_name == 'granularity':
 *             return self.__field_bitmap0 & 65536 == 65536
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_stringtable) != Py_None);
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_5 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->_stringtable->_is_present_in_parent != 0);
    __pyx_t_5 = __pyx_t_7;
    __pyx_L4_bool_binop_done:;
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2640
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'stringtable':             # <<<<<<<<<<<<<<
 *             return self._stringtable is not None and self._stringtable._is_present_in_parent
 *         if field_name == 'granularity':
 */
  }

  /* "pyrosm_proto.pyx":2642
 *         if field_name == 'stringtable':
 *             return self._stringtable is not None and self._stringtable._is_present_in_parent
 *         if field_name == 'granularity':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 65536 == 65536
 *         if field_name == 'date_granularity':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_granularity, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2642, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2643
 *             return self._stringtable is not None and self._stringtable._is_present_in_parent
 *         if field_name == 'granularity':
 *             return self.__field_bitmap0 & 65536 == 65536             # <<<<<<<<<<<<<<
 *         if field_name == 'date_granularity':
 *             return self.__field_bitmap0 & 131072 == 131072
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 0x10000) == 0x10000);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2642
 *         if field_name == 'stringtable':
 *             return self._stringtable is not None and self._stringtable._is_present_in_parent
 *         if field_name == 'granularity':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 65536 == 65536
 *         if field_name == 'date_granularity':
 */
  }

  /* "pyrosm_proto.pyx":2644
 *         if field_name == 'granularity':
 *             return self.__field_bitmap0 & 65536 == 65536
 *         if field_name == 'date_granularity':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 131072 == 131072
 *         if field_name == 'lat_offset':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_date_granularity, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2644, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2645
 *             return self.__field_bitmap0 & 65536 == 65536
 *         if field_name == 'date_granularity':
 *             return self.__field_bitmap0 & 131072 == 131072             # <<<<<<<<<<<<<<
 *         if field_name == 'lat_offset':
 *             return self.__field_bitmap0 & 262144 == 262144
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 0x20000) == 0x20000);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2644
 *         if field_name == 'granularity':
 *             return self.__field_bitmap0 & 65536 == 65536
 *         if field_name == 'date_granularity':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 131072 == 131072
 *         if field_name == 'lat_offset':
 */
  }

  /* "pyrosm_proto.pyx":2646
 *         if field_name == 'date_granularity':
 *             return self.__field_bitmap0 & 131072 == 131072
 *         if field_name == 'lat_offset':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 262144 == 262144
 *         if field_name == 'lon_offset':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_lat_offset, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2646, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2647
 *             return self.__field_bitmap0 & 131072 == 131072
 *         if field_name == 'lat_offset':
 *             return self.__field_bitmap0 & 262144 == 262144             # <<<<<<<<<<<<<<
 *         if field_name == 'lon_offset':
 *             return self.__field_bitmap0 & 524288 == 524288
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 0x40000) == 0x40000);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2646
 *         if field_name == 'date_granularity':
 *             return self.__field_bitmap0 & 131072 == 131072
 *         if field_name == 'lat_offset':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 262144 == 262144
 *         if field_name == 'lon_offset':
 */
  }

  /* "pyrosm_proto.pyx":2648
 *         if field_name == 'lat_offset':
 *             return self.__field_bitmap0 & 262144 == 262144
 *         if field_name == 'lon_offset':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 524288 == 524288
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_lon_offset, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2648, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2649
 *             return self.__field_bitmap0 & 262144 == 262144
 *         if field_name == 'lon_offset':
 *             return self.__field_bitmap0 & 524288 == 524288             # <<<<<<<<<<<<<<
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 0x80000) == 0x80000);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2648
 *         if field_name == 'lat_offset':
 *             return self.__field_bitmap0 & 262144 == 262144
 *         if field_name == 'lon_offset':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 524288 == 524288
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  }

  /* "pyrosm_proto.pyx":2650
 *         if field_name == 'lon_offset':
 *             return self.__field_bitmap0 & 524288 == 524288
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint IsInitialized(self):
 */
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_singular, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 2650, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2633
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

  /* 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("pyrosm_proto.PrimitiveBlock.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_16HasField[] = "\n        Checks if a certain field is set for the message.\n\n        Params:\n            field_name (str): The name of the field to check.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_16HasField(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_16HasField(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("HasField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_14PrimitiveBlock_HasField(__pyx_v_self, __pyx_v_field_name, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2633, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2652
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveBlock_IsInitialized(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_v_i;
  struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_primitivegroup_msg = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_IsInitialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_19IsInitialized)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2652, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2652, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2664
 * 
 * 
 *         if self._stringtable is None or not self._stringtable.IsInitialized():             # <<<<<<<<<<<<<<
 *             return False
 *         for i in range(len(self._primitivegroup)):
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_stringtable) == Py_None);
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->_stringtable->__pyx_vtab)->IsInitialized(__pyx_v_self->_stringtable, 0) != 0)) != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":2665
 * 
 *         if self._stringtable is None or not self._stringtable.IsInitialized():
 *             return False             # <<<<<<<<<<<<<<
 *         for i in range(len(self._primitivegroup)):
 *             primitivegroup_msg = <PrimitiveGroup>self._primitivegroup[i]
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2664
 * 
 * 
 *         if self._stringtable is None or not self._stringtable.IsInitialized():             # <<<<<<<<<<<<<<
 *             return False
 *         for i in range(len(self._primitivegroup)):
 */
  }

  /* "pyrosm_proto.pyx":2666
 *         if self._stringtable is None or not self._stringtable.IsInitialized():
 *             return False
 *         for i in range(len(self._primitivegroup)):             # <<<<<<<<<<<<<<
 *             primitivegroup_msg = <PrimitiveGroup>self._primitivegroup[i]
 *             if not primitivegroup_msg.IsInitialized():
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_primitivegroup);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_8 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "pyrosm_proto.pyx":2667
 *             return False
 *         for i in range(len(self._primitivegroup)):
 *             primitivegroup_msg = <PrimitiveGroup>self._primitivegroup[i]             # <<<<<<<<<<<<<<
 *             if not primitivegroup_msg.IsInitialized():
 *                 return False
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_primitivegroup), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_primitivegroup_msg, ((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":2668
 *         for i in range(len(self._primitivegroup)):
 *             primitivegroup_msg = <PrimitiveGroup>self._primitivegroup[i]
 *             if not primitivegroup_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
    __pyx_t_5 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_primitivegroup_msg->__pyx_vtab)->IsInitialized(__pyx_v_primitivegroup_msg, 0) != 0)) != 0);
    if (__pyx_t_5) {

      /* "pyrosm_proto.pyx":2669
 *             primitivegroup_msg = <PrimitiveGroup>self._primitivegroup[i]
 *             if not primitivegroup_msg.IsInitialized():
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         return True
 */
      __pyx_r = 0;
      goto __pyx_L0;

      /* "pyrosm_proto.pyx":2668
 *         for i in range(len(self._primitivegroup)):
 *             primitivegroup_msg = <PrimitiveGroup>self._primitivegroup[i]
 *             if not primitivegroup_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
    }
  }

  /* "pyrosm_proto.pyx":2671
 *                 return False
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef void MergeFrom(self, PrimitiveBlock other_msg):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2652
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

  /* 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_WriteUnraisable("pyrosm_proto.PrimitiveBlock.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_primitivegroup_msg);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_18IsInitialized[] = "\n        Checks if the message is initialized.\n\n        Returns:\n            bool: True if the message is initialized (i.e. all of its required\n                fields are set).\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsInitialized (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_18IsInitialized(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_18IsInitialized(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_12pyrosm_proto_14PrimitiveBlock_IsInitialized(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2652, __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("pyrosm_proto.PrimitiveBlock.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2673
 *         return True
 * 
 *     cpdef void MergeFrom(self, PrimitiveBlock other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveBlock_MergeFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  int __pyx_v_i;
  struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_primitivegroup_elt = 0;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int32_t __pyx_t_12;
  int64_t __pyx_t_13;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_21MergeFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2673, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2683
 *         cdef PrimitiveGroup primitivegroup_elt
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":2684
 * 
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2683
 *         cdef PrimitiveGroup primitivegroup_elt
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "pyrosm_proto.pyx":2687
 * 
 * 
 *         if other_msg._stringtable is not None and other_msg._stringtable._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             if self._stringtable is None:
 *                 self._stringtable = StringTable.__new__(StringTable)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_other_msg->_stringtable) != Py_None);
  __pyx_t_7 = (__pyx_t_5 != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_other_msg->_stringtable->_is_present_in_parent != 0);
  __pyx_t_6 = __pyx_t_7;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":2688
 * 
 *         if other_msg._stringtable is not None and other_msg._stringtable._is_present_in_parent:
 *             if self._stringtable is None:             # <<<<<<<<<<<<<<
 *                 self._stringtable = StringTable.__new__(StringTable)
 *                 self._stringtable.reset()
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_stringtable) == Py_None);
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (__pyx_t_7) {

      /* "pyrosm_proto.pyx":2689
 *         if other_msg._stringtable is not None and other_msg._stringtable._is_present_in_parent:
 *             if self._stringtable is None:
 *                 self._stringtable = StringTable.__new__(StringTable)             # <<<<<<<<<<<<<<
 *                 self._stringtable.reset()
 *                 self._stringtable._listener = <PyObject *>self
 */
      __pyx_t_1 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_StringTable(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_StringTable), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2689, __pyx_L1_error)
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
      __Pyx_GOTREF(__pyx_v_self->_stringtable);
      __Pyx_DECREF(((PyObject *)__pyx_v_self->_stringtable));
      __pyx_v_self->_stringtable = ((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyrosm_proto.pyx":2690
 *             if self._stringtable is None:
 *                 self._stringtable = StringTable.__new__(StringTable)
 *                 self._stringtable.reset()             # <<<<<<<<<<<<<<
 *                 self._stringtable._listener = <PyObject *>self
 *             self._stringtable.MergeFrom(other_msg._stringtable)
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->_stringtable->__pyx_vtab)->reset(__pyx_v_self->_stringtable, 0);

      /* "pyrosm_proto.pyx":2691
 *                 self._stringtable = StringTable.__new__(StringTable)
 *                 self._stringtable.reset()
 *                 self._stringtable._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *             self._stringtable.MergeFrom(other_msg._stringtable)
 *         for i in range(len(other_msg._primitivegroup)):
 */
      __pyx_v_self->_stringtable->_listener = ((PyObject *)__pyx_v_self);

      /* "pyrosm_proto.pyx":2688
 * 
 *         if other_msg._stringtable is not None and other_msg._stringtable._is_present_in_parent:
 *             if self._stringtable is None:             # <<<<<<<<<<<<<<
 *                 self._stringtable = StringTable.__new__(StringTable)
 *                 self._stringtable.reset()
 */
    }

    /* "pyrosm_proto.pyx":2692
 *                 self._stringtable.reset()
 *                 self._stringtable._listener = <PyObject *>self
 *             self._stringtable.MergeFrom(other_msg._stringtable)             # <<<<<<<<<<<<<<
 *         for i in range(len(other_msg._primitivegroup)):
 *             primitivegroup_elt = PrimitiveGroup()
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_stringtable);
    __Pyx_INCREF(__pyx_t_1);
    ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->_stringtable->__pyx_vtab)->MergeFrom(__pyx_v_self->_stringtable, ((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_t_1), 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":2687
 * 
 * 
 *         if other_msg._stringtable is not None and other_msg._stringtable._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             if self._stringtable is None:
 *                 self._stringtable = StringTable.__new__(StringTable)
 */
  }

  /* "pyrosm_proto.pyx":2693
 *                 self._stringtable._listener = <PyObject *>self
 *             self._stringtable.MergeFrom(other_msg._stringtable)
 *         for i in range(len(other_msg._primitivegroup)):             # <<<<<<<<<<<<<<
 *             primitivegroup_elt = PrimitiveGroup()
 *             primitivegroup_elt.MergeFrom(other_msg._primitivegroup[i])
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_primitivegroup);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_8 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2693, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "pyrosm_proto.pyx":2694
 *             self._stringtable.MergeFrom(other_msg._stringtable)
 *         for i in range(len(other_msg._primitivegroup)):
 *             primitivegroup_elt = PrimitiveGroup()             # <<<<<<<<<<<<<<
 *             primitivegroup_elt.MergeFrom(other_msg._primitivegroup[i])
 *             list.append(self._primitivegroup, primitivegroup_elt)
 */
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_12pyrosm_proto_PrimitiveGroup)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_primitivegroup_elt, ((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":2695
 *         for i in range(len(other_msg._primitivegroup)):
 *             primitivegroup_elt = PrimitiveGroup()
 *             primitivegroup_elt.MergeFrom(other_msg._primitivegroup[i])             # <<<<<<<<<<<<<<
 *             list.append(self._primitivegroup, primitivegroup_elt)
 *         if other_msg.__field_bitmap0 & 65536 == 65536:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_other_msg->_primitivegroup), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrosm_proto_PrimitiveGroup))))) __PYX_ERR(0, 2695, __pyx_L1_error)
    ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_primitivegroup_elt->__pyx_vtab)->MergeFrom(__pyx_v_primitivegroup_elt, ((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_t_1), 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":2696
 *             primitivegroup_elt = PrimitiveGroup()
 *             primitivegroup_elt.MergeFrom(other_msg._primitivegroup[i])
 *             list.append(self._primitivegroup, primitivegroup_elt)             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 65536 == 65536:
 *             self._granularity = other_msg._granularity
 */
    if (unlikely(((PyObject *)__pyx_v_self->_primitivegroup) == Py_None)) {
      PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
      __PYX_ERR(0, 2696, __pyx_L1_error)
    }
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_primitivegroup);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyList_Append(((PyObject*)__pyx_t_1), ((PyObject *)__pyx_v_primitivegroup_elt)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 2696, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "pyrosm_proto.pyx":2697
 *             primitivegroup_elt.MergeFrom(other_msg._primitivegroup[i])
 *             list.append(self._primitivegroup, primitivegroup_elt)
 *         if other_msg.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             self._granularity = other_msg._granularity
 *             self.__field_bitmap0 |= 65536
 */
  __pyx_t_7 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 0x10000) == 0x10000) != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":2698
 *             list.append(self._primitivegroup, primitivegroup_elt)
 *         if other_msg.__field_bitmap0 & 65536 == 65536:
 *             self._granularity = other_msg._granularity             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 65536
 *         if other_msg.__field_bitmap0 & 131072 == 131072:
 */
    __pyx_t_12 = __pyx_v_other_msg->_granularity;
    __pyx_v_self->_granularity = __pyx_t_12;

    /* "pyrosm_proto.pyx":2699
 *         if other_msg.__field_bitmap0 & 65536 == 65536:
 *             self._granularity = other_msg._granularity
 *             self.__field_bitmap0 |= 65536             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 131072 == 131072:
 *             self._date_granularity = other_msg._date_granularity
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x10000);

    /* "pyrosm_proto.pyx":2697
 *             primitivegroup_elt.MergeFrom(other_msg._primitivegroup[i])
 *             list.append(self._primitivegroup, primitivegroup_elt)
 *         if other_msg.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             self._granularity = other_msg._granularity
 *             self.__field_bitmap0 |= 65536
 */
  }

  /* "pyrosm_proto.pyx":2700
 *             self._granularity = other_msg._granularity
 *             self.__field_bitmap0 |= 65536
 *         if other_msg.__field_bitmap0 & 131072 == 131072:             # <<<<<<<<<<<<<<
 *             self._date_granularity = other_msg._date_granularity
 *             self.__field_bitmap0 |= 131072
 */
  __pyx_t_7 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 0x20000) == 0x20000) != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":2701
 *             self.__field_bitmap0 |= 65536
 *         if other_msg.__field_bitmap0 & 131072 == 131072:
 *             self._date_granularity = other_msg._date_granularity             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 131072
 *         if other_msg.__field_bitmap0 & 262144 == 262144:
 */
    __pyx_t_12 = __pyx_v_other_msg->_date_granularity;
    __pyx_v_self->_date_granularity = __pyx_t_12;

    /* "pyrosm_proto.pyx":2702
 *         if other_msg.__field_bitmap0 & 131072 == 131072:
 *             self._date_granularity = other_msg._date_granularity
 *             self.__field_bitmap0 |= 131072             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 262144 == 262144:
 *             self._lat_offset = other_msg._lat_offset
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x20000);

    /* "pyrosm_proto.pyx":2700
 *             self._granularity = other_msg._granularity
 *             self.__field_bitmap0 |= 65536
 *         if other_msg.__field_bitmap0 & 131072 == 131072:             # <<<<<<<<<<<<<<
 *             self._date_granularity = other_msg._date_granularity
 *             self.__field_bitmap0 |= 131072
 */
  }

  /* "pyrosm_proto.pyx":2703
 *             self._date_granularity = other_msg._date_granularity
 *             self.__field_bitmap0 |= 131072
 *         if other_msg.__field_bitmap0 & 262144 == 262144:             # <<<<<<<<<<<<<<
 *             self._lat_offset = other_msg._lat_offset
 *             self.__field_bitmap0 |= 262144
 */
  __pyx_t_7 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 0x40000) == 0x40000) != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":2704
 *             self.__field_bitmap0 |= 131072
 *         if other_msg.__field_bitmap0 & 262144 == 262144:
 *             self._lat_offset = other_msg._lat_offset             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 262144
 *         if other_msg.__field_bitmap0 & 524288 == 524288:
 */
    __pyx_t_13 = __pyx_v_other_msg->_lat_offset;
    __pyx_v_self->_lat_offset = __pyx_t_13;

    /* "pyrosm_proto.pyx":2705
 *         if other_msg.__field_bitmap0 & 262144 == 262144:
 *             self._lat_offset = other_msg._lat_offset
 *             self.__field_bitmap0 |= 262144             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 524288 == 524288:
 *             self._lon_offset = other_msg._lon_offset
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x40000);

    /* "pyrosm_proto.pyx":2703
 *             self._date_granularity = other_msg._date_granularity
 *             self.__field_bitmap0 |= 131072
 *         if other_msg.__field_bitmap0 & 262144 == 262144:             # <<<<<<<<<<<<<<
 *             self._lat_offset = other_msg._lat_offset
 *             self.__field_bitmap0 |= 262144
 */
  }

  /* "pyrosm_proto.pyx":2706
 *             self._lat_offset = other_msg._lat_offset
 *             self.__field_bitmap0 |= 262144
 *         if other_msg.__field_bitmap0 & 524288 == 524288:             # <<<<<<<<<<<<<<
 *             self._lon_offset = other_msg._lon_offset
 *             self.__field_bitmap0 |= 524288
 */
  __pyx_t_7 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 0x80000) == 0x80000) != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":2707
 *             self.__field_bitmap0 |= 262144
 *         if other_msg.__field_bitmap0 & 524288 == 524288:
 *             self._lon_offset = other_msg._lon_offset             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 524288
 * 
 */
    __pyx_t_13 = __pyx_v_other_msg->_lon_offset;
    __pyx_v_self->_lon_offset = __pyx_t_13;

    /* "pyrosm_proto.pyx":2708
 *         if other_msg.__field_bitmap0 & 524288 == 524288:
 *             self._lon_offset = other_msg._lon_offset
 *             self.__field_bitmap0 |= 524288             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x80000);

    /* "pyrosm_proto.pyx":2706
 *             self._lat_offset = other_msg._lat_offset
 *             self.__field_bitmap0 |= 262144
 *         if other_msg.__field_bitmap0 & 524288 == 524288:             # <<<<<<<<<<<<<<
 *             self._lon_offset = other_msg._lon_offset
 *             self.__field_bitmap0 |= 524288
 */
  }

  /* "pyrosm_proto.pyx":2710
 *             self.__field_bitmap0 |= 524288
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2673
 *         return True
 * 
 *     cpdef void MergeFrom(self, PrimitiveBlock other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.PrimitiveBlock.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_primitivegroup_elt);
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_20MergeFrom[] = "\n        Merges the contents of the specified message into the current message.\n\n        Params:\n            other_msg: Message to merge into the current message.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_PrimitiveBlock, 1, "other_msg", 0))) __PYX_ERR(0, 2673, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_20MergeFrom(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_20MergeFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_14PrimitiveBlock_MergeFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2673, __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("pyrosm_proto.PrimitiveBlock.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2712
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveBlock_MergeFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_MergeFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  unsigned char const *__pyx_t_10;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_23MergeFromString)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2712, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2712, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2712, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2712, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2712, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2726
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, False)
 */
  __pyx_t_7 = (__pyx_v_size != Py_None);
  if ((__pyx_t_7 != 0)) {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2726, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_8;
  } else {
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2726, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_9;
  }
  __pyx_v_length = __pyx_t_5;

  /* "pyrosm_proto.pyx":2728
 *         length = size if size is not None else len(data)
 * 
 *         buf = self._protobuf_deserialize(data, length, False)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_10 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 2728, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_10, __pyx_v_length, 0);

  /* "pyrosm_proto.pyx":2730
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  __pyx_t_7 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "pyrosm_proto.pyx":2731
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_GIVEREF(__pyx_v_size);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_size);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Truncated_message_got_s_expected, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2731, __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, 2731, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2730
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  }

  /* "pyrosm_proto.pyx":2733
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2735
 *         self._Modified()
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2712
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_22MergeFromString[] = "\n        Merges serialized protocol buffer data into this message.\n\n        Params:\n            data (bytes): a string of binary data.\n            size (int): optional - the length of the data string\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "MergeFromString") < 0)) __PYX_ERR(0, 2712, __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_data = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MergeFromString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2712, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_22MergeFromString(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), __pyx_v_data, __pyx_v_size);

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_22MergeFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_MergeFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_PrimitiveBlock->MergeFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2712, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2737
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveBlock_ParseFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_ParseFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_reset = ((int)1);
  int __pyx_v_cache = ((int)0);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  unsigned char const *__pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_reset = __pyx_optional_args->reset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cache = __pyx_optional_args->cache;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2737, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_25ParseFromString)) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2737, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2737, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2737, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2737, __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(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2737, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_size);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 3+__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, 2737, __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, 2737, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2753
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         if reset:
 */
  __pyx_t_9 = (__pyx_v_size != Py_None);
  if ((__pyx_t_9 != 0)) {
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2753, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2753, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_11;
  }
  __pyx_v_length = __pyx_t_7;

  /* "pyrosm_proto.pyx":2755
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_9 = (__pyx_v_reset != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":2756
 * 
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":2755
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":2758
 *             self.reset()
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_12 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 2758, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_12, __pyx_v_length, __pyx_v_cache);

  /* "pyrosm_proto.pyx":2760
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  __pyx_t_9 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "pyrosm_proto.pyx":2761
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message")             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s_Truncated_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Truncated_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2761, __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, 2761, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2760
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  }

  /* "pyrosm_proto.pyx":2763
 *             raise DecodeError("Truncated message")
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2765
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  __pyx_t_9 = (__pyx_v_cache != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":2766
 * 
 *         if cache:
 *             self._cached_serialization = data             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) __PYX_ERR(0, 2766, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":2765
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  }

  /* "pyrosm_proto.pyx":2768
 *             self._cached_serialization = data
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2737
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_24ParseFromString[] = "\n        Populate the message class from a string of protobuf encoded binary data.\n\n        Params:\n            data (bytes): a string of binary data\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n            cache (bool): optional - whether to cache serialized data\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_v_reset;
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,&__pyx_n_s_cache,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromString") < 0)) __PYX_ERR(0, 2737, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    if (values[2]) {
      __pyx_v_reset = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2737, __pyx_L3_error)
    } else {
      __pyx_v_reset = ((int)1);
    }
    if (values[3]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2737, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromString", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2737, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_24ParseFromString(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset, __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_24ParseFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_ParseFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.reset = __pyx_v_reset;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_PrimitiveBlock->ParseFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2737, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2771
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FromString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_26FromString(((PyTypeObject*)__pyx_v_cls), ((PyObject *)__pyx_v_s));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("FromString", 0);

  /* "pyrosm_proto.pyx":2772
 *     @classmethod
 *     def FromString(cls, s):
 *         message = cls()             # <<<<<<<<<<<<<<
 *         message.MergeFromString(s)
 *         return message
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2773
 *     def FromString(cls, s):
 *         message = cls()
 *         message.MergeFromString(s)             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2773, __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;

  /* "pyrosm_proto.pyx":2774
 *         message = cls()
 *         message.MergeFromString(s)
 *         return message             # <<<<<<<<<<<<<<
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2771
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.FromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2776
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # stringtable
 */

static void __pyx_f_12pyrosm_proto_14PrimitiveBlock__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_cache) {
  PyObject *__pyx_v_stringtable_buf = 0;
  struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_primitivegroup_elt = 0;
  PyObject *__pyx_v_primitivegroup_elt_buf = 0;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  __Pyx_RefNannySetupContext("_protobuf_serialize", 0);
  __Pyx_INCREF(__pyx_v_buf);

  /* "pyrosm_proto.pyx":2780
 *         # stringtable
 *         cdef bytearray stringtable_buf
 *         if self._stringtable is not None and self._stringtable._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             if self._stringtable._cached_serialization is not None:
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_stringtable) != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_self->_stringtable->_is_present_in_parent != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":2781
 *         cdef bytearray stringtable_buf
 *         if self._stringtable is not None and self._stringtable._is_present_in_parent:
 *             set_varint64(10, buf)             # <<<<<<<<<<<<<<
 *             if self._stringtable._cached_serialization is not None:
 *                 set_varint64(len(self._stringtable._cached_serialization), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(10, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2782
 *         if self._stringtable is not None and self._stringtable._is_present_in_parent:
 *             set_varint64(10, buf)
 *             if self._stringtable._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(self._stringtable._cached_serialization), buf)
 *                 buf += self._stringtable._cached_serialization
 */
    __pyx_t_1 = (__pyx_v_self->_stringtable->_cached_serialization != ((PyObject*)Py_None));
    __pyx_t_3 = (__pyx_t_1 != 0);
    if (__pyx_t_3) {

      /* "pyrosm_proto.pyx":2783
 *             set_varint64(10, buf)
 *             if self._stringtable._cached_serialization is not None:
 *                 set_varint64(len(self._stringtable._cached_serialization), buf)             # <<<<<<<<<<<<<<
 *                 buf += self._stringtable._cached_serialization
 *             else:
 */
      __pyx_t_4 = __pyx_v_self->_stringtable->_cached_serialization;
      __Pyx_INCREF(__pyx_t_4);
      if (unlikely(__pyx_t_4 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(0, 2783, __pyx_L1_error)
      }
      __pyx_t_5 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2783, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_5, __pyx_v_buf));

      /* "pyrosm_proto.pyx":2784
 *             if self._stringtable._cached_serialization is not None:
 *                 set_varint64(len(self._stringtable._cached_serialization), buf)
 *                 buf += self._stringtable._cached_serialization             # <<<<<<<<<<<<<<
 *             else:
 *                 stringtable_buf = bytearray()
 */
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_self->_stringtable->_cached_serialization); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2784, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":2782
 *         if self._stringtable is not None and self._stringtable._is_present_in_parent:
 *             set_varint64(10, buf)
 *             if self._stringtable._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(self._stringtable._cached_serialization), buf)
 *                 buf += self._stringtable._cached_serialization
 */
      goto __pyx_L6;
    }

    /* "pyrosm_proto.pyx":2786
 *                 buf += self._stringtable._cached_serialization
 *             else:
 *                 stringtable_buf = bytearray()             # <<<<<<<<<<<<<<
 *                 self._stringtable._protobuf_serialize(stringtable_buf, cache)
 *                 set_varint64(len(stringtable_buf), buf)
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2786, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_stringtable_buf = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":2787
 *             else:
 *                 stringtable_buf = bytearray()
 *                 self._stringtable._protobuf_serialize(stringtable_buf, cache)             # <<<<<<<<<<<<<<
 *                 set_varint64(len(stringtable_buf), buf)
 *                 buf += stringtable_buf
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->_stringtable->__pyx_vtab)->_protobuf_serialize(__pyx_v_self->_stringtable, __pyx_v_stringtable_buf, __pyx_v_cache);

      /* "pyrosm_proto.pyx":2788
 *                 stringtable_buf = bytearray()
 *                 self._stringtable._protobuf_serialize(stringtable_buf, cache)
 *                 set_varint64(len(stringtable_buf), buf)             # <<<<<<<<<<<<<<
 *                 buf += stringtable_buf
 *                 if cache:
 */
      __pyx_t_5 = PyByteArray_GET_SIZE(__pyx_v_stringtable_buf); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2788, __pyx_L1_error)
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_5, __pyx_v_buf));

      /* "pyrosm_proto.pyx":2789
 *                 self._stringtable._protobuf_serialize(stringtable_buf, cache)
 *                 set_varint64(len(stringtable_buf), buf)
 *                 buf += stringtable_buf             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     self._stringtable._cached_serialization = bytes(stringtable_buf)
 */
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_stringtable_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":2790
 *                 set_varint64(len(stringtable_buf), buf)
 *                 buf += stringtable_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._stringtable._cached_serialization = bytes(stringtable_buf)
 *         # primitivegroup
 */
      __pyx_t_3 = (__pyx_v_cache != 0);
      if (__pyx_t_3) {

        /* "pyrosm_proto.pyx":2791
 *                 buf += stringtable_buf
 *                 if cache:
 *                     self._stringtable._cached_serialization = bytes(stringtable_buf)             # <<<<<<<<<<<<<<
 *         # primitivegroup
 *         cdef PrimitiveGroup primitivegroup_elt
 */
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_stringtable_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2791, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_self->_stringtable->_cached_serialization);
        __Pyx_DECREF(__pyx_v_self->_stringtable->_cached_serialization);
        __pyx_v_self->_stringtable->_cached_serialization = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyrosm_proto.pyx":2790
 *                 set_varint64(len(stringtable_buf), buf)
 *                 buf += stringtable_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._stringtable._cached_serialization = bytes(stringtable_buf)
 *         # primitivegroup
 */
      }
    }
    __pyx_L6:;

    /* "pyrosm_proto.pyx":2780
 *         # stringtable
 *         cdef bytearray stringtable_buf
 *         if self._stringtable is not None and self._stringtable._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             if self._stringtable._cached_serialization is not None:
 */
  }

  /* "pyrosm_proto.pyx":2795
 *         cdef PrimitiveGroup primitivegroup_elt
 *         cdef bytearray primitivegroup_elt_buf
 *         for primitivegroup_elt in self._primitivegroup:             # <<<<<<<<<<<<<<
 *             set_varint64(18, buf)
 *             if primitivegroup_elt._cached_serialization is not None:
 */
  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_primitivegroup))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_primitivegroup))) {
    __pyx_t_4 = ((PyObject *)__pyx_v_self->_primitivegroup); __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(((PyObject *)__pyx_v_self->_primitivegroup)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2795, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2795, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2795, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2795, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2795, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2795, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_12pyrosm_proto_PrimitiveGroup))))) __PYX_ERR(0, 2795, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_primitivegroup_elt, ((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_t_7));
    __pyx_t_7 = 0;

    /* "pyrosm_proto.pyx":2796
 *         cdef bytearray primitivegroup_elt_buf
 *         for primitivegroup_elt in self._primitivegroup:
 *             set_varint64(18, buf)             # <<<<<<<<<<<<<<
 *             if primitivegroup_elt._cached_serialization is not None:
 *                 set_varint64(len(primitivegroup_elt._cached_serialization), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(18, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2797
 *         for primitivegroup_elt in self._primitivegroup:
 *             set_varint64(18, buf)
 *             if primitivegroup_elt._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(primitivegroup_elt._cached_serialization), buf)
 *                 buf += primitivegroup_elt._cached_serialization
 */
    __pyx_t_3 = (__pyx_v_primitivegroup_elt->_cached_serialization != ((PyObject*)Py_None));
    __pyx_t_1 = (__pyx_t_3 != 0);
    if (__pyx_t_1) {

      /* "pyrosm_proto.pyx":2798
 *             set_varint64(18, buf)
 *             if primitivegroup_elt._cached_serialization is not None:
 *                 set_varint64(len(primitivegroup_elt._cached_serialization), buf)             # <<<<<<<<<<<<<<
 *                 buf += primitivegroup_elt._cached_serialization
 *             else:
 */
      __pyx_t_7 = __pyx_v_primitivegroup_elt->_cached_serialization;
      __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, 2798, __pyx_L1_error)
      }
      __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2798, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_8, __pyx_v_buf));

      /* "pyrosm_proto.pyx":2799
 *             if primitivegroup_elt._cached_serialization is not None:
 *                 set_varint64(len(primitivegroup_elt._cached_serialization), buf)
 *                 buf += primitivegroup_elt._cached_serialization             # <<<<<<<<<<<<<<
 *             else:
 *                 primitivegroup_elt_buf = bytearray()
 */
      __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_primitivegroup_elt->_cached_serialization); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2799, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":2797
 *         for primitivegroup_elt in self._primitivegroup:
 *             set_varint64(18, buf)
 *             if primitivegroup_elt._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(primitivegroup_elt._cached_serialization), buf)
 *                 buf += primitivegroup_elt._cached_serialization
 */
      goto __pyx_L10;
    }

    /* "pyrosm_proto.pyx":2801
 *                 buf += primitivegroup_elt._cached_serialization
 *             else:
 *                 primitivegroup_elt_buf = bytearray()             # <<<<<<<<<<<<<<
 *                 primitivegroup_elt._protobuf_serialize(primitivegroup_elt_buf, cache)
 *                 set_varint64(len(primitivegroup_elt_buf), buf)
 */
    /*else*/ {
      __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2801, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF_SET(__pyx_v_primitivegroup_elt_buf, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":2802
 *             else:
 *                 primitivegroup_elt_buf = bytearray()
 *                 primitivegroup_elt._protobuf_serialize(primitivegroup_elt_buf, cache)             # <<<<<<<<<<<<<<
 *                 set_varint64(len(primitivegroup_elt_buf), buf)
 *                 buf += primitivegroup_elt_buf
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_primitivegroup_elt->__pyx_vtab)->_protobuf_serialize(__pyx_v_primitivegroup_elt, __pyx_v_primitivegroup_elt_buf, __pyx_v_cache);

      /* "pyrosm_proto.pyx":2803
 *                 primitivegroup_elt_buf = bytearray()
 *                 primitivegroup_elt._protobuf_serialize(primitivegroup_elt_buf, cache)
 *                 set_varint64(len(primitivegroup_elt_buf), buf)             # <<<<<<<<<<<<<<
 *                 buf += primitivegroup_elt_buf
 *                 if cache:
 */
      __pyx_t_8 = PyByteArray_GET_SIZE(__pyx_v_primitivegroup_elt_buf); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2803, __pyx_L1_error)
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_8, __pyx_v_buf));

      /* "pyrosm_proto.pyx":2804
 *                 primitivegroup_elt._protobuf_serialize(primitivegroup_elt_buf, cache)
 *                 set_varint64(len(primitivegroup_elt_buf), buf)
 *                 buf += primitivegroup_elt_buf             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     primitivegroup_elt._cached_serialization = bytes(primitivegroup_elt_buf)
 */
      __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_primitivegroup_elt_buf); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2804, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":2805
 *                 set_varint64(len(primitivegroup_elt_buf), buf)
 *                 buf += primitivegroup_elt_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     primitivegroup_elt._cached_serialization = bytes(primitivegroup_elt_buf)
 *         # granularity
 */
      __pyx_t_1 = (__pyx_v_cache != 0);
      if (__pyx_t_1) {

        /* "pyrosm_proto.pyx":2806
 *                 buf += primitivegroup_elt_buf
 *                 if cache:
 *                     primitivegroup_elt._cached_serialization = bytes(primitivegroup_elt_buf)             # <<<<<<<<<<<<<<
 *         # granularity
 *         if self.__field_bitmap0 & 65536 == 65536:
 */
        __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_primitivegroup_elt_buf); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2806, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_v_primitivegroup_elt->_cached_serialization);
        __Pyx_DECREF(__pyx_v_primitivegroup_elt->_cached_serialization);
        __pyx_v_primitivegroup_elt->_cached_serialization = ((PyObject*)__pyx_t_7);
        __pyx_t_7 = 0;

        /* "pyrosm_proto.pyx":2805
 *                 set_varint64(len(primitivegroup_elt_buf), buf)
 *                 buf += primitivegroup_elt_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     primitivegroup_elt._cached_serialization = bytes(primitivegroup_elt_buf)
 *         # granularity
 */
      }
    }
    __pyx_L10:;

    /* "pyrosm_proto.pyx":2795
 *         cdef PrimitiveGroup primitivegroup_elt
 *         cdef bytearray primitivegroup_elt_buf
 *         for primitivegroup_elt in self._primitivegroup:             # <<<<<<<<<<<<<<
 *             set_varint64(18, buf)
 *             if primitivegroup_elt._cached_serialization is not None:
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":2808
 *                     primitivegroup_elt._cached_serialization = bytes(primitivegroup_elt_buf)
 *         # granularity
 *         if self.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             set_varint64(136, buf)
 *             set_varint32(self._granularity, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x10000) == 0x10000) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":2809
 *         # granularity
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             set_varint64(136, buf)             # <<<<<<<<<<<<<<
 *             set_varint32(self._granularity, buf)
 *         # date_granularity
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(0x88, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2810
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             set_varint64(136, buf)
 *             set_varint32(self._granularity, buf)             # <<<<<<<<<<<<<<
 *         # date_granularity
 *         if self.__field_bitmap0 & 131072 == 131072:
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_self->_granularity, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2808
 *                     primitivegroup_elt._cached_serialization = bytes(primitivegroup_elt_buf)
 *         # granularity
 *         if self.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             set_varint64(136, buf)
 *             set_varint32(self._granularity, buf)
 */
  }

  /* "pyrosm_proto.pyx":2812
 *             set_varint32(self._granularity, buf)
 *         # date_granularity
 *         if self.__field_bitmap0 & 131072 == 131072:             # <<<<<<<<<<<<<<
 *             set_varint64(144, buf)
 *             set_varint32(self._date_granularity, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x20000) == 0x20000) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":2813
 *         # date_granularity
 *         if self.__field_bitmap0 & 131072 == 131072:
 *             set_varint64(144, buf)             # <<<<<<<<<<<<<<
 *             set_varint32(self._date_granularity, buf)
 *         # lat_offset
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(0x90, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2814
 *         if self.__field_bitmap0 & 131072 == 131072:
 *             set_varint64(144, buf)
 *             set_varint32(self._date_granularity, buf)             # <<<<<<<<<<<<<<
 *         # lat_offset
 *         if self.__field_bitmap0 & 262144 == 262144:
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_self->_date_granularity, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2812
 *             set_varint32(self._granularity, buf)
 *         # date_granularity
 *         if self.__field_bitmap0 & 131072 == 131072:             # <<<<<<<<<<<<<<
 *             set_varint64(144, buf)
 *             set_varint32(self._date_granularity, buf)
 */
  }

  /* "pyrosm_proto.pyx":2816
 *             set_varint32(self._date_granularity, buf)
 *         # lat_offset
 *         if self.__field_bitmap0 & 262144 == 262144:             # <<<<<<<<<<<<<<
 *             set_varint64(152, buf)
 *             set_varint64(self._lat_offset, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x40000) == 0x40000) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":2817
 *         # lat_offset
 *         if self.__field_bitmap0 & 262144 == 262144:
 *             set_varint64(152, buf)             # <<<<<<<<<<<<<<
 *             set_varint64(self._lat_offset, buf)
 *         # lon_offset
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(0x98, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2818
 *         if self.__field_bitmap0 & 262144 == 262144:
 *             set_varint64(152, buf)
 *             set_varint64(self._lat_offset, buf)             # <<<<<<<<<<<<<<
 *         # lon_offset
 *         if self.__field_bitmap0 & 524288 == 524288:
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_v_self->_lat_offset, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2816
 *             set_varint32(self._date_granularity, buf)
 *         # lat_offset
 *         if self.__field_bitmap0 & 262144 == 262144:             # <<<<<<<<<<<<<<
 *             set_varint64(152, buf)
 *             set_varint64(self._lat_offset, buf)
 */
  }

  /* "pyrosm_proto.pyx":2820
 *             set_varint64(self._lat_offset, buf)
 *         # lon_offset
 *         if self.__field_bitmap0 & 524288 == 524288:             # <<<<<<<<<<<<<<
 *             set_varint64(160, buf)
 *             set_varint64(self._lon_offset, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x80000) == 0x80000) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":2821
 *         # lon_offset
 *         if self.__field_bitmap0 & 524288 == 524288:
 *             set_varint64(160, buf)             # <<<<<<<<<<<<<<
 *             set_varint64(self._lon_offset, buf)
 * 
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(0xA0, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2822
 *         if self.__field_bitmap0 & 524288 == 524288:
 *             set_varint64(160, buf)
 *             set_varint64(self._lon_offset, buf)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void _Modified(self):
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_v_self->_lon_offset, __pyx_v_buf));

    /* "pyrosm_proto.pyx":2820
 *             set_varint64(self._lat_offset, buf)
 *         # lon_offset
 *         if self.__field_bitmap0 & 524288 == 524288:             # <<<<<<<<<<<<<<
 *             set_varint64(160, buf)
 *             set_varint64(self._lon_offset, buf)
 */
  }

  /* "pyrosm_proto.pyx":2776
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # stringtable
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_WriteUnraisable("pyrosm_proto.PrimitiveBlock._protobuf_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stringtable_buf);
  __Pyx_XDECREF((PyObject *)__pyx_v_primitivegroup_elt);
  __Pyx_XDECREF(__pyx_v_primitivegroup_elt_buf);
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_RefNannyFinishContext();
}

/* "pyrosm_proto.pyx":2824
 *             set_varint64(self._lon_offset, buf)
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveBlock__Modified(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Modified); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_29_Modified)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2824, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2825
 * 
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":2826
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()             # <<<<<<<<<<<<<<
 *         self._cached_serialization = None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_listener), __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2826, __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;

  /* "pyrosm_proto.pyx":2827
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
  __Pyx_DECREF(__pyx_v_self->_cached_serialization);
  __pyx_v_self->_cached_serialization = ((PyObject*)Py_None);

  /* "pyrosm_proto.pyx":2824
 *             set_varint64(self._lon_offset, buf)
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.PrimitiveBlock._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_Modified (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_28_Modified(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_28_Modified(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_14PrimitiveBlock__Modified(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2824, __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("pyrosm_proto.PrimitiveBlock._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2829
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_14PrimitiveBlock_SerializeToString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_SerializeToString *__pyx_optional_args) {
  int __pyx_v_cache = ((int)0);
  int __pyx_v_i;
  struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_primitivegroup_msg = 0;
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_out = 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;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cache = __pyx_optional_args->cache;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_31SerializeToString)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2829, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2829, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 2829, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2840
 * 
 * 
 *         if self._stringtable is None or not self._stringtable.IsInitialized():             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'stringtable' not initialized and does not have default")
 *         for i in range(len(self._primitivegroup)):
 */
  __pyx_t_7 = (((PyObject *)__pyx_v_self->_stringtable) == Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (!__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->_stringtable->__pyx_vtab)->IsInitialized(__pyx_v_self->_stringtable, 0) != 0)) != 0);
  __pyx_t_6 = __pyx_t_8;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":2841
 * 
 *         if self._stringtable is None or not self._stringtable.IsInitialized():
 *             raise Exception("required field 'stringtable' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         for i in range(len(self._primitivegroup)):
 *             primitivegroup_msg = <PrimitiveGroup>self._primitivegroup[i]
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2841, __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, 2841, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2840
 * 
 * 
 *         if self._stringtable is None or not self._stringtable.IsInitialized():             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'stringtable' not initialized and does not have default")
 *         for i in range(len(self._primitivegroup)):
 */
  }

  /* "pyrosm_proto.pyx":2842
 *         if self._stringtable is None or not self._stringtable.IsInitialized():
 *             raise Exception("required field 'stringtable' not initialized and does not have default")
 *         for i in range(len(self._primitivegroup)):             # <<<<<<<<<<<<<<
 *             primitivegroup_msg = <PrimitiveGroup>self._primitivegroup[i]
 *             if not primitivegroup_msg.IsInitialized():
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_primitivegroup);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2842, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pyrosm_proto.pyx":2843
 *             raise Exception("required field 'stringtable' not initialized and does not have default")
 *         for i in range(len(self._primitivegroup)):
 *             primitivegroup_msg = <PrimitiveGroup>self._primitivegroup[i]             # <<<<<<<<<<<<<<
 *             if not primitivegroup_msg.IsInitialized():
 *                 raise Exception("Message PrimitiveBlock is missing required field: primitivegroup[%d]" % i)
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_primitivegroup), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_primitivegroup_msg, ((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":2844
 *         for i in range(len(self._primitivegroup)):
 *             primitivegroup_msg = <PrimitiveGroup>self._primitivegroup[i]
 *             if not primitivegroup_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 raise Exception("Message PrimitiveBlock is missing required field: primitivegroup[%d]" % i)
 * 
 */
    __pyx_t_6 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_primitivegroup_msg->__pyx_vtab)->IsInitialized(__pyx_v_primitivegroup_msg, 0) != 0)) != 0);
    if (unlikely(__pyx_t_6)) {

      /* "pyrosm_proto.pyx":2845
 *             primitivegroup_msg = <PrimitiveGroup>self._primitivegroup[i]
 *             if not primitivegroup_msg.IsInitialized():
 *                 raise Exception("Message PrimitiveBlock is missing required field: primitivegroup[%d]" % i)             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2845, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Message_PrimitiveBlock_is_missin, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2845, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2845, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 2845, __pyx_L1_error)

      /* "pyrosm_proto.pyx":2844
 *         for i in range(len(self._primitivegroup)):
 *             primitivegroup_msg = <PrimitiveGroup>self._primitivegroup[i]
 *             if not primitivegroup_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 raise Exception("Message PrimitiveBlock is missing required field: primitivegroup[%d]" % i)
 * 
 */
    }
  }

  /* "pyrosm_proto.pyx":2847
 *                 raise Exception("Message PrimitiveBlock is missing required field: primitivegroup[%d]" % i)
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_6 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_8 = (__pyx_t_6 != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":2848
 * 
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2847
 *                 raise Exception("Message PrimitiveBlock is missing required field: primitivegroup[%d]" % i)
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":2850
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_buf = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyrosm_proto.pyx":2851
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)             # <<<<<<<<<<<<<<
 *         cdef bytes out = bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, __pyx_v_cache);

  /* "pyrosm_proto.pyx":2852
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyrosm_proto.pyx":2854
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  __pyx_t_8 = (__pyx_v_cache != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":2855
 * 
 *         if cache:
 *             self._cached_serialization = out             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = __pyx_v_out;

    /* "pyrosm_proto.pyx":2854
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  }

  /* "pyrosm_proto.pyx":2857
 *             self._cached_serialization = out
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializePartialToString(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2829
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.PrimitiveBlock.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_primitivegroup_msg);
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_30SerializeToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cache,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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SerializeToString") < 0)) __PYX_ERR(0, 2829, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2829, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("SerializeToString", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2829, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_30SerializeToString(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_30SerializeToString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_SerializeToString __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_PrimitiveBlock->SerializeToString(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2829, __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("pyrosm_proto.PrimitiveBlock.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2859
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_14PrimitiveBlock_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_buf = 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;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_33SerializePartialToString)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2859, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 2859, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":2866
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_5 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":2867
 *         """
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":2866
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":2869
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2870
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)             # <<<<<<<<<<<<<<
 *         return bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, 0);

  /* "pyrosm_proto.pyx":2871
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *     def SetInParent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2859
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.PrimitiveBlock.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_32SerializePartialToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_32SerializePartialToString(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_14PrimitiveBlock_SerializePartialToString(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2859, __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("pyrosm_proto.PrimitiveBlock.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2873
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_34SetInParent[] = "\n        Mark this an present in the parent.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_34SetInParent(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_34SetInParent(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent", 0);

  /* "pyrosm_proto.pyx":2877
 *         Mark this an present in the parent.
 *         """
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2873
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2879
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_36ParseFromJson[] = "\n        Populate the message class from a json string.\n\n        Params:\n            data (str): a json string\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromJson (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromJson") < 0)) __PYX_ERR(0, 2879, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    __pyx_v_reset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromJson", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2879, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_36ParseFromJson(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("ParseFromJson", 0);
  __Pyx_INCREF(__pyx_v_size);

  /* "pyrosm_proto.pyx":2888
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":2889
 *         """
 *         if size is None:
 *             size = len(data)             # <<<<<<<<<<<<<<
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2889, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":2888
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  }

  /* "pyrosm_proto.pyx":2890
 *         if size is None:
 *             size = len(data)
 *         d = json.loads(data[:size])             # <<<<<<<<<<<<<<
 *         self.ParseFromDict(d, reset)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_json); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_d = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":2891
 *             size = len(data)
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToJson(self, **kwargs):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2891, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2891, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2891, __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_d);
    __Pyx_GIVEREF(__pyx_v_d);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_d);
    __Pyx_INCREF(__pyx_v_reset);
    __Pyx_GIVEREF(__pyx_v_reset);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_reset);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":2879
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2893
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_38SerializeToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializeToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializeToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_38SerializeToJson(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializeToJson", 0);

  /* "pyrosm_proto.pyx":2900
 *             str: a json formatted string
 *         """
 *         d = self.SerializeToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2901
 *         """
 *         d = self.SerializeToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToJson(self, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2893
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.SerializeToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2903
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_40SerializePartialToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializePartialToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializePartialToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_40SerializePartialToJson(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToJson", 0);

  /* "pyrosm_proto.pyx":2910
 *             str: a json formatted string
 *         """
 *         d = self.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2911
 *         """
 *         d = self.SerializePartialToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromDict(self, d, reset=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2903
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.SerializePartialToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2913
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_42ParseFromDict[] = "\n        Populate the message class from a Python dictionary.\n\n        Params:\n            d (dict): a Python dictionary representing the message\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,&__pyx_n_s_reset,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 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_reset);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromDict") < 0)) __PYX_ERR(0, 2913, __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_d = values[0];
    __pyx_v_reset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromDict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2913, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_42ParseFromDict(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), __pyx_v_d, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_primitivegroup_dict = NULL;
  struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_primitivegroup_elt = 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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromDict", 0);

  /* "pyrosm_proto.pyx":2921
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reset); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2921, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":2922
 *         """
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         assert type(d) == dict
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":2921
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":2924
 *             self.reset()
 * 
 *         assert type(d) == dict             # <<<<<<<<<<<<<<
 *         try:
 *             self.stringtable.ParseFromDict(d["stringtable"])
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_d)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2924, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2924, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 2924, __pyx_L1_error)
    }
  }
  #endif

  /* "pyrosm_proto.pyx":2925
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.stringtable.ParseFromDict(d["stringtable"])
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":2926
 *         assert type(d) == dict
 *         try:
 *             self.stringtable.ParseFromDict(d["stringtable"])             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_stringtable); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2926, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2926, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_stringtable); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2926, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2926, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":2925
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.stringtable.ParseFromDict(d["stringtable"])
 *         except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrosm_proto.pyx":2927
 *         try:
 *             self.stringtable.ParseFromDict(d["stringtable"])
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":2925
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.stringtable.ParseFromDict(d["stringtable"])
 *         except KeyError:
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":2929
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             for primitivegroup_dict in d["primitivegroup"]:
 *                 primitivegroup_elt = PrimitiveGroup()
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":2930
 *             pass
 *         try:
 *             for primitivegroup_dict in d["primitivegroup"]:             # <<<<<<<<<<<<<<
 *                 primitivegroup_elt = PrimitiveGroup()
 *                 primitivegroup_elt.ParseFromDict(primitivegroup_dict)
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_primitivegroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2930, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
        __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2930, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2930, __pyx_L10_error)
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      for (;;) {
        if (likely(!__pyx_t_11)) {
          if (likely(PyList_CheckExact(__pyx_t_7))) {
            if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2930, __pyx_L10_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2930, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2930, __pyx_L10_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2930, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_11(__pyx_t_7);
          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, 2930, __pyx_L10_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_v_primitivegroup_dict, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyrosm_proto.pyx":2931
 *         try:
 *             for primitivegroup_dict in d["primitivegroup"]:
 *                 primitivegroup_elt = PrimitiveGroup()             # <<<<<<<<<<<<<<
 *                 primitivegroup_elt.ParseFromDict(primitivegroup_dict)
 *                 self.primitivegroup.append(primitivegroup_elt)
 */
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_12pyrosm_proto_PrimitiveGroup)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2931, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_primitivegroup_elt, ((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyrosm_proto.pyx":2932
 *             for primitivegroup_dict in d["primitivegroup"]:
 *                 primitivegroup_elt = PrimitiveGroup()
 *                 primitivegroup_elt.ParseFromDict(primitivegroup_dict)             # <<<<<<<<<<<<<<
 *                 self.primitivegroup.append(primitivegroup_elt)
 *         except KeyError:
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_primitivegroup_elt), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2932, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_v_primitivegroup_dict) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_primitivegroup_dict);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2932, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyrosm_proto.pyx":2933
 *                 primitivegroup_elt = PrimitiveGroup()
 *                 primitivegroup_elt.ParseFromDict(primitivegroup_dict)
 *                 self.primitivegroup.append(primitivegroup_elt)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_primitivegroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2933, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_2, ((PyObject *)__pyx_v_primitivegroup_elt)); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2933, __pyx_L10_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyrosm_proto.pyx":2930
 *             pass
 *         try:
 *             for primitivegroup_dict in d["primitivegroup"]:             # <<<<<<<<<<<<<<
 *                 primitivegroup_elt = PrimitiveGroup()
 *                 primitivegroup_elt.ParseFromDict(primitivegroup_dict)
 */
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":2929
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             for primitivegroup_dict in d["primitivegroup"]:
 *                 primitivegroup_elt = PrimitiveGroup()
 */
    }
    __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_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrosm_proto.pyx":2934
 *                 primitivegroup_elt.ParseFromDict(primitivegroup_dict)
 *                 self.primitivegroup.append(primitivegroup_elt)
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    goto __pyx_L12_except_error;
    __pyx_L12_except_error:;

    /* "pyrosm_proto.pyx":2929
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             for primitivegroup_dict in d["primitivegroup"]:
 *                 primitivegroup_elt = PrimitiveGroup()
 */
    __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:;
  }

  /* "pyrosm_proto.pyx":2936
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.granularity = d["granularity"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":2937
 *             pass
 *         try:
 *             self.granularity = d["granularity"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_granularity); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2937, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_granularity, __pyx_t_7) < 0) __PYX_ERR(0, 2937, __pyx_L18_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":2936
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.granularity = d["granularity"]
 *         except KeyError:
 */
    }
    __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_L23_try_end;
    __pyx_L18_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrosm_proto.pyx":2938
 *         try:
 *             self.granularity = d["granularity"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L19_exception_handled;
    }
    goto __pyx_L20_except_error;
    __pyx_L20_except_error:;

    /* "pyrosm_proto.pyx":2936
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.granularity = d["granularity"]
 *         except KeyError:
 */
    __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_L19_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_L23_try_end:;
  }

  /* "pyrosm_proto.pyx":2940
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.date_granularity = d["date_granularity"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":2941
 *             pass
 *         try:
 *             self.date_granularity = d["date_granularity"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_date_granularity); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2941, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_date_granularity, __pyx_t_7) < 0) __PYX_ERR(0, 2941, __pyx_L24_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":2940
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.date_granularity = d["date_granularity"]
 *         except KeyError:
 */
    }
    __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_L29_try_end;
    __pyx_L24_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrosm_proto.pyx":2942
 *         try:
 *             self.date_granularity = d["date_granularity"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L25_exception_handled;
    }
    goto __pyx_L26_except_error;
    __pyx_L26_except_error:;

    /* "pyrosm_proto.pyx":2940
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.date_granularity = d["date_granularity"]
 *         except KeyError:
 */
    __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_L25_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_L29_try_end:;
  }

  /* "pyrosm_proto.pyx":2944
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lat_offset = d["lat_offset"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":2945
 *             pass
 *         try:
 *             self.lat_offset = d["lat_offset"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_lat_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2945, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lat_offset, __pyx_t_7) < 0) __PYX_ERR(0, 2945, __pyx_L30_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":2944
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lat_offset = d["lat_offset"]
 *         except KeyError:
 */
    }
    __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_L35_try_end;
    __pyx_L30_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrosm_proto.pyx":2946
 *         try:
 *             self.lat_offset = d["lat_offset"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L31_exception_handled;
    }
    goto __pyx_L32_except_error;
    __pyx_L32_except_error:;

    /* "pyrosm_proto.pyx":2944
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lat_offset = d["lat_offset"]
 *         except KeyError:
 */
    __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_L31_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_L35_try_end:;
  }

  /* "pyrosm_proto.pyx":2948
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lon_offset = d["lon_offset"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":2949
 *             pass
 *         try:
 *             self.lon_offset = d["lon_offset"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_lon_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2949, __pyx_L36_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lon_offset, __pyx_t_7) < 0) __PYX_ERR(0, 2949, __pyx_L36_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":2948
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lon_offset = d["lon_offset"]
 *         except KeyError:
 */
    }
    __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_L41_try_end;
    __pyx_L36_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrosm_proto.pyx":2950
 *         try:
 *             self.lon_offset = d["lon_offset"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L37_exception_handled;
    }
    goto __pyx_L38_except_error;
    __pyx_L38_except_error:;

    /* "pyrosm_proto.pyx":2948
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lon_offset = d["lon_offset"]
 *         except KeyError:
 */
    __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_L37_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_L41_try_end:;
  }

  /* "pyrosm_proto.pyx":2953
 *             pass
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":2955
 *         self._Modified()
 * 
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2913
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_primitivegroup_dict);
  __Pyx_XDECREF((PyObject *)__pyx_v_primitivegroup_elt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2957
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_44SerializeToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_44SerializeToDict(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_stringtable_dict = NULL;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("SerializeToDict", 0);

  /* "pyrosm_proto.pyx":2964
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         stringtable_dict = self.stringtable.SerializeToDict()
 *         if stringtable_dict != {}:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2965
 *         """
 *         out = {}
 *         stringtable_dict = self.stringtable.SerializeToDict()             # <<<<<<<<<<<<<<
 *         if stringtable_dict != {}:
 *             out["stringtable"] = stringtable_dict
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_stringtable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_stringtable_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2966
 *         out = {}
 *         stringtable_dict = self.stringtable.SerializeToDict()
 *         if stringtable_dict != {}:             # <<<<<<<<<<<<<<
 *             out["stringtable"] = stringtable_dict
 *         if len(self.primitivegroup) > 0:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_stringtable_dict, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2966, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2966, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":2967
 *         stringtable_dict = self.stringtable.SerializeToDict()
 *         if stringtable_dict != {}:
 *             out["stringtable"] = stringtable_dict             # <<<<<<<<<<<<<<
 *         if len(self.primitivegroup) > 0:
 *             out["primitivegroup"] = [m.SerializeToDict() for m in self.primitivegroup]
 */
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_stringtable, __pyx_v_stringtable_dict) < 0)) __PYX_ERR(0, 2967, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2966
 *         out = {}
 *         stringtable_dict = self.stringtable.SerializeToDict()
 *         if stringtable_dict != {}:             # <<<<<<<<<<<<<<
 *             out["stringtable"] = stringtable_dict
 *         if len(self.primitivegroup) > 0:
 */
  }

  /* "pyrosm_proto.pyx":2968
 *         if stringtable_dict != {}:
 *             out["stringtable"] = stringtable_dict
 *         if len(self.primitivegroup) > 0:             # <<<<<<<<<<<<<<
 *             out["primitivegroup"] = [m.SerializeToDict() for m in self.primitivegroup]
 *         if self.__field_bitmap0 & 65536 == 65536:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_primitivegroup); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2968, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((__pyx_t_5 > 0) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":2969
 *             out["stringtable"] = stringtable_dict
 *         if len(self.primitivegroup) > 0:
 *             out["primitivegroup"] = [m.SerializeToDict() for m in self.primitivegroup]             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["granularity"] = self.granularity
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2969, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_primitivegroup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2969, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2969, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2969, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2969, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2969, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2969, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2969, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_6(__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, 2969, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2969, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2969, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 2969, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_primitivegroup, __pyx_t_3) < 0)) __PYX_ERR(0, 2969, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":2968
 *         if stringtable_dict != {}:
 *             out["stringtable"] = stringtable_dict
 *         if len(self.primitivegroup) > 0:             # <<<<<<<<<<<<<<
 *             out["primitivegroup"] = [m.SerializeToDict() for m in self.primitivegroup]
 *         if self.__field_bitmap0 & 65536 == 65536:
 */
  }

  /* "pyrosm_proto.pyx":2970
 *         if len(self.primitivegroup) > 0:
 *             out["primitivegroup"] = [m.SerializeToDict() for m in self.primitivegroup]
 *         if self.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             out["granularity"] = self.granularity
 *         if self.__field_bitmap0 & 131072 == 131072:
 */
  __pyx_t_4 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x10000) == 0x10000) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":2971
 *             out["primitivegroup"] = [m.SerializeToDict() for m in self.primitivegroup]
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["granularity"] = self.granularity             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 131072 == 131072:
 *             out["date_granularity"] = self.date_granularity
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_granularity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_granularity, __pyx_t_3) < 0)) __PYX_ERR(0, 2971, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":2970
 *         if len(self.primitivegroup) > 0:
 *             out["primitivegroup"] = [m.SerializeToDict() for m in self.primitivegroup]
 *         if self.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             out["granularity"] = self.granularity
 *         if self.__field_bitmap0 & 131072 == 131072:
 */
  }

  /* "pyrosm_proto.pyx":2972
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["granularity"] = self.granularity
 *         if self.__field_bitmap0 & 131072 == 131072:             # <<<<<<<<<<<<<<
 *             out["date_granularity"] = self.date_granularity
 *         if self.__field_bitmap0 & 262144 == 262144:
 */
  __pyx_t_4 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x20000) == 0x20000) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":2973
 *             out["granularity"] = self.granularity
 *         if self.__field_bitmap0 & 131072 == 131072:
 *             out["date_granularity"] = self.date_granularity             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 262144 == 262144:
 *             out["lat_offset"] = self.lat_offset
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_date_granularity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_date_granularity, __pyx_t_3) < 0)) __PYX_ERR(0, 2973, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":2972
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["granularity"] = self.granularity
 *         if self.__field_bitmap0 & 131072 == 131072:             # <<<<<<<<<<<<<<
 *             out["date_granularity"] = self.date_granularity
 *         if self.__field_bitmap0 & 262144 == 262144:
 */
  }

  /* "pyrosm_proto.pyx":2974
 *         if self.__field_bitmap0 & 131072 == 131072:
 *             out["date_granularity"] = self.date_granularity
 *         if self.__field_bitmap0 & 262144 == 262144:             # <<<<<<<<<<<<<<
 *             out["lat_offset"] = self.lat_offset
 *         if self.__field_bitmap0 & 524288 == 524288:
 */
  __pyx_t_4 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x40000) == 0x40000) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":2975
 *             out["date_granularity"] = self.date_granularity
 *         if self.__field_bitmap0 & 262144 == 262144:
 *             out["lat_offset"] = self.lat_offset             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 524288 == 524288:
 *             out["lon_offset"] = self.lon_offset
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lat_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_lat_offset, __pyx_t_3) < 0)) __PYX_ERR(0, 2975, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":2974
 *         if self.__field_bitmap0 & 131072 == 131072:
 *             out["date_granularity"] = self.date_granularity
 *         if self.__field_bitmap0 & 262144 == 262144:             # <<<<<<<<<<<<<<
 *             out["lat_offset"] = self.lat_offset
 *         if self.__field_bitmap0 & 524288 == 524288:
 */
  }

  /* "pyrosm_proto.pyx":2976
 *         if self.__field_bitmap0 & 262144 == 262144:
 *             out["lat_offset"] = self.lat_offset
 *         if self.__field_bitmap0 & 524288 == 524288:             # <<<<<<<<<<<<<<
 *             out["lon_offset"] = self.lon_offset
 * 
 */
  __pyx_t_4 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x80000) == 0x80000) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":2977
 *             out["lat_offset"] = self.lat_offset
 *         if self.__field_bitmap0 & 524288 == 524288:
 *             out["lon_offset"] = self.lon_offset             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lon_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_lon_offset, __pyx_t_3) < 0)) __PYX_ERR(0, 2977, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":2976
 *         if self.__field_bitmap0 & 262144 == 262144:
 *             out["lat_offset"] = self.lat_offset
 *         if self.__field_bitmap0 & 524288 == 524288:             # <<<<<<<<<<<<<<
 *             out["lon_offset"] = self.lon_offset
 * 
 */
  }

  /* "pyrosm_proto.pyx":2979
 *             out["lon_offset"] = self.lon_offset
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2957
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.SerializeToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_stringtable_dict);
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":2981
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_46SerializePartialToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_46SerializePartialToDict(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_stringtable_dict = NULL;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToDict", 0);

  /* "pyrosm_proto.pyx":2988
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         stringtable_dict = self.stringtable.SerializePartialToDict()
 *         if stringtable_dict != {}:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2989
 *         """
 *         out = {}
 *         stringtable_dict = self.stringtable.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         if stringtable_dict != {}:
 *             out["stringtable"] = stringtable_dict
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_stringtable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_stringtable_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":2990
 *         out = {}
 *         stringtable_dict = self.stringtable.SerializePartialToDict()
 *         if stringtable_dict != {}:             # <<<<<<<<<<<<<<
 *             out["stringtable"] = stringtable_dict
 *         if len(self.primitivegroup) > 0:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_stringtable_dict, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2990, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2990, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":2991
 *         stringtable_dict = self.stringtable.SerializePartialToDict()
 *         if stringtable_dict != {}:
 *             out["stringtable"] = stringtable_dict             # <<<<<<<<<<<<<<
 *         if len(self.primitivegroup) > 0:
 *             out["primitivegroup"] = [m.SerializePartialToDict() for m in self.primitivegroup]
 */
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_stringtable, __pyx_v_stringtable_dict) < 0)) __PYX_ERR(0, 2991, __pyx_L1_error)

    /* "pyrosm_proto.pyx":2990
 *         out = {}
 *         stringtable_dict = self.stringtable.SerializePartialToDict()
 *         if stringtable_dict != {}:             # <<<<<<<<<<<<<<
 *             out["stringtable"] = stringtable_dict
 *         if len(self.primitivegroup) > 0:
 */
  }

  /* "pyrosm_proto.pyx":2992
 *         if stringtable_dict != {}:
 *             out["stringtable"] = stringtable_dict
 *         if len(self.primitivegroup) > 0:             # <<<<<<<<<<<<<<
 *             out["primitivegroup"] = [m.SerializePartialToDict() for m in self.primitivegroup]
 *         if self.__field_bitmap0 & 65536 == 65536:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_primitivegroup); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2992, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((__pyx_t_5 > 0) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":2993
 *             out["stringtable"] = stringtable_dict
 *         if len(self.primitivegroup) > 0:
 *             out["primitivegroup"] = [m.SerializePartialToDict() for m in self.primitivegroup]             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["granularity"] = self.granularity
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_primitivegroup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2993, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2993, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2993, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2993, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2993, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_6(__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, 2993, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 2993, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_primitivegroup, __pyx_t_3) < 0)) __PYX_ERR(0, 2993, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":2992
 *         if stringtable_dict != {}:
 *             out["stringtable"] = stringtable_dict
 *         if len(self.primitivegroup) > 0:             # <<<<<<<<<<<<<<
 *             out["primitivegroup"] = [m.SerializePartialToDict() for m in self.primitivegroup]
 *         if self.__field_bitmap0 & 65536 == 65536:
 */
  }

  /* "pyrosm_proto.pyx":2994
 *         if len(self.primitivegroup) > 0:
 *             out["primitivegroup"] = [m.SerializePartialToDict() for m in self.primitivegroup]
 *         if self.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             out["granularity"] = self.granularity
 *         if self.__field_bitmap0 & 131072 == 131072:
 */
  __pyx_t_4 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x10000) == 0x10000) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":2995
 *             out["primitivegroup"] = [m.SerializePartialToDict() for m in self.primitivegroup]
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["granularity"] = self.granularity             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 131072 == 131072:
 *             out["date_granularity"] = self.date_granularity
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_granularity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2995, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_granularity, __pyx_t_3) < 0)) __PYX_ERR(0, 2995, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":2994
 *         if len(self.primitivegroup) > 0:
 *             out["primitivegroup"] = [m.SerializePartialToDict() for m in self.primitivegroup]
 *         if self.__field_bitmap0 & 65536 == 65536:             # <<<<<<<<<<<<<<
 *             out["granularity"] = self.granularity
 *         if self.__field_bitmap0 & 131072 == 131072:
 */
  }

  /* "pyrosm_proto.pyx":2996
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["granularity"] = self.granularity
 *         if self.__field_bitmap0 & 131072 == 131072:             # <<<<<<<<<<<<<<
 *             out["date_granularity"] = self.date_granularity
 *         if self.__field_bitmap0 & 262144 == 262144:
 */
  __pyx_t_4 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x20000) == 0x20000) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":2997
 *             out["granularity"] = self.granularity
 *         if self.__field_bitmap0 & 131072 == 131072:
 *             out["date_granularity"] = self.date_granularity             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 262144 == 262144:
 *             out["lat_offset"] = self.lat_offset
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_date_granularity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_date_granularity, __pyx_t_3) < 0)) __PYX_ERR(0, 2997, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":2996
 *         if self.__field_bitmap0 & 65536 == 65536:
 *             out["granularity"] = self.granularity
 *         if self.__field_bitmap0 & 131072 == 131072:             # <<<<<<<<<<<<<<
 *             out["date_granularity"] = self.date_granularity
 *         if self.__field_bitmap0 & 262144 == 262144:
 */
  }

  /* "pyrosm_proto.pyx":2998
 *         if self.__field_bitmap0 & 131072 == 131072:
 *             out["date_granularity"] = self.date_granularity
 *         if self.__field_bitmap0 & 262144 == 262144:             # <<<<<<<<<<<<<<
 *             out["lat_offset"] = self.lat_offset
 *         if self.__field_bitmap0 & 524288 == 524288:
 */
  __pyx_t_4 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x40000) == 0x40000) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":2999
 *             out["date_granularity"] = self.date_granularity
 *         if self.__field_bitmap0 & 262144 == 262144:
 *             out["lat_offset"] = self.lat_offset             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 524288 == 524288:
 *             out["lon_offset"] = self.lon_offset
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lat_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_lat_offset, __pyx_t_3) < 0)) __PYX_ERR(0, 2999, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":2998
 *         if self.__field_bitmap0 & 131072 == 131072:
 *             out["date_granularity"] = self.date_granularity
 *         if self.__field_bitmap0 & 262144 == 262144:             # <<<<<<<<<<<<<<
 *             out["lat_offset"] = self.lat_offset
 *         if self.__field_bitmap0 & 524288 == 524288:
 */
  }

  /* "pyrosm_proto.pyx":3000
 *         if self.__field_bitmap0 & 262144 == 262144:
 *             out["lat_offset"] = self.lat_offset
 *         if self.__field_bitmap0 & 524288 == 524288:             # <<<<<<<<<<<<<<
 *             out["lon_offset"] = self.lon_offset
 * 
 */
  __pyx_t_4 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x80000) == 0x80000) != 0);
  if (__pyx_t_4) {

    /* "pyrosm_proto.pyx":3001
 *             out["lat_offset"] = self.lat_offset
 *         if self.__field_bitmap0 & 524288 == 524288:
 *             out["lon_offset"] = self.lon_offset             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lon_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_lon_offset, __pyx_t_3) < 0)) __PYX_ERR(0, 3001, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":3000
 *         if self.__field_bitmap0 & 262144 == 262144:
 *             out["lat_offset"] = self.lat_offset
 *         if self.__field_bitmap0 & 524288 == 524288:             # <<<<<<<<<<<<<<
 *             out["lon_offset"] = self.lon_offset
 * 
 */
  }

  /* "pyrosm_proto.pyx":3003
 *             out["lon_offset"] = self.lon_offset
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def Items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":2981
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.SerializePartialToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_stringtable_dict);
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveBlock_50generator16(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":3005
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_48Items[] = "\n        Iterator over the field names and values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_48Items(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_48Items(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_16_Items(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_16_Items, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 3005, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_14PrimitiveBlock_50generator16, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Items, __pyx_n_s_PrimitiveBlock_Items, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 3005, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveBlock_50generator16(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3005, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3012
 *             iterator
 *         """
 *         yield 'stringtable', self.stringtable             # <<<<<<<<<<<<<<
 *         yield 'primitivegroup', self.primitivegroup
 *         yield 'granularity', self.granularity
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_stringtable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_stringtable);
  __Pyx_GIVEREF(__pyx_n_s_stringtable);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_stringtable);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3012, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3013
 *         """
 *         yield 'stringtable', self.stringtable
 *         yield 'primitivegroup', self.primitivegroup             # <<<<<<<<<<<<<<
 *         yield 'granularity', self.granularity
 *         yield 'date_granularity', self.date_granularity
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_primitivegroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_primitivegroup);
  __Pyx_GIVEREF(__pyx_n_s_primitivegroup);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_primitivegroup);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3013, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3014
 *         yield 'stringtable', self.stringtable
 *         yield 'primitivegroup', self.primitivegroup
 *         yield 'granularity', self.granularity             # <<<<<<<<<<<<<<
 *         yield 'date_granularity', self.date_granularity
 *         yield 'lat_offset', self.lat_offset
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_granularity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_granularity);
  __Pyx_GIVEREF(__pyx_n_s_granularity);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_granularity);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3014, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3015
 *         yield 'primitivegroup', self.primitivegroup
 *         yield 'granularity', self.granularity
 *         yield 'date_granularity', self.date_granularity             # <<<<<<<<<<<<<<
 *         yield 'lat_offset', self.lat_offset
 *         yield 'lon_offset', self.lon_offset
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_date_granularity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_date_granularity);
  __Pyx_GIVEREF(__pyx_n_s_date_granularity);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_date_granularity);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3015, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3016
 *         yield 'granularity', self.granularity
 *         yield 'date_granularity', self.date_granularity
 *         yield 'lat_offset', self.lat_offset             # <<<<<<<<<<<<<<
 *         yield 'lon_offset', self.lon_offset
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lat_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_lat_offset);
  __Pyx_GIVEREF(__pyx_n_s_lat_offset);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_lat_offset);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3016, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3017
 *         yield 'date_granularity', self.date_granularity
 *         yield 'lat_offset', self.lat_offset
 *         yield 'lon_offset', self.lon_offset             # <<<<<<<<<<<<<<
 * 
 *     def Fields(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lon_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_lon_offset);
  __Pyx_GIVEREF(__pyx_n_s_lon_offset);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_lon_offset);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3017, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":3005
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveBlock_53generator17(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":3019
 *         yield 'lon_offset', self.lon_offset
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_51Fields[] = "\n        Iterator over the field names of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_51Fields(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_17_Fields(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_17_Fields, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 3019, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_14PrimitiveBlock_53generator17, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Fields, __pyx_n_s_PrimitiveBlock_Fields, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 3019, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveBlock_53generator17(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3019, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3026
 *             iterator
 *         """
 *         yield 'stringtable'             # <<<<<<<<<<<<<<
 *         yield 'primitivegroup'
 *         yield 'granularity'
 */
  __Pyx_INCREF(__pyx_n_s_stringtable);
  __pyx_r = __pyx_n_s_stringtable;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3026, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3027
 *         """
 *         yield 'stringtable'
 *         yield 'primitivegroup'             # <<<<<<<<<<<<<<
 *         yield 'granularity'
 *         yield 'date_granularity'
 */
  __Pyx_INCREF(__pyx_n_s_primitivegroup);
  __pyx_r = __pyx_n_s_primitivegroup;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3027, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3028
 *         yield 'stringtable'
 *         yield 'primitivegroup'
 *         yield 'granularity'             # <<<<<<<<<<<<<<
 *         yield 'date_granularity'
 *         yield 'lat_offset'
 */
  __Pyx_INCREF(__pyx_n_s_granularity);
  __pyx_r = __pyx_n_s_granularity;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3028, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3029
 *         yield 'primitivegroup'
 *         yield 'granularity'
 *         yield 'date_granularity'             # <<<<<<<<<<<<<<
 *         yield 'lat_offset'
 *         yield 'lon_offset'
 */
  __Pyx_INCREF(__pyx_n_s_date_granularity);
  __pyx_r = __pyx_n_s_date_granularity;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3029, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3030
 *         yield 'granularity'
 *         yield 'date_granularity'
 *         yield 'lat_offset'             # <<<<<<<<<<<<<<
 *         yield 'lon_offset'
 * 
 */
  __Pyx_INCREF(__pyx_n_s_lat_offset);
  __pyx_r = __pyx_n_s_lat_offset;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3030, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3031
 *         yield 'date_granularity'
 *         yield 'lat_offset'
 *         yield 'lon_offset'             # <<<<<<<<<<<<<<
 * 
 *     def Values(self):
 */
  __Pyx_INCREF(__pyx_n_s_lon_offset);
  __pyx_r = __pyx_n_s_lon_offset;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3031, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":3019
 *         yield 'lon_offset', self.lon_offset
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveBlock_56generator18(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":3033
 *         yield 'lon_offset'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_54Values[] = "\n        Iterator over the values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_54Values(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_54Values(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_18_Values(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_18_Values, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 3033, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_14PrimitiveBlock_56generator18, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Values, __pyx_n_s_PrimitiveBlock_Values, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 3033, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveBlock_56generator18(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3033, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3040
 *             iterator
 *         """
 *         yield self.stringtable             # <<<<<<<<<<<<<<
 *         yield self.primitivegroup
 *         yield self.granularity
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_stringtable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3040, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3041
 *         """
 *         yield self.stringtable
 *         yield self.primitivegroup             # <<<<<<<<<<<<<<
 *         yield self.granularity
 *         yield self.date_granularity
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_primitivegroup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3041, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3042
 *         yield self.stringtable
 *         yield self.primitivegroup
 *         yield self.granularity             # <<<<<<<<<<<<<<
 *         yield self.date_granularity
 *         yield self.lat_offset
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_granularity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3042, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3043
 *         yield self.primitivegroup
 *         yield self.granularity
 *         yield self.date_granularity             # <<<<<<<<<<<<<<
 *         yield self.lat_offset
 *         yield self.lon_offset
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_date_granularity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3043, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3044
 *         yield self.granularity
 *         yield self.date_granularity
 *         yield self.lat_offset             # <<<<<<<<<<<<<<
 *         yield self.lon_offset
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lat_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3044, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3045
 *         yield self.date_granularity
 *         yield self.lat_offset
 *         yield self.lon_offset             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lon_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3045, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":3033
 *         yield 'lon_offset'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveBlock_59generator19(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":3049
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveBlock_57Setters[] = "\n        Iterator over functions to set the fields in a message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_57Setters(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_57Setters(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_19_Setters(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_19_Setters, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 3049, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_14PrimitiveBlock_59generator19, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Setters, __pyx_n_s_PrimitiveBlock_Setters, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 3049, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.Setters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3056
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.stringtable = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_14PrimitiveBlock_7Setters_1setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_1setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":3057
 *         """
 *         def setter(value):
 *             self.stringtable = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3057, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_stringtable, __pyx_v_value) < 0) __PYX_ERR(0, 3057, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3056
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.stringtable = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3059
 *             self.stringtable = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.primitivegroup = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_14PrimitiveBlock_7Setters_3setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_3setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_2setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":3060
 *         yield setter
 *         def setter(value):
 *             self.primitivegroup = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3060, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_primitivegroup, __pyx_v_value) < 0) __PYX_ERR(0, 3060, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3059
 *             self.stringtable = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.primitivegroup = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3062
 *             self.primitivegroup = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.granularity = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_14PrimitiveBlock_7Setters_5setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_5setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_4setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":3063
 *         yield setter
 *         def setter(value):
 *             self.granularity = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3063, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_granularity, __pyx_v_value) < 0) __PYX_ERR(0, 3063, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3062
 *             self.primitivegroup = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.granularity = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3065
 *             self.granularity = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.date_granularity = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_14PrimitiveBlock_7Setters_7setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_7setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_6setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":3066
 *         yield setter
 *         def setter(value):
 *             self.date_granularity = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3066, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_date_granularity, __pyx_v_value) < 0) __PYX_ERR(0, 3066, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3065
 *             self.granularity = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.date_granularity = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3068
 *             self.date_granularity = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lat_offset = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_14PrimitiveBlock_7Setters_9setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_9setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_8setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":3069
 *         yield setter
 *         def setter(value):
 *             self.lat_offset = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3069, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lat_offset, __pyx_v_value) < 0) __PYX_ERR(0, 3069, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3068
 *             self.date_granularity = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lat_offset = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3071
 *             self.lat_offset = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lon_offset = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_11setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_14PrimitiveBlock_7Setters_11setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_11setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_7Setters_11setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_10setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_7Setters_10setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":3072
 *         yield setter
 *         def setter(value):
 *             self.lon_offset = value             # <<<<<<<<<<<<<<
 *         yield setter
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3072, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lon_offset, __pyx_v_value) < 0) __PYX_ERR(0, 3072, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3071
 *             self.lat_offset = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lon_offset = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3049
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveBlock_59generator19(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3049, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3056
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.stringtable = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_14PrimitiveBlock_7Setters_1setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_setter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3058
 *         def setter(value):
 *             self.stringtable = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.primitivegroup = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3058, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3059
 *             self.stringtable = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.primitivegroup = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_14PrimitiveBlock_7Setters_3setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3061
 *         def setter(value):
 *             self.primitivegroup = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.granularity = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3061, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3062
 *             self.primitivegroup = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.granularity = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_14PrimitiveBlock_7Setters_5setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3064
 *         def setter(value):
 *             self.granularity = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.date_granularity = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3064, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3065
 *             self.granularity = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.date_granularity = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_14PrimitiveBlock_7Setters_7setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3067
 *         def setter(value):
 *             self.date_granularity = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.lat_offset = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3067, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3068
 *             self.date_granularity = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lat_offset = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_14PrimitiveBlock_7Setters_9setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3070
 *         def setter(value):
 *             self.lat_offset = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.lon_offset = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3070, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3071
 *             self.lat_offset = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lon_offset = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_14PrimitiveBlock_7Setters_11setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3073
 *         def setter(value):
 *             self.lon_offset = value
 *         yield setter             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3073, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":3049
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

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

/* "pyrosm_proto.pxd":167
 *     cdef uint64_t __field_bitmap0
 * 
 *     cdef public bint _is_present_in_parent             # <<<<<<<<<<<<<<
 *     cdef bytes _cached_serialization
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_21_is_present_in_parent___get__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_present_in_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock._is_present_in_parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveBlock_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveBlock_21_is_present_in_parent_2__set__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveBlock_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 167, __pyx_L1_error)
  __pyx_v_self->_is_present_in_parent = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock._is_present_in_parent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_61__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_61__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_12pyrosm_proto_14PrimitiveBlock_60__reduce_cython__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_63__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveBlock_63__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_12pyrosm_proto_14PrimitiveBlock_62__setstate_cython__(((struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveBlock_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveBlock.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3080
 * cdef class PrimitiveGroup:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup___cinit__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup___cinit__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrosm_proto.pyx":3081
 * 
 *     def __cinit__(self):
 *         self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

  /* "pyrosm_proto.pyx":3080
 * cdef class PrimitiveGroup:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

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

/* "pyrosm_proto.pyx":3083
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._nodes is not None:
 */

/* Python wrapper */
static void __pyx_pw_12pyrosm_proto_14PrimitiveGroup_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrosm_proto_14PrimitiveGroup_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrosm_proto_14PrimitiveGroup_2__dealloc__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static void __pyx_pf_12pyrosm_proto_14PrimitiveGroup_2__dealloc__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrosm_proto.pyx":3085
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._nodes is not None:             # <<<<<<<<<<<<<<
 *             self._nodes._listener = <PyObject *>null_listener
 *         if self._dense is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_nodes) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3086
 *         # Remove any references to self from child messages or repeated fields
 *         if self._nodes is not None:
 *             self._nodes._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._dense is not None:
 *             self._dense._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_nodes->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3085
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._nodes is not None:             # <<<<<<<<<<<<<<
 *             self._nodes._listener = <PyObject *>null_listener
 *         if self._dense is not None:
 */
  }

  /* "pyrosm_proto.pyx":3087
 *         if self._nodes is not None:
 *             self._nodes._listener = <PyObject *>null_listener
 *         if self._dense is not None:             # <<<<<<<<<<<<<<
 *             self._dense._listener = <PyObject *>null_listener
 *         if self._ways is not None:
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_dense) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":3088
 *             self._nodes._listener = <PyObject *>null_listener
 *         if self._dense is not None:
 *             self._dense._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._ways is not None:
 *             self._ways._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_dense->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3087
 *         if self._nodes is not None:
 *             self._nodes._listener = <PyObject *>null_listener
 *         if self._dense is not None:             # <<<<<<<<<<<<<<
 *             self._dense._listener = <PyObject *>null_listener
 *         if self._ways is not None:
 */
  }

  /* "pyrosm_proto.pyx":3089
 *         if self._dense is not None:
 *             self._dense._listener = <PyObject *>null_listener
 *         if self._ways is not None:             # <<<<<<<<<<<<<<
 *             self._ways._listener = <PyObject *>null_listener
 *         if self._relations is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_ways) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3090
 *             self._dense._listener = <PyObject *>null_listener
 *         if self._ways is not None:
 *             self._ways._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._relations is not None:
 *             self._relations._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_ways->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3089
 *         if self._dense is not None:
 *             self._dense._listener = <PyObject *>null_listener
 *         if self._ways is not None:             # <<<<<<<<<<<<<<
 *             self._ways._listener = <PyObject *>null_listener
 *         if self._relations is not None:
 */
  }

  /* "pyrosm_proto.pyx":3091
 *         if self._ways is not None:
 *             self._ways._listener = <PyObject *>null_listener
 *         if self._relations is not None:             # <<<<<<<<<<<<<<
 *             self._relations._listener = <PyObject *>null_listener
 *         if self._changesets is not None:
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_relations) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":3092
 *             self._ways._listener = <PyObject *>null_listener
 *         if self._relations is not None:
 *             self._relations._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._changesets is not None:
 *             self._changesets._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_relations->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3091
 *         if self._ways is not None:
 *             self._ways._listener = <PyObject *>null_listener
 *         if self._relations is not None:             # <<<<<<<<<<<<<<
 *             self._relations._listener = <PyObject *>null_listener
 *         if self._changesets is not None:
 */
  }

  /* "pyrosm_proto.pyx":3093
 *         if self._relations is not None:
 *             self._relations._listener = <PyObject *>null_listener
 *         if self._changesets is not None:             # <<<<<<<<<<<<<<
 *             self._changesets._listener = <PyObject *>null_listener
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_changesets) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3094
 *             self._relations._listener = <PyObject *>null_listener
 *         if self._changesets is not None:
 *             self._changesets._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, **kwargs):
 */
    __pyx_v_self->_changesets->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3093
 *         if self._relations is not None:
 *             self._relations._listener = <PyObject *>null_listener
 *         if self._changesets is not None:             # <<<<<<<<<<<<<<
 *             self._changesets._listener = <PyObject *>null_listener
 * 
 */
  }

  /* "pyrosm_proto.pyx":3083
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._nodes is not None:
 */

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

/* "pyrosm_proto.pyx":3096
 *             self._changesets._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_4__init__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), __pyx_v_kwargs);

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup_4__init__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_field_name = NULL;
  PyObject *__pyx_v_field_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrosm_proto.pyx":3097
 * 
 *     def __init__(self, **kwargs):
 *         self.reset()             # <<<<<<<<<<<<<<
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3098
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3098, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":3099
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('dense',):
 */
    __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3099, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3099, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3099, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3099, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 3099, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 3099, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3099, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3099, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3099, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 3099, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 3099, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":3100
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('dense',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "pyrosm_proto.pyx":3101
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('dense',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('nodes','ways','relations','changesets',):
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_dense, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3101, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_13 = (__pyx_t_1 != 0);
          if (__pyx_t_13) {

            /* "pyrosm_proto.pyx":3102
 *                 try:
 *                     if field_name in ('dense',):
 *                         getattr(self, field_name).MergeFrom(field_value)             # <<<<<<<<<<<<<<
 *                     elif field_name in ('nodes','ways','relations','changesets',):
 *                         getattr(self, field_name).extend(field_value)
 */
            __pyx_t_7 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3102, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3102, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_7 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_7)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3102, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":3101
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('dense',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('nodes','ways','relations','changesets',):
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":3103
 *                     if field_name in ('dense',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('nodes','ways','relations','changesets',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_nodes, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3103, __pyx_L8_error)
          if (!__pyx_t_1) {
          } else {
            __pyx_t_13 = __pyx_t_1;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_ways, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3103, __pyx_L8_error)
          if (!__pyx_t_1) {
          } else {
            __pyx_t_13 = __pyx_t_1;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_relations, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3103, __pyx_L8_error)
          if (!__pyx_t_1) {
          } else {
            __pyx_t_13 = __pyx_t_1;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_changesets, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3103, __pyx_L8_error)
          __pyx_t_13 = __pyx_t_1;
          __pyx_L17_bool_binop_done:;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_1 = (__pyx_t_13 != 0);
          if (__pyx_t_1) {

            /* "pyrosm_proto.pyx":3104
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('nodes','ways','relations','changesets',):
 *                         getattr(self, field_name).extend(field_value)             # <<<<<<<<<<<<<<
 *                     else:
 *                         setattr(self, field_name, field_value)
 */
            __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3104, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_extend); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3104, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
              __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
              if (likely(__pyx_t_6)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_7, function);
              }
            }
            __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3104, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":3103
 *                     if field_name in ('dense',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('nodes','ways','relations','changesets',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":3106
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 *                         setattr(self, field_name, field_value)             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 */
          /*else*/ {
            __pyx_t_14 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name, __pyx_v_field_value); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 3106, __pyx_L8_error)
          }
          __pyx_L16:;

          /* "pyrosm_proto.pyx":3100
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('dense',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L15_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrosm_proto.pyx":3107
 *                     else:
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return
 */
        __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_15) {
          __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 3107, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_6);

          /* "pyrosm_proto.pyx":3108
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))             # <<<<<<<<<<<<<<
 *         return
 * 
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3108, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_field_name);
          __Pyx_GIVEREF(__pyx_v_field_name);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_field_name);
          __pyx_t_16 = __Pyx_PyString_Format(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3108, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3108, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 3108, __pyx_L10_except_error)
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;

        /* "pyrosm_proto.pyx":3100
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('dense',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L15_try_end:;
      }

      /* "pyrosm_proto.pyx":3099
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('dense',):
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":3098
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  }

  /* "pyrosm_proto.pyx":3109
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3096
 *             self._changesets._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XDECREF(__pyx_v_field_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3111
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = []
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_6__str__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_6__str__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_messages = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyrosm_proto.pyx":3112
 * 
 *     def __str__(self):
 *         fields = []             # <<<<<<<<<<<<<<
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = [
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3113
 *     def __str__(self):
 *         fields = []
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]             # <<<<<<<<<<<<<<
 *         messages = [
 *                             'nodes',
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 3113, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3113, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3113, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3114
 *         fields = []
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = [             # <<<<<<<<<<<<<<
 *                             'nodes',
 *                             'dense',
 */
  __pyx_t_1 = PyList_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_nodes);
  __Pyx_GIVEREF(__pyx_n_s_nodes);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_nodes);
  __Pyx_INCREF(__pyx_n_s_dense);
  __Pyx_GIVEREF(__pyx_n_s_dense);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_dense);
  __Pyx_INCREF(__pyx_n_s_ways);
  __Pyx_GIVEREF(__pyx_n_s_ways);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_ways);
  __Pyx_INCREF(__pyx_n_s_relations);
  __Pyx_GIVEREF(__pyx_n_s_relations);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_relations);
  __Pyx_INCREF(__pyx_n_s_changesets);
  __Pyx_GIVEREF(__pyx_n_s_changesets);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_changesets);
  __pyx_v_messages = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3120
 *                             'relations',
 *                             'changesets',]
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  __pyx_t_1 = __pyx_v_messages; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 3120, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":3121
 *                             'changesets',]
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))             # <<<<<<<<<<<<<<
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3121, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":3122
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    __pyx_t_4 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3122, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 3122, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3122, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 3122, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3122, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 3122, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":3123
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))             # <<<<<<<<<<<<<<
 *             components.append('}')
 *         return '\n'.join(components)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_line);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3123, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":3122
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":3124
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 *             components.append('}')             # <<<<<<<<<<<<<<
 *         return '\n'.join(components)
 * 
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_kp_s__2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3124, __pyx_L1_error)

    /* "pyrosm_proto.pyx":3120
 *                             'relations',
 *                             'changesets',]
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3125
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 *         return '\n'.join(components)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3111
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = []
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_messages);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3127
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveGroup_reset(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("reset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_9reset)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3127, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3130
 *         # reset values and populate defaults
 * 
 *         self.__field_bitmap0 = 0             # <<<<<<<<<<<<<<
 * 
 *         if self._nodes is not None:
 */
  __pyx_v_self->__pyx___field_bitmap0 = 0;

  /* "pyrosm_proto.pyx":3132
 *         self.__field_bitmap0 = 0
 * 
 *         if self._nodes is not None:             # <<<<<<<<<<<<<<
 *             self._nodes._listener = <PyObject *>null_listener
 *         self._nodes = TypedList.__new__(TypedList)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_nodes) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":3133
 * 
 *         if self._nodes is not None:
 *             self._nodes._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._nodes = TypedList.__new__(TypedList)
 *         self._nodes._list_type = Node
 */
    __pyx_v_self->_nodes->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3132
 *         self.__field_bitmap0 = 0
 * 
 *         if self._nodes is not None:             # <<<<<<<<<<<<<<
 *             self._nodes._listener = <PyObject *>null_listener
 *         self._nodes = TypedList.__new__(TypedList)
 */
  }

  /* "pyrosm_proto.pyx":3134
 *         if self._nodes is not None:
 *             self._nodes._listener = <PyObject *>null_listener
 *         self._nodes = TypedList.__new__(TypedList)             # <<<<<<<<<<<<<<
 *         self._nodes._list_type = Node
 *         self._nodes._listener = <PyObject *>self
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3134, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_nodes);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_nodes));
  __pyx_v_self->_nodes = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3135
 *             self._nodes._listener = <PyObject *>null_listener
 *         self._nodes = TypedList.__new__(TypedList)
 *         self._nodes._list_type = Node             # <<<<<<<<<<<<<<
 *         self._nodes._listener = <PyObject *>self
 *         if self._dense is not None:
 */
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Node));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Node));
  __Pyx_GOTREF(__pyx_v_self->_nodes->_list_type);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_nodes->_list_type));
  __pyx_v_self->_nodes->_list_type = __pyx_ptype_12pyrosm_proto_Node;

  /* "pyrosm_proto.pyx":3136
 *         self._nodes = TypedList.__new__(TypedList)
 *         self._nodes._list_type = Node
 *         self._nodes._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._dense is not None:
 *             self._dense._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_nodes->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":3137
 *         self._nodes._list_type = Node
 *         self._nodes._listener = <PyObject *>self
 *         if self._dense is not None:             # <<<<<<<<<<<<<<
 *             self._dense._listener = <PyObject *>null_listener
 *         self._dense = None
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_dense) != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":3138
 *         self._nodes._listener = <PyObject *>self
 *         if self._dense is not None:
 *             self._dense._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._dense = None
 *         if self._ways is not None:
 */
    __pyx_v_self->_dense->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3137
 *         self._nodes._list_type = Node
 *         self._nodes._listener = <PyObject *>self
 *         if self._dense is not None:             # <<<<<<<<<<<<<<
 *             self._dense._listener = <PyObject *>null_listener
 *         self._dense = None
 */
  }

  /* "pyrosm_proto.pyx":3139
 *         if self._dense is not None:
 *             self._dense._listener = <PyObject *>null_listener
 *         self._dense = None             # <<<<<<<<<<<<<<
 *         if self._ways is not None:
 *             self._ways._listener = <PyObject *>null_listener
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_dense);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_dense));
  __pyx_v_self->_dense = ((struct __pyx_obj_12pyrosm_proto_DenseNodes *)Py_None);

  /* "pyrosm_proto.pyx":3140
 *             self._dense._listener = <PyObject *>null_listener
 *         self._dense = None
 *         if self._ways is not None:             # <<<<<<<<<<<<<<
 *             self._ways._listener = <PyObject *>null_listener
 *         self._ways = TypedList.__new__(TypedList)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_ways) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":3141
 *         self._dense = None
 *         if self._ways is not None:
 *             self._ways._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._ways = TypedList.__new__(TypedList)
 *         self._ways._list_type = Way
 */
    __pyx_v_self->_ways->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3140
 *             self._dense._listener = <PyObject *>null_listener
 *         self._dense = None
 *         if self._ways is not None:             # <<<<<<<<<<<<<<
 *             self._ways._listener = <PyObject *>null_listener
 *         self._ways = TypedList.__new__(TypedList)
 */
  }

  /* "pyrosm_proto.pyx":3142
 *         if self._ways is not None:
 *             self._ways._listener = <PyObject *>null_listener
 *         self._ways = TypedList.__new__(TypedList)             # <<<<<<<<<<<<<<
 *         self._ways._list_type = Way
 *         self._ways._listener = <PyObject *>self
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3142, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_ways);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_ways));
  __pyx_v_self->_ways = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3143
 *             self._ways._listener = <PyObject *>null_listener
 *         self._ways = TypedList.__new__(TypedList)
 *         self._ways._list_type = Way             # <<<<<<<<<<<<<<
 *         self._ways._listener = <PyObject *>self
 *         if self._relations is not None:
 */
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Way));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Way));
  __Pyx_GOTREF(__pyx_v_self->_ways->_list_type);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_ways->_list_type));
  __pyx_v_self->_ways->_list_type = __pyx_ptype_12pyrosm_proto_Way;

  /* "pyrosm_proto.pyx":3144
 *         self._ways = TypedList.__new__(TypedList)
 *         self._ways._list_type = Way
 *         self._ways._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._relations is not None:
 *             self._relations._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_ways->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":3145
 *         self._ways._list_type = Way
 *         self._ways._listener = <PyObject *>self
 *         if self._relations is not None:             # <<<<<<<<<<<<<<
 *             self._relations._listener = <PyObject *>null_listener
 *         self._relations = TypedList.__new__(TypedList)
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_relations) != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":3146
 *         self._ways._listener = <PyObject *>self
 *         if self._relations is not None:
 *             self._relations._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._relations = TypedList.__new__(TypedList)
 *         self._relations._list_type = Relation
 */
    __pyx_v_self->_relations->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3145
 *         self._ways._list_type = Way
 *         self._ways._listener = <PyObject *>self
 *         if self._relations is not None:             # <<<<<<<<<<<<<<
 *             self._relations._listener = <PyObject *>null_listener
 *         self._relations = TypedList.__new__(TypedList)
 */
  }

  /* "pyrosm_proto.pyx":3147
 *         if self._relations is not None:
 *             self._relations._listener = <PyObject *>null_listener
 *         self._relations = TypedList.__new__(TypedList)             # <<<<<<<<<<<<<<
 *         self._relations._list_type = Relation
 *         self._relations._listener = <PyObject *>self
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3147, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_relations);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_relations));
  __pyx_v_self->_relations = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3148
 *             self._relations._listener = <PyObject *>null_listener
 *         self._relations = TypedList.__new__(TypedList)
 *         self._relations._list_type = Relation             # <<<<<<<<<<<<<<
 *         self._relations._listener = <PyObject *>self
 *         if self._changesets is not None:
 */
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Relation));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Relation));
  __Pyx_GOTREF(__pyx_v_self->_relations->_list_type);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_relations->_list_type));
  __pyx_v_self->_relations->_list_type = __pyx_ptype_12pyrosm_proto_Relation;

  /* "pyrosm_proto.pyx":3149
 *         self._relations = TypedList.__new__(TypedList)
 *         self._relations._list_type = Relation
 *         self._relations._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._changesets is not None:
 *             self._changesets._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_relations->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":3150
 *         self._relations._list_type = Relation
 *         self._relations._listener = <PyObject *>self
 *         if self._changesets is not None:             # <<<<<<<<<<<<<<
 *             self._changesets._listener = <PyObject *>null_listener
 *         self._changesets = TypedList.__new__(TypedList)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_changesets) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":3151
 *         self._relations._listener = <PyObject *>self
 *         if self._changesets is not None:
 *             self._changesets._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._changesets = TypedList.__new__(TypedList)
 *         self._changesets._list_type = ChangeSet
 */
    __pyx_v_self->_changesets->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3150
 *         self._relations._list_type = Relation
 *         self._relations._listener = <PyObject *>self
 *         if self._changesets is not None:             # <<<<<<<<<<<<<<
 *             self._changesets._listener = <PyObject *>null_listener
 *         self._changesets = TypedList.__new__(TypedList)
 */
  }

  /* "pyrosm_proto.pyx":3152
 *         if self._changesets is not None:
 *             self._changesets._listener = <PyObject *>null_listener
 *         self._changesets = TypedList.__new__(TypedList)             # <<<<<<<<<<<<<<
 *         self._changesets._list_type = ChangeSet
 *         self._changesets._listener = <PyObject *>self
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3152, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_changesets);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_changesets));
  __pyx_v_self->_changesets = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3153
 *             self._changesets._listener = <PyObject *>null_listener
 *         self._changesets = TypedList.__new__(TypedList)
 *         self._changesets._list_type = ChangeSet             # <<<<<<<<<<<<<<
 *         self._changesets._listener = <PyObject *>self
 *         return
 */
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrosm_proto_ChangeSet));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrosm_proto_ChangeSet));
  __Pyx_GOTREF(__pyx_v_self->_changesets->_list_type);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_changesets->_list_type));
  __pyx_v_self->_changesets->_list_type = __pyx_ptype_12pyrosm_proto_ChangeSet;

  /* "pyrosm_proto.pyx":3154
 *         self._changesets = TypedList.__new__(TypedList)
 *         self._changesets._list_type = ChangeSet
 *         self._changesets._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_v_self->_changesets->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":3155
 *         self._changesets._list_type = ChangeSet
 *         self._changesets._listener = <PyObject *>self
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3127
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

  /* 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_WriteUnraisable("pyrosm_proto.PrimitiveGroup.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_8reset(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_8reset(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_14PrimitiveGroup_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3127, __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("pyrosm_proto.PrimitiveGroup.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3159
 * 
 *     @property
 *     def nodes(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._nodes is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_5nodes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_5nodes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_5nodes___get__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_5nodes___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":3161
 *     def nodes(self):
 *         # lazy init sub messages
 *         if self._nodes is None:             # <<<<<<<<<<<<<<
 *             self._nodes = Node.__new__(Node)
 *             self._nodes.reset()
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_nodes) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3162
 *         # lazy init sub messages
 *         if self._nodes is None:
 *             self._nodes = Node.__new__(Node)             # <<<<<<<<<<<<<<
 *             self._nodes.reset()
 *             self._nodes._listener = <PyObject *>self
 */
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_Node(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_Node), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3162, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_3), __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3162, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_nodes);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_nodes));
    __pyx_v_self->_nodes = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":3163
 *         if self._nodes is None:
 *             self._nodes = Node.__new__(Node)
 *             self._nodes.reset()             # <<<<<<<<<<<<<<
 *             self._nodes._listener = <PyObject *>self
 *         return self._nodes
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_nodes), __pyx_n_s_reset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":3164
 *             self._nodes = Node.__new__(Node)
 *             self._nodes.reset()
 *             self._nodes._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return self._nodes
 * 
 */
    __pyx_v_self->_nodes->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":3161
 *     def nodes(self):
 *         # lazy init sub messages
 *         if self._nodes is None:             # <<<<<<<<<<<<<<
 *             self._nodes = Node.__new__(Node)
 *             self._nodes.reset()
 */
  }

  /* "pyrosm_proto.pyx":3165
 *             self._nodes.reset()
 *             self._nodes._listener = <PyObject *>self
 *         return self._nodes             # <<<<<<<<<<<<<<
 * 
 *     @nodes.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_nodes));
  __pyx_r = ((PyObject *)__pyx_v_self->_nodes);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3159
 * 
 *     @property
 *     def nodes(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._nodes is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.nodes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3168
 * 
 *     @nodes.setter
 *     def nodes(self, value):             # <<<<<<<<<<<<<<
 *         if self._nodes is not None:
 *             self._nodes._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_5nodes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_5nodes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_5nodes_2__set__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup_5nodes_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":3169
 *     @nodes.setter
 *     def nodes(self, value):
 *         if self._nodes is not None:             # <<<<<<<<<<<<<<
 *             self._nodes._listener = <PyObject *>null_listener
 *         self._nodes = TypedList.__new__(TypedList)
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_nodes) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3170
 *     def nodes(self, value):
 *         if self._nodes is not None:
 *             self._nodes._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._nodes = TypedList.__new__(TypedList)
 *         self._nodes._list_type = Node
 */
    __pyx_v_self->_nodes->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3169
 *     @nodes.setter
 *     def nodes(self, value):
 *         if self._nodes is not None:             # <<<<<<<<<<<<<<
 *             self._nodes._listener = <PyObject *>null_listener
 *         self._nodes = TypedList.__new__(TypedList)
 */
  }

  /* "pyrosm_proto.pyx":3171
 *         if self._nodes is not None:
 *             self._nodes._listener = <PyObject *>null_listener
 *         self._nodes = TypedList.__new__(TypedList)             # <<<<<<<<<<<<<<
 *         self._nodes._list_type = Node
 *         self._nodes._listener = <PyObject *>self
 */
  __pyx_t_3 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList), __pyx_empty_tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3171, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_nodes);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_nodes));
  __pyx_v_self->_nodes = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":3172
 *             self._nodes._listener = <PyObject *>null_listener
 *         self._nodes = TypedList.__new__(TypedList)
 *         self._nodes._list_type = Node             # <<<<<<<<<<<<<<
 *         self._nodes._listener = <PyObject *>self
 *         for val in value:
 */
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Node));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Node));
  __Pyx_GOTREF(__pyx_v_self->_nodes->_list_type);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_nodes->_list_type));
  __pyx_v_self->_nodes->_list_type = __pyx_ptype_12pyrosm_proto_Node;

  /* "pyrosm_proto.pyx":3173
 *         self._nodes = TypedList.__new__(TypedList)
 *         self._nodes._list_type = Node
 *         self._nodes._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         for val in value:
 *             list.append(self._nodes, val)
 */
  __pyx_v_self->_nodes->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":3174
 *         self._nodes._list_type = Node
 *         self._nodes._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             list.append(self._nodes, val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3174, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3174, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3174, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3174, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3174, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3174, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pyrosm_proto.pyx":3175
 *         self._nodes._listener = <PyObject *>self
 *         for val in value:
 *             list.append(self._nodes, val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    if (unlikely(((PyObject *)__pyx_v_self->_nodes) == Py_None)) {
      PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
      __PYX_ERR(0, 3175, __pyx_L1_error)
    }
    __pyx_t_6 = ((PyObject *)__pyx_v_self->_nodes);
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyList_Append(((PyObject*)__pyx_t_6), __pyx_v_val); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 3175, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyrosm_proto.pyx":3174
 *         self._nodes._list_type = Node
 *         self._nodes._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             list.append(self._nodes, val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":3176
 *         for val in value:
 *             list.append(self._nodes, val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3168
 * 
 *     @nodes.setter
 *     def nodes(self, value):             # <<<<<<<<<<<<<<
 *         if self._nodes is not None:
 *             self._nodes._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.nodes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3179
 * 
 *     @property
 *     def dense(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._dense is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_5dense_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_5dense_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_5dense___get__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_5dense___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":3181
 *     def dense(self):
 *         # lazy init sub messages
 *         if self._dense is None:             # <<<<<<<<<<<<<<
 *             self._dense = DenseNodes.__new__(DenseNodes)
 *             self._dense.reset()
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_dense) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3182
 *         # lazy init sub messages
 *         if self._dense is None:
 *             self._dense = DenseNodes.__new__(DenseNodes)             # <<<<<<<<<<<<<<
 *             self._dense.reset()
 *             self._dense._listener = <PyObject *>self
 */
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_DenseNodes(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_DenseNodes), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3182, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __Pyx_GOTREF(__pyx_v_self->_dense);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_dense));
    __pyx_v_self->_dense = ((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":3183
 *         if self._dense is None:
 *             self._dense = DenseNodes.__new__(DenseNodes)
 *             self._dense.reset()             # <<<<<<<<<<<<<<
 *             self._dense._listener = <PyObject *>self
 *         return self._dense
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->_dense->__pyx_vtab)->reset(__pyx_v_self->_dense, 0);

    /* "pyrosm_proto.pyx":3184
 *             self._dense = DenseNodes.__new__(DenseNodes)
 *             self._dense.reset()
 *             self._dense._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return self._dense
 * 
 */
    __pyx_v_self->_dense->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":3181
 *     def dense(self):
 *         # lazy init sub messages
 *         if self._dense is None:             # <<<<<<<<<<<<<<
 *             self._dense = DenseNodes.__new__(DenseNodes)
 *             self._dense.reset()
 */
  }

  /* "pyrosm_proto.pyx":3185
 *             self._dense.reset()
 *             self._dense._listener = <PyObject *>self
 *         return self._dense             # <<<<<<<<<<<<<<
 * 
 *     @dense.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_dense));
  __pyx_r = ((PyObject *)__pyx_v_self->_dense);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3179
 * 
 *     @property
 *     def dense(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._dense is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.dense.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3188
 * 
 *     @dense.setter
 *     def dense(self, value):             # <<<<<<<<<<<<<<
 *         if self._dense is not None:
 *             self._dense._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_5dense_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_5dense_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_5dense_2__set__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup_5dense_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":3189
 *     @dense.setter
 *     def dense(self, value):
 *         if self._dense is not None:             # <<<<<<<<<<<<<<
 *             self._dense._listener = <PyObject *>null_listener
 *         self._dense = value
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_dense) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3190
 *     def dense(self, value):
 *         if self._dense is not None:
 *             self._dense._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._dense = value
 *         self._dense._listener = <PyObject *>self
 */
    __pyx_v_self->_dense->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3189
 *     @dense.setter
 *     def dense(self, value):
 *         if self._dense is not None:             # <<<<<<<<<<<<<<
 *             self._dense._listener = <PyObject *>null_listener
 *         self._dense = value
 */
  }

  /* "pyrosm_proto.pyx":3191
 *         if self._dense is not None:
 *             self._dense._listener = <PyObject *>null_listener
 *         self._dense = value             # <<<<<<<<<<<<<<
 *         self._dense._listener = <PyObject *>self
 *         self._Modified()
 */
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_12pyrosm_proto_DenseNodes))))) __PYX_ERR(0, 3191, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_dense);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_dense));
  __pyx_v_self->_dense = ((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":3192
 *             self._dense._listener = <PyObject *>null_listener
 *         self._dense = value
 *         self._dense._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_v_self->_dense->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":3193
 *         self._dense = value
 *         self._dense._listener = <PyObject *>self
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3188
 * 
 *     @dense.setter
 *     def dense(self, value):             # <<<<<<<<<<<<<<
 *         if self._dense is not None:
 *             self._dense._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.dense.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3196
 * 
 *     @property
 *     def ways(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._ways is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_4ways_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_4ways_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_4ways___get__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_4ways___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":3198
 *     def ways(self):
 *         # lazy init sub messages
 *         if self._ways is None:             # <<<<<<<<<<<<<<
 *             self._ways = Way.__new__(Way)
 *             self._ways.reset()
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_ways) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3199
 *         # lazy init sub messages
 *         if self._ways is None:
 *             self._ways = Way.__new__(Way)             # <<<<<<<<<<<<<<
 *             self._ways.reset()
 *             self._ways._listener = <PyObject *>self
 */
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_Way(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_Way), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3199, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_3), __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3199, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_ways);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_ways));
    __pyx_v_self->_ways = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":3200
 *         if self._ways is None:
 *             self._ways = Way.__new__(Way)
 *             self._ways.reset()             # <<<<<<<<<<<<<<
 *             self._ways._listener = <PyObject *>self
 *         return self._ways
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_ways), __pyx_n_s_reset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":3201
 *             self._ways = Way.__new__(Way)
 *             self._ways.reset()
 *             self._ways._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return self._ways
 * 
 */
    __pyx_v_self->_ways->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":3198
 *     def ways(self):
 *         # lazy init sub messages
 *         if self._ways is None:             # <<<<<<<<<<<<<<
 *             self._ways = Way.__new__(Way)
 *             self._ways.reset()
 */
  }

  /* "pyrosm_proto.pyx":3202
 *             self._ways.reset()
 *             self._ways._listener = <PyObject *>self
 *         return self._ways             # <<<<<<<<<<<<<<
 * 
 *     @ways.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_ways));
  __pyx_r = ((PyObject *)__pyx_v_self->_ways);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3196
 * 
 *     @property
 *     def ways(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._ways is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.ways.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3205
 * 
 *     @ways.setter
 *     def ways(self, value):             # <<<<<<<<<<<<<<
 *         if self._ways is not None:
 *             self._ways._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_4ways_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_4ways_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_4ways_2__set__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup_4ways_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":3206
 *     @ways.setter
 *     def ways(self, value):
 *         if self._ways is not None:             # <<<<<<<<<<<<<<
 *             self._ways._listener = <PyObject *>null_listener
 *         self._ways = TypedList.__new__(TypedList)
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_ways) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3207
 *     def ways(self, value):
 *         if self._ways is not None:
 *             self._ways._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._ways = TypedList.__new__(TypedList)
 *         self._ways._list_type = Way
 */
    __pyx_v_self->_ways->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3206
 *     @ways.setter
 *     def ways(self, value):
 *         if self._ways is not None:             # <<<<<<<<<<<<<<
 *             self._ways._listener = <PyObject *>null_listener
 *         self._ways = TypedList.__new__(TypedList)
 */
  }

  /* "pyrosm_proto.pyx":3208
 *         if self._ways is not None:
 *             self._ways._listener = <PyObject *>null_listener
 *         self._ways = TypedList.__new__(TypedList)             # <<<<<<<<<<<<<<
 *         self._ways._list_type = Way
 *         self._ways._listener = <PyObject *>self
 */
  __pyx_t_3 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList), __pyx_empty_tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3208, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_ways);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_ways));
  __pyx_v_self->_ways = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":3209
 *             self._ways._listener = <PyObject *>null_listener
 *         self._ways = TypedList.__new__(TypedList)
 *         self._ways._list_type = Way             # <<<<<<<<<<<<<<
 *         self._ways._listener = <PyObject *>self
 *         for val in value:
 */
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Way));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Way));
  __Pyx_GOTREF(__pyx_v_self->_ways->_list_type);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_ways->_list_type));
  __pyx_v_self->_ways->_list_type = __pyx_ptype_12pyrosm_proto_Way;

  /* "pyrosm_proto.pyx":3210
 *         self._ways = TypedList.__new__(TypedList)
 *         self._ways._list_type = Way
 *         self._ways._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         for val in value:
 *             list.append(self._ways, val)
 */
  __pyx_v_self->_ways->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":3211
 *         self._ways._list_type = Way
 *         self._ways._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             list.append(self._ways, val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3211, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3211, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3211, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3211, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3211, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3211, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pyrosm_proto.pyx":3212
 *         self._ways._listener = <PyObject *>self
 *         for val in value:
 *             list.append(self._ways, val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    if (unlikely(((PyObject *)__pyx_v_self->_ways) == Py_None)) {
      PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
      __PYX_ERR(0, 3212, __pyx_L1_error)
    }
    __pyx_t_6 = ((PyObject *)__pyx_v_self->_ways);
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyList_Append(((PyObject*)__pyx_t_6), __pyx_v_val); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 3212, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyrosm_proto.pyx":3211
 *         self._ways._list_type = Way
 *         self._ways._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             list.append(self._ways, val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":3213
 *         for val in value:
 *             list.append(self._ways, val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3205
 * 
 *     @ways.setter
 *     def ways(self, value):             # <<<<<<<<<<<<<<
 *         if self._ways is not None:
 *             self._ways._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.ways.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3216
 * 
 *     @property
 *     def relations(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._relations is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_9relations_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_9relations_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_9relations___get__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_9relations___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":3218
 *     def relations(self):
 *         # lazy init sub messages
 *         if self._relations is None:             # <<<<<<<<<<<<<<
 *             self._relations = Relation.__new__(Relation)
 *             self._relations.reset()
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_relations) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3219
 *         # lazy init sub messages
 *         if self._relations is None:
 *             self._relations = Relation.__new__(Relation)             # <<<<<<<<<<<<<<
 *             self._relations.reset()
 *             self._relations._listener = <PyObject *>self
 */
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_Relation(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_Relation), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3219, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_3), __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3219, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_relations);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_relations));
    __pyx_v_self->_relations = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":3220
 *         if self._relations is None:
 *             self._relations = Relation.__new__(Relation)
 *             self._relations.reset()             # <<<<<<<<<<<<<<
 *             self._relations._listener = <PyObject *>self
 *         return self._relations
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_relations), __pyx_n_s_reset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":3221
 *             self._relations = Relation.__new__(Relation)
 *             self._relations.reset()
 *             self._relations._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return self._relations
 * 
 */
    __pyx_v_self->_relations->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":3218
 *     def relations(self):
 *         # lazy init sub messages
 *         if self._relations is None:             # <<<<<<<<<<<<<<
 *             self._relations = Relation.__new__(Relation)
 *             self._relations.reset()
 */
  }

  /* "pyrosm_proto.pyx":3222
 *             self._relations.reset()
 *             self._relations._listener = <PyObject *>self
 *         return self._relations             # <<<<<<<<<<<<<<
 * 
 *     @relations.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_relations));
  __pyx_r = ((PyObject *)__pyx_v_self->_relations);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3216
 * 
 *     @property
 *     def relations(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._relations is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.relations.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3225
 * 
 *     @relations.setter
 *     def relations(self, value):             # <<<<<<<<<<<<<<
 *         if self._relations is not None:
 *             self._relations._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_9relations_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_9relations_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_9relations_2__set__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup_9relations_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":3226
 *     @relations.setter
 *     def relations(self, value):
 *         if self._relations is not None:             # <<<<<<<<<<<<<<
 *             self._relations._listener = <PyObject *>null_listener
 *         self._relations = TypedList.__new__(TypedList)
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_relations) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3227
 *     def relations(self, value):
 *         if self._relations is not None:
 *             self._relations._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._relations = TypedList.__new__(TypedList)
 *         self._relations._list_type = Relation
 */
    __pyx_v_self->_relations->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3226
 *     @relations.setter
 *     def relations(self, value):
 *         if self._relations is not None:             # <<<<<<<<<<<<<<
 *             self._relations._listener = <PyObject *>null_listener
 *         self._relations = TypedList.__new__(TypedList)
 */
  }

  /* "pyrosm_proto.pyx":3228
 *         if self._relations is not None:
 *             self._relations._listener = <PyObject *>null_listener
 *         self._relations = TypedList.__new__(TypedList)             # <<<<<<<<<<<<<<
 *         self._relations._list_type = Relation
 *         self._relations._listener = <PyObject *>self
 */
  __pyx_t_3 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList), __pyx_empty_tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3228, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_relations);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_relations));
  __pyx_v_self->_relations = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":3229
 *             self._relations._listener = <PyObject *>null_listener
 *         self._relations = TypedList.__new__(TypedList)
 *         self._relations._list_type = Relation             # <<<<<<<<<<<<<<
 *         self._relations._listener = <PyObject *>self
 *         for val in value:
 */
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Relation));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Relation));
  __Pyx_GOTREF(__pyx_v_self->_relations->_list_type);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_relations->_list_type));
  __pyx_v_self->_relations->_list_type = __pyx_ptype_12pyrosm_proto_Relation;

  /* "pyrosm_proto.pyx":3230
 *         self._relations = TypedList.__new__(TypedList)
 *         self._relations._list_type = Relation
 *         self._relations._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         for val in value:
 *             list.append(self._relations, val)
 */
  __pyx_v_self->_relations->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":3231
 *         self._relations._list_type = Relation
 *         self._relations._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             list.append(self._relations, val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3231, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3231, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3231, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3231, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3231, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3231, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pyrosm_proto.pyx":3232
 *         self._relations._listener = <PyObject *>self
 *         for val in value:
 *             list.append(self._relations, val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    if (unlikely(((PyObject *)__pyx_v_self->_relations) == Py_None)) {
      PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
      __PYX_ERR(0, 3232, __pyx_L1_error)
    }
    __pyx_t_6 = ((PyObject *)__pyx_v_self->_relations);
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyList_Append(((PyObject*)__pyx_t_6), __pyx_v_val); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 3232, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyrosm_proto.pyx":3231
 *         self._relations._list_type = Relation
 *         self._relations._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             list.append(self._relations, val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":3233
 *         for val in value:
 *             list.append(self._relations, val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3225
 * 
 *     @relations.setter
 *     def relations(self, value):             # <<<<<<<<<<<<<<
 *         if self._relations is not None:
 *             self._relations._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.relations.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3236
 * 
 *     @property
 *     def changesets(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._changesets is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_10changesets_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_10changesets_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_10changesets___get__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_10changesets___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":3238
 *     def changesets(self):
 *         # lazy init sub messages
 *         if self._changesets is None:             # <<<<<<<<<<<<<<
 *             self._changesets = ChangeSet.__new__(ChangeSet)
 *             self._changesets.reset()
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_changesets) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3239
 *         # lazy init sub messages
 *         if self._changesets is None:
 *             self._changesets = ChangeSet.__new__(ChangeSet)             # <<<<<<<<<<<<<<
 *             self._changesets.reset()
 *             self._changesets._listener = <PyObject *>self
 */
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_ChangeSet(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_ChangeSet), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3239, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_3), __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3239, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_changesets);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_changesets));
    __pyx_v_self->_changesets = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":3240
 *         if self._changesets is None:
 *             self._changesets = ChangeSet.__new__(ChangeSet)
 *             self._changesets.reset()             # <<<<<<<<<<<<<<
 *             self._changesets._listener = <PyObject *>self
 *         return self._changesets
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_changesets), __pyx_n_s_reset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":3241
 *             self._changesets = ChangeSet.__new__(ChangeSet)
 *             self._changesets.reset()
 *             self._changesets._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return self._changesets
 * 
 */
    __pyx_v_self->_changesets->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":3238
 *     def changesets(self):
 *         # lazy init sub messages
 *         if self._changesets is None:             # <<<<<<<<<<<<<<
 *             self._changesets = ChangeSet.__new__(ChangeSet)
 *             self._changesets.reset()
 */
  }

  /* "pyrosm_proto.pyx":3242
 *             self._changesets.reset()
 *             self._changesets._listener = <PyObject *>self
 *         return self._changesets             # <<<<<<<<<<<<<<
 * 
 *     @changesets.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_changesets));
  __pyx_r = ((PyObject *)__pyx_v_self->_changesets);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3236
 * 
 *     @property
 *     def changesets(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._changesets is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.changesets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3245
 * 
 *     @changesets.setter
 *     def changesets(self, value):             # <<<<<<<<<<<<<<
 *         if self._changesets is not None:
 *             self._changesets._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_10changesets_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_10changesets_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_10changesets_2__set__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup_10changesets_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":3246
 *     @changesets.setter
 *     def changesets(self, value):
 *         if self._changesets is not None:             # <<<<<<<<<<<<<<
 *             self._changesets._listener = <PyObject *>null_listener
 *         self._changesets = TypedList.__new__(TypedList)
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_changesets) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3247
 *     def changesets(self, value):
 *         if self._changesets is not None:
 *             self._changesets._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._changesets = TypedList.__new__(TypedList)
 *         self._changesets._list_type = ChangeSet
 */
    __pyx_v_self->_changesets->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3246
 *     @changesets.setter
 *     def changesets(self, value):
 *         if self._changesets is not None:             # <<<<<<<<<<<<<<
 *             self._changesets._listener = <PyObject *>null_listener
 *         self._changesets = TypedList.__new__(TypedList)
 */
  }

  /* "pyrosm_proto.pyx":3248
 *         if self._changesets is not None:
 *             self._changesets._listener = <PyObject *>null_listener
 *         self._changesets = TypedList.__new__(TypedList)             # <<<<<<<<<<<<<<
 *         self._changesets._list_type = ChangeSet
 *         self._changesets._listener = <PyObject *>self
 */
  __pyx_t_3 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList), __pyx_empty_tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3248, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_changesets);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_changesets));
  __pyx_v_self->_changesets = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":3249
 *             self._changesets._listener = <PyObject *>null_listener
 *         self._changesets = TypedList.__new__(TypedList)
 *         self._changesets._list_type = ChangeSet             # <<<<<<<<<<<<<<
 *         self._changesets._listener = <PyObject *>self
 *         for val in value:
 */
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrosm_proto_ChangeSet));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrosm_proto_ChangeSet));
  __Pyx_GOTREF(__pyx_v_self->_changesets->_list_type);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_changesets->_list_type));
  __pyx_v_self->_changesets->_list_type = __pyx_ptype_12pyrosm_proto_ChangeSet;

  /* "pyrosm_proto.pyx":3250
 *         self._changesets = TypedList.__new__(TypedList)
 *         self._changesets._list_type = ChangeSet
 *         self._changesets._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         for val in value:
 *             list.append(self._changesets, val)
 */
  __pyx_v_self->_changesets->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":3251
 *         self._changesets._list_type = ChangeSet
 *         self._changesets._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             list.append(self._changesets, val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3251, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3251, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3251, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3251, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3251, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3251, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pyrosm_proto.pyx":3252
 *         self._changesets._listener = <PyObject *>self
 *         for val in value:
 *             list.append(self._changesets, val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    if (unlikely(((PyObject *)__pyx_v_self->_changesets) == Py_None)) {
      PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
      __PYX_ERR(0, 3252, __pyx_L1_error)
    }
    __pyx_t_6 = ((PyObject *)__pyx_v_self->_changesets);
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyList_Append(((PyObject*)__pyx_t_6), __pyx_v_val); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 3252, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyrosm_proto.pyx":3251
 *         self._changesets._list_type = ChangeSet
 *         self._changesets._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             list.append(self._changesets, val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":3253
 *         for val in value:
 *             list.append(self._changesets, val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3245
 * 
 *     @changesets.setter
 *     def changesets(self, value):             # <<<<<<<<<<<<<<
 *         if self._changesets is not None:
 *             self._changesets._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.changesets.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3256
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

static int __pyx_f_12pyrosm_proto_14PrimitiveGroup__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, int __pyx_v_cache) {
  int __pyx_v_current_offset;
  int64_t __pyx_v_key;
  int64_t __pyx_v_field_size;
  struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_nodes_elt = 0;
  struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_ways_elt = 0;
  struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_relations_elt = 0;
  struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_changesets_elt = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("_protobuf_deserialize", 0);

  /* "pyrosm_proto.pyx":3257
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):
 *         cdef int current_offset = 0             # <<<<<<<<<<<<<<
 *         cdef int64_t key
 *         cdef int64_t field_size
 */
  __pyx_v_current_offset = 0;

  /* "pyrosm_proto.pyx":3264
 *         cdef Relation relations_elt
 *         cdef ChangeSet changesets_elt
 *         while current_offset < size:             # <<<<<<<<<<<<<<
 *             key = get_varint64(memory, &current_offset)
 *             # nodes
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_current_offset < __pyx_v_size) != 0);
    if (!__pyx_t_1) break;

    /* "pyrosm_proto.pyx":3265
 *         cdef ChangeSet changesets_elt
 *         while current_offset < size:
 *             key = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # nodes
 *             if key == 10:
 */
    __pyx_v_key = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

    /* "pyrosm_proto.pyx":3267
 *             key = get_varint64(memory, &current_offset)
 *             # nodes
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 nodes_elt = Node.__new__(Node)
 *                 nodes_elt.reset()
 */
    switch (__pyx_v_key) {
      case 10:

      /* "pyrosm_proto.pyx":3268
 *             # nodes
 *             if key == 10:
 *                 nodes_elt = Node.__new__(Node)             # <<<<<<<<<<<<<<
 *                 nodes_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)
 */
      __pyx_t_2 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_Node(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_Node), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3268, __pyx_L1_error)
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_XDECREF_SET(__pyx_v_nodes_elt, ((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":3269
 *             if key == 10:
 *                 nodes_elt = Node.__new__(Node)
 *                 nodes_elt.reset()             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_nodes_elt->__pyx_vtab)->reset(__pyx_v_nodes_elt, 0);

      /* "pyrosm_proto.pyx":3270
 *                 nodes_elt = Node.__new__(Node)
 *                 nodes_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     nodes_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":3271
 *                 nodes_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     nodes_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += nodes_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      __pyx_t_1 = (__pyx_v_cache != 0);
      if (__pyx_t_1) {

        /* "pyrosm_proto.pyx":3272
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:
 *                     nodes_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])             # <<<<<<<<<<<<<<
 *                 current_offset += nodes_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *                 list.append(self._nodes, nodes_elt)
 */
        __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3272, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3272, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GIVEREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_v_nodes_elt->_cached_serialization);
        __Pyx_DECREF(__pyx_v_nodes_elt->_cached_serialization);
        __pyx_v_nodes_elt->_cached_serialization = ((PyObject*)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyrosm_proto.pyx":3271
 *                 nodes_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     nodes_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += nodes_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      }

      /* "pyrosm_proto.pyx":3273
 *                 if cache:
 *                     nodes_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += nodes_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)             # <<<<<<<<<<<<<<
 *                 list.append(self._nodes, nodes_elt)
 *             # dense
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_nodes_elt->__pyx_vtab)->_protobuf_deserialize(__pyx_v_nodes_elt, (__pyx_v_memory + __pyx_v_current_offset), ((int)__pyx_v_field_size), __pyx_v_cache));

      /* "pyrosm_proto.pyx":3274
 *                     nodes_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += nodes_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *                 list.append(self._nodes, nodes_elt)             # <<<<<<<<<<<<<<
 *             # dense
 *             elif key == 18:
 */
      if (unlikely(((PyObject *)__pyx_v_self->_nodes) == Py_None)) {
        PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
        __PYX_ERR(0, 3274, __pyx_L1_error)
      }
      __pyx_t_3 = ((PyObject *)__pyx_v_self->_nodes);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyList_Append(((PyObject*)__pyx_t_3), ((PyObject *)__pyx_v_nodes_elt)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3274, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyrosm_proto.pyx":3267
 *             key = get_varint64(memory, &current_offset)
 *             # nodes
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 nodes_elt = Node.__new__(Node)
 *                 nodes_elt.reset()
 */
      break;
      case 18:

      /* "pyrosm_proto.pyx":3277
 *             # dense
 *             elif key == 18:
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 if self._dense is None:
 *                     self._dense = DenseNodes.__new__(DenseNodes)
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":3278
 *             elif key == 18:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._dense is None:             # <<<<<<<<<<<<<<
 *                     self._dense = DenseNodes.__new__(DenseNodes)
 *                     self._dense._listener = <PyObject *>self
 */
      __pyx_t_1 = (((PyObject *)__pyx_v_self->_dense) == Py_None);
      __pyx_t_5 = (__pyx_t_1 != 0);
      if (__pyx_t_5) {

        /* "pyrosm_proto.pyx":3279
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._dense is None:
 *                     self._dense = DenseNodes.__new__(DenseNodes)             # <<<<<<<<<<<<<<
 *                     self._dense._listener = <PyObject *>self
 *                 self._dense.reset()
 */
        __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_DenseNodes(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_DenseNodes), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3279, __pyx_L1_error)
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
        __Pyx_GOTREF(__pyx_v_self->_dense);
        __Pyx_DECREF(((PyObject *)__pyx_v_self->_dense));
        __pyx_v_self->_dense = ((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyrosm_proto.pyx":3280
 *                 if self._dense is None:
 *                     self._dense = DenseNodes.__new__(DenseNodes)
 *                     self._dense._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *                 self._dense.reset()
 *                 if cache:
 */
        __pyx_v_self->_dense->_listener = ((PyObject *)__pyx_v_self);

        /* "pyrosm_proto.pyx":3278
 *             elif key == 18:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._dense is None:             # <<<<<<<<<<<<<<
 *                     self._dense = DenseNodes.__new__(DenseNodes)
 *                     self._dense._listener = <PyObject *>self
 */
      }

      /* "pyrosm_proto.pyx":3281
 *                     self._dense = DenseNodes.__new__(DenseNodes)
 *                     self._dense._listener = <PyObject *>self
 *                 self._dense.reset()             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     self._dense._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->_dense->__pyx_vtab)->reset(__pyx_v_self->_dense, 0);

      /* "pyrosm_proto.pyx":3282
 *                     self._dense._listener = <PyObject *>self
 *                 self._dense.reset()
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._dense._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._dense._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      __pyx_t_5 = (__pyx_v_cache != 0);
      if (__pyx_t_5) {

        /* "pyrosm_proto.pyx":3283
 *                 self._dense.reset()
 *                 if cache:
 *                     self._dense._cached_serialization = bytes(memory[current_offset:current_offset+field_size])             # <<<<<<<<<<<<<<
 *                 current_offset += self._dense._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *             # ways
 */
        __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3283, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3283, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_v_self->_dense->_cached_serialization);
        __Pyx_DECREF(__pyx_v_self->_dense->_cached_serialization);
        __pyx_v_self->_dense->_cached_serialization = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyrosm_proto.pyx":3282
 *                     self._dense._listener = <PyObject *>self
 *                 self._dense.reset()
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._dense._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._dense._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      }

      /* "pyrosm_proto.pyx":3284
 *                 if cache:
 *                     self._dense._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._dense._protobuf_deserialize(memory+current_offset, <int>field_size, cache)             # <<<<<<<<<<<<<<
 *             # ways
 *             elif key == 26:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->_dense->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self->_dense, (__pyx_v_memory + __pyx_v_current_offset), ((int)__pyx_v_field_size), __pyx_v_cache));

      /* "pyrosm_proto.pyx":3276
 *                 list.append(self._nodes, nodes_elt)
 *             # dense
 *             elif key == 18:             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._dense is None:
 */
      break;
      case 26:

      /* "pyrosm_proto.pyx":3287
 *             # ways
 *             elif key == 26:
 *                 ways_elt = Way.__new__(Way)             # <<<<<<<<<<<<<<
 *                 ways_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)
 */
      __pyx_t_2 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_Way(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_Way), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3287, __pyx_L1_error)
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_XDECREF_SET(__pyx_v_ways_elt, ((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":3288
 *             elif key == 26:
 *                 ways_elt = Way.__new__(Way)
 *                 ways_elt.reset()             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_ways_elt->__pyx_vtab)->reset(__pyx_v_ways_elt, 0);

      /* "pyrosm_proto.pyx":3289
 *                 ways_elt = Way.__new__(Way)
 *                 ways_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     ways_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":3290
 *                 ways_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     ways_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += ways_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      __pyx_t_5 = (__pyx_v_cache != 0);
      if (__pyx_t_5) {

        /* "pyrosm_proto.pyx":3291
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:
 *                     ways_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])             # <<<<<<<<<<<<<<
 *                 current_offset += ways_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *                 list.append(self._ways, ways_elt)
 */
        __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GIVEREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_v_ways_elt->_cached_serialization);
        __Pyx_DECREF(__pyx_v_ways_elt->_cached_serialization);
        __pyx_v_ways_elt->_cached_serialization = ((PyObject*)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyrosm_proto.pyx":3290
 *                 ways_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     ways_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += ways_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      }

      /* "pyrosm_proto.pyx":3292
 *                 if cache:
 *                     ways_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += ways_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)             # <<<<<<<<<<<<<<
 *                 list.append(self._ways, ways_elt)
 *             # relations
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_ways_elt->__pyx_vtab)->_protobuf_deserialize(__pyx_v_ways_elt, (__pyx_v_memory + __pyx_v_current_offset), ((int)__pyx_v_field_size), __pyx_v_cache));

      /* "pyrosm_proto.pyx":3293
 *                     ways_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += ways_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *                 list.append(self._ways, ways_elt)             # <<<<<<<<<<<<<<
 *             # relations
 *             elif key == 34:
 */
      if (unlikely(((PyObject *)__pyx_v_self->_ways) == Py_None)) {
        PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
        __PYX_ERR(0, 3293, __pyx_L1_error)
      }
      __pyx_t_3 = ((PyObject *)__pyx_v_self->_ways);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyList_Append(((PyObject*)__pyx_t_3), ((PyObject *)__pyx_v_ways_elt)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3293, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyrosm_proto.pyx":3286
 *                 current_offset += self._dense._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *             # ways
 *             elif key == 26:             # <<<<<<<<<<<<<<
 *                 ways_elt = Way.__new__(Way)
 *                 ways_elt.reset()
 */
      break;
      case 34:

      /* "pyrosm_proto.pyx":3296
 *             # relations
 *             elif key == 34:
 *                 relations_elt = Relation.__new__(Relation)             # <<<<<<<<<<<<<<
 *                 relations_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)
 */
      __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_Relation(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_Relation), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3296, __pyx_L1_error)
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      __Pyx_XDECREF_SET(__pyx_v_relations_elt, ((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pyrosm_proto.pyx":3297
 *             elif key == 34:
 *                 relations_elt = Relation.__new__(Relation)
 *                 relations_elt.reset()             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_relations_elt->__pyx_vtab)->reset(__pyx_v_relations_elt, 0);

      /* "pyrosm_proto.pyx":3298
 *                 relations_elt = Relation.__new__(Relation)
 *                 relations_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     relations_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":3299
 *                 relations_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     relations_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += relations_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      __pyx_t_5 = (__pyx_v_cache != 0);
      if (__pyx_t_5) {

        /* "pyrosm_proto.pyx":3300
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:
 *                     relations_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])             # <<<<<<<<<<<<<<
 *                 current_offset += relations_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *                 list.append(self._relations, relations_elt)
 */
        __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3300, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3300, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_v_relations_elt->_cached_serialization);
        __Pyx_DECREF(__pyx_v_relations_elt->_cached_serialization);
        __pyx_v_relations_elt->_cached_serialization = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyrosm_proto.pyx":3299
 *                 relations_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     relations_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += relations_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      }

      /* "pyrosm_proto.pyx":3301
 *                 if cache:
 *                     relations_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += relations_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)             # <<<<<<<<<<<<<<
 *                 list.append(self._relations, relations_elt)
 *             # changesets
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_relations_elt->__pyx_vtab)->_protobuf_deserialize(__pyx_v_relations_elt, (__pyx_v_memory + __pyx_v_current_offset), ((int)__pyx_v_field_size), __pyx_v_cache));

      /* "pyrosm_proto.pyx":3302
 *                     relations_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += relations_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *                 list.append(self._relations, relations_elt)             # <<<<<<<<<<<<<<
 *             # changesets
 *             elif key == 42:
 */
      if (unlikely(((PyObject *)__pyx_v_self->_relations) == Py_None)) {
        PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
        __PYX_ERR(0, 3302, __pyx_L1_error)
      }
      __pyx_t_2 = ((PyObject *)__pyx_v_self->_relations);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyList_Append(((PyObject*)__pyx_t_2), ((PyObject *)__pyx_v_relations_elt)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3302, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":3295
 *                 list.append(self._ways, ways_elt)
 *             # relations
 *             elif key == 34:             # <<<<<<<<<<<<<<
 *                 relations_elt = Relation.__new__(Relation)
 *                 relations_elt.reset()
 */
      break;
      case 42:

      /* "pyrosm_proto.pyx":3305
 *             # changesets
 *             elif key == 42:
 *                 changesets_elt = ChangeSet.__new__(ChangeSet)             # <<<<<<<<<<<<<<
 *                 changesets_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)
 */
      __pyx_t_2 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_ChangeSet(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_ChangeSet), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3305, __pyx_L1_error)
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_XDECREF_SET(__pyx_v_changesets_elt, ((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":3306
 *             elif key == 42:
 *                 changesets_elt = ChangeSet.__new__(ChangeSet)
 *                 changesets_elt.reset()             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_changesets_elt->__pyx_vtab)->reset(__pyx_v_changesets_elt, 0);

      /* "pyrosm_proto.pyx":3307
 *                 changesets_elt = ChangeSet.__new__(ChangeSet)
 *                 changesets_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     changesets_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":3308
 *                 changesets_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     changesets_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += changesets_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      __pyx_t_5 = (__pyx_v_cache != 0);
      if (__pyx_t_5) {

        /* "pyrosm_proto.pyx":3309
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:
 *                     changesets_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])             # <<<<<<<<<<<<<<
 *                 current_offset += changesets_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *                 list.append(self._changesets, changesets_elt)
 */
        __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3309, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3309, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GIVEREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_v_changesets_elt->_cached_serialization);
        __Pyx_DECREF(__pyx_v_changesets_elt->_cached_serialization);
        __pyx_v_changesets_elt->_cached_serialization = ((PyObject*)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyrosm_proto.pyx":3308
 *                 changesets_elt.reset()
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     changesets_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += changesets_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      }

      /* "pyrosm_proto.pyx":3310
 *                 if cache:
 *                     changesets_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += changesets_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)             # <<<<<<<<<<<<<<
 *                 list.append(self._changesets, changesets_elt)
 *             # Unknown field - need to skip proper number of bytes
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_changesets_elt->__pyx_vtab)->_protobuf_deserialize(__pyx_v_changesets_elt, (__pyx_v_memory + __pyx_v_current_offset), ((int)__pyx_v_field_size), __pyx_v_cache));

      /* "pyrosm_proto.pyx":3311
 *                     changesets_elt._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += changesets_elt._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *                 list.append(self._changesets, changesets_elt)             # <<<<<<<<<<<<<<
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 */
      if (unlikely(((PyObject *)__pyx_v_self->_changesets) == Py_None)) {
        PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
        __PYX_ERR(0, 3311, __pyx_L1_error)
      }
      __pyx_t_3 = ((PyObject *)__pyx_v_self->_changesets);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyList_Append(((PyObject*)__pyx_t_3), ((PyObject *)__pyx_v_changesets_elt)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3311, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyrosm_proto.pyx":3304
 *                 list.append(self._relations, relations_elt)
 *             # changesets
 *             elif key == 42:             # <<<<<<<<<<<<<<
 *                 changesets_elt = ChangeSet.__new__(ChangeSet)
 *                 changesets_elt.reset()
 */
      break;
      default:

      /* "pyrosm_proto.pyx":3314
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)             # <<<<<<<<<<<<<<
 * 
 *         self._is_present_in_parent = True
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        if (unlikely(!(__pyx_f_12pyrobuf_util_skip_generic(__pyx_v_memory, (&__pyx_v_current_offset), __pyx_v_size, (__pyx_v_key & 0x7)) != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 3314, __pyx_L1_error)
        }
      }
      #endif
      break;
    }
  }

  /* "pyrosm_proto.pyx":3316
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)
 * 
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 * 
 *         return current_offset
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":3318
 *         self._is_present_in_parent = True
 * 
 *         return current_offset             # <<<<<<<<<<<<<<
 * 
 *     cpdef void Clear(self):
 */
  __pyx_r = __pyx_v_current_offset;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3256
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("pyrosm_proto.PrimitiveGroup._protobuf_deserialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_nodes_elt);
  __Pyx_XDECREF((PyObject *)__pyx_v_ways_elt);
  __Pyx_XDECREF((PyObject *)__pyx_v_relations_elt);
  __Pyx_XDECREF((PyObject *)__pyx_v_changesets_elt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3320
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveGroup_Clear(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_11Clear)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3320, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3322
 *     cpdef void Clear(self):
 *         """Clears all data that was set in the message."""
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3323
 *         """Clears all data that was set in the message."""
 *         self.reset()
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void ClearField(self, field_name):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3320
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.PrimitiveGroup.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_10Clear[] = "Clears all data that was set in the message.";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Clear (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_10Clear(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_10Clear(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_14PrimitiveGroup_Clear(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3320, __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("pyrosm_proto.PrimitiveGroup.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3325
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'nodes':
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveGroup_ClearField(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("ClearField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ClearField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_13ClearField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3327
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'nodes':             # <<<<<<<<<<<<<<
 *             if self._nodes is not None:
 *                 self._nodes._listener = <PyObject *>null_listener
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_nodes, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3327, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":3328
 *         """Clears the contents of a given field."""
 *         if field_name == 'nodes':
 *             if self._nodes is not None:             # <<<<<<<<<<<<<<
 *                 self._nodes._listener = <PyObject *>null_listener
 *             self._nodes = TypedList.__new__(TypedList)
 */
    __pyx_t_5 = (((PyObject *)__pyx_v_self->_nodes) != Py_None);
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "pyrosm_proto.pyx":3329
 *         if field_name == 'nodes':
 *             if self._nodes is not None:
 *                 self._nodes._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._nodes = TypedList.__new__(TypedList)
 *             self._nodes._list_type = Node
 */
      __pyx_v_self->_nodes->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

      /* "pyrosm_proto.pyx":3328
 *         """Clears the contents of a given field."""
 *         if field_name == 'nodes':
 *             if self._nodes is not None:             # <<<<<<<<<<<<<<
 *                 self._nodes._listener = <PyObject *>null_listener
 *             self._nodes = TypedList.__new__(TypedList)
 */
    }

    /* "pyrosm_proto.pyx":3330
 *             if self._nodes is not None:
 *                 self._nodes._listener = <PyObject *>null_listener
 *             self._nodes = TypedList.__new__(TypedList)             # <<<<<<<<<<<<<<
 *             self._nodes._list_type = Node
 *             self._nodes._listener = <PyObject *>self
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3330, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_nodes);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_nodes));
    __pyx_v_self->_nodes = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3331
 *                 self._nodes._listener = <PyObject *>null_listener
 *             self._nodes = TypedList.__new__(TypedList)
 *             self._nodes._list_type = Node             # <<<<<<<<<<<<<<
 *             self._nodes._listener = <PyObject *>self
 *         elif field_name == 'dense':
 */
    __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Node));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Node));
    __Pyx_GOTREF(__pyx_v_self->_nodes->_list_type);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_nodes->_list_type));
    __pyx_v_self->_nodes->_list_type = __pyx_ptype_12pyrosm_proto_Node;

    /* "pyrosm_proto.pyx":3332
 *             self._nodes = TypedList.__new__(TypedList)
 *             self._nodes._list_type = Node
 *             self._nodes._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'dense':
 *             if self._dense is not None:
 */
    __pyx_v_self->_nodes->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":3327
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'nodes':             # <<<<<<<<<<<<<<
 *             if self._nodes is not None:
 *                 self._nodes._listener = <PyObject *>null_listener
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":3333
 *             self._nodes._list_type = Node
 *             self._nodes._listener = <PyObject *>self
 *         elif field_name == 'dense':             # <<<<<<<<<<<<<<
 *             if self._dense is not None:
 *                 self._dense._listener = <PyObject *>null_listener
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_dense, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3333, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":3334
 *             self._nodes._listener = <PyObject *>self
 *         elif field_name == 'dense':
 *             if self._dense is not None:             # <<<<<<<<<<<<<<
 *                 self._dense._listener = <PyObject *>null_listener
 *             self._dense = None
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_dense) != Py_None);
    __pyx_t_5 = (__pyx_t_6 != 0);
    if (__pyx_t_5) {

      /* "pyrosm_proto.pyx":3335
 *         elif field_name == 'dense':
 *             if self._dense is not None:
 *                 self._dense._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._dense = None
 *         elif field_name == 'ways':
 */
      __pyx_v_self->_dense->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

      /* "pyrosm_proto.pyx":3334
 *             self._nodes._listener = <PyObject *>self
 *         elif field_name == 'dense':
 *             if self._dense is not None:             # <<<<<<<<<<<<<<
 *                 self._dense._listener = <PyObject *>null_listener
 *             self._dense = None
 */
    }

    /* "pyrosm_proto.pyx":3336
 *             if self._dense is not None:
 *                 self._dense._listener = <PyObject *>null_listener
 *             self._dense = None             # <<<<<<<<<<<<<<
 *         elif field_name == 'ways':
 *             if self._ways is not None:
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->_dense);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_dense));
    __pyx_v_self->_dense = ((struct __pyx_obj_12pyrosm_proto_DenseNodes *)Py_None);

    /* "pyrosm_proto.pyx":3333
 *             self._nodes._list_type = Node
 *             self._nodes._listener = <PyObject *>self
 *         elif field_name == 'dense':             # <<<<<<<<<<<<<<
 *             if self._dense is not None:
 *                 self._dense._listener = <PyObject *>null_listener
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":3337
 *                 self._dense._listener = <PyObject *>null_listener
 *             self._dense = None
 *         elif field_name == 'ways':             # <<<<<<<<<<<<<<
 *             if self._ways is not None:
 *                 self._ways._listener = <PyObject *>null_listener
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_ways, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3337, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":3338
 *             self._dense = None
 *         elif field_name == 'ways':
 *             if self._ways is not None:             # <<<<<<<<<<<<<<
 *                 self._ways._listener = <PyObject *>null_listener
 *             self._ways = TypedList.__new__(TypedList)
 */
    __pyx_t_5 = (((PyObject *)__pyx_v_self->_ways) != Py_None);
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "pyrosm_proto.pyx":3339
 *         elif field_name == 'ways':
 *             if self._ways is not None:
 *                 self._ways._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._ways = TypedList.__new__(TypedList)
 *             self._ways._list_type = Way
 */
      __pyx_v_self->_ways->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

      /* "pyrosm_proto.pyx":3338
 *             self._dense = None
 *         elif field_name == 'ways':
 *             if self._ways is not None:             # <<<<<<<<<<<<<<
 *                 self._ways._listener = <PyObject *>null_listener
 *             self._ways = TypedList.__new__(TypedList)
 */
    }

    /* "pyrosm_proto.pyx":3340
 *             if self._ways is not None:
 *                 self._ways._listener = <PyObject *>null_listener
 *             self._ways = TypedList.__new__(TypedList)             # <<<<<<<<<<<<<<
 *             self._ways._list_type = Way
 *             self._ways._listener = <PyObject *>self
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3340, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_ways);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_ways));
    __pyx_v_self->_ways = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3341
 *                 self._ways._listener = <PyObject *>null_listener
 *             self._ways = TypedList.__new__(TypedList)
 *             self._ways._list_type = Way             # <<<<<<<<<<<<<<
 *             self._ways._listener = <PyObject *>self
 *         elif field_name == 'relations':
 */
    __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Way));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Way));
    __Pyx_GOTREF(__pyx_v_self->_ways->_list_type);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_ways->_list_type));
    __pyx_v_self->_ways->_list_type = __pyx_ptype_12pyrosm_proto_Way;

    /* "pyrosm_proto.pyx":3342
 *             self._ways = TypedList.__new__(TypedList)
 *             self._ways._list_type = Way
 *             self._ways._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'relations':
 *             if self._relations is not None:
 */
    __pyx_v_self->_ways->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":3337
 *                 self._dense._listener = <PyObject *>null_listener
 *             self._dense = None
 *         elif field_name == 'ways':             # <<<<<<<<<<<<<<
 *             if self._ways is not None:
 *                 self._ways._listener = <PyObject *>null_listener
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":3343
 *             self._ways._list_type = Way
 *             self._ways._listener = <PyObject *>self
 *         elif field_name == 'relations':             # <<<<<<<<<<<<<<
 *             if self._relations is not None:
 *                 self._relations._listener = <PyObject *>null_listener
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_relations, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3343, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":3344
 *             self._ways._listener = <PyObject *>self
 *         elif field_name == 'relations':
 *             if self._relations is not None:             # <<<<<<<<<<<<<<
 *                 self._relations._listener = <PyObject *>null_listener
 *             self._relations = TypedList.__new__(TypedList)
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_relations) != Py_None);
    __pyx_t_5 = (__pyx_t_6 != 0);
    if (__pyx_t_5) {

      /* "pyrosm_proto.pyx":3345
 *         elif field_name == 'relations':
 *             if self._relations is not None:
 *                 self._relations._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._relations = TypedList.__new__(TypedList)
 *             self._relations._list_type = Relation
 */
      __pyx_v_self->_relations->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

      /* "pyrosm_proto.pyx":3344
 *             self._ways._listener = <PyObject *>self
 *         elif field_name == 'relations':
 *             if self._relations is not None:             # <<<<<<<<<<<<<<
 *                 self._relations._listener = <PyObject *>null_listener
 *             self._relations = TypedList.__new__(TypedList)
 */
    }

    /* "pyrosm_proto.pyx":3346
 *             if self._relations is not None:
 *                 self._relations._listener = <PyObject *>null_listener
 *             self._relations = TypedList.__new__(TypedList)             # <<<<<<<<<<<<<<
 *             self._relations._list_type = Relation
 *             self._relations._listener = <PyObject *>self
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3346, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_relations);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_relations));
    __pyx_v_self->_relations = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3347
 *                 self._relations._listener = <PyObject *>null_listener
 *             self._relations = TypedList.__new__(TypedList)
 *             self._relations._list_type = Relation             # <<<<<<<<<<<<<<
 *             self._relations._listener = <PyObject *>self
 *         elif field_name == 'changesets':
 */
    __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Relation));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrosm_proto_Relation));
    __Pyx_GOTREF(__pyx_v_self->_relations->_list_type);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_relations->_list_type));
    __pyx_v_self->_relations->_list_type = __pyx_ptype_12pyrosm_proto_Relation;

    /* "pyrosm_proto.pyx":3348
 *             self._relations = TypedList.__new__(TypedList)
 *             self._relations._list_type = Relation
 *             self._relations._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'changesets':
 *             if self._changesets is not None:
 */
    __pyx_v_self->_relations->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":3343
 *             self._ways._list_type = Way
 *             self._ways._listener = <PyObject *>self
 *         elif field_name == 'relations':             # <<<<<<<<<<<<<<
 *             if self._relations is not None:
 *                 self._relations._listener = <PyObject *>null_listener
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":3349
 *             self._relations._list_type = Relation
 *             self._relations._listener = <PyObject *>self
 *         elif field_name == 'changesets':             # <<<<<<<<<<<<<<
 *             if self._changesets is not None:
 *                 self._changesets._listener = <PyObject *>null_listener
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_changesets, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3349, __pyx_L1_error)
  if (likely(__pyx_t_5)) {

    /* "pyrosm_proto.pyx":3350
 *             self._relations._listener = <PyObject *>self
 *         elif field_name == 'changesets':
 *             if self._changesets is not None:             # <<<<<<<<<<<<<<
 *                 self._changesets._listener = <PyObject *>null_listener
 *             self._changesets = TypedList.__new__(TypedList)
 */
    __pyx_t_5 = (((PyObject *)__pyx_v_self->_changesets) != Py_None);
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "pyrosm_proto.pyx":3351
 *         elif field_name == 'changesets':
 *             if self._changesets is not None:
 *                 self._changesets._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._changesets = TypedList.__new__(TypedList)
 *             self._changesets._list_type = ChangeSet
 */
      __pyx_v_self->_changesets->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

      /* "pyrosm_proto.pyx":3350
 *             self._relations._listener = <PyObject *>self
 *         elif field_name == 'changesets':
 *             if self._changesets is not None:             # <<<<<<<<<<<<<<
 *                 self._changesets._listener = <PyObject *>null_listener
 *             self._changesets = TypedList.__new__(TypedList)
 */
    }

    /* "pyrosm_proto.pyx":3352
 *             if self._changesets is not None:
 *                 self._changesets._listener = <PyObject *>null_listener
 *             self._changesets = TypedList.__new__(TypedList)             # <<<<<<<<<<<<<<
 *             self._changesets._list_type = ChangeSet
 *             self._changesets._listener = <PyObject *>self
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_TypedList)))) __PYX_ERR(0, 3352, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_changesets);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_changesets));
    __pyx_v_self->_changesets = ((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3353
 *                 self._changesets._listener = <PyObject *>null_listener
 *             self._changesets = TypedList.__new__(TypedList)
 *             self._changesets._list_type = ChangeSet             # <<<<<<<<<<<<<<
 *             self._changesets._listener = <PyObject *>self
 *         else:
 */
    __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrosm_proto_ChangeSet));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrosm_proto_ChangeSet));
    __Pyx_GOTREF(__pyx_v_self->_changesets->_list_type);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_changesets->_list_type));
    __pyx_v_self->_changesets->_list_type = __pyx_ptype_12pyrosm_proto_ChangeSet;

    /* "pyrosm_proto.pyx":3354
 *             self._changesets = TypedList.__new__(TypedList)
 *             self._changesets._list_type = ChangeSet
 *             self._changesets._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 */
    __pyx_v_self->_changesets->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":3349
 *             self._relations._list_type = Relation
 *             self._relations._listener = <PyObject *>self
 *         elif field_name == 'changesets':             # <<<<<<<<<<<<<<
 *             if self._changesets is not None:
 *                 self._changesets._listener = <PyObject *>null_listener
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":3356
 *             self._changesets._listener = <PyObject *>self
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3356, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":3358
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void CopyFrom(self, PrimitiveGroup other_msg):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3325
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'nodes':
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.PrimitiveGroup.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_12ClearField[] = "Clears the contents of a given field.";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ClearField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_12ClearField(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_12ClearField(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ClearField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_14PrimitiveGroup_ClearField(__pyx_v_self, __pyx_v_field_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3325, __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("pyrosm_proto.PrimitiveGroup.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3360
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, PrimitiveGroup other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveGroup_CopyFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CopyFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3360, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_15CopyFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3360, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3367
 *             other_msg (PrimitiveGroup): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":3368
 *         """
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 *         self.reset()
 *         self.MergeFrom(other_msg)
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":3367
 *             other_msg (PrimitiveGroup): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  }

  /* "pyrosm_proto.pyx":3369
 *         if self is other_msg:
 *             return
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self.MergeFrom(other_msg)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3370
 *             return
 *         self.reset()
 *         self.MergeFrom(other_msg)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint HasField(self, field_name) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->MergeFrom(__pyx_v_self, __pyx_v_other_msg, 0);

  /* "pyrosm_proto.pyx":3360
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, PrimitiveGroup other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.PrimitiveGroup.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_14CopyFrom[] = "\n        Copies the content of the specified message into the current message.\n\n        Params:\n            other_msg (PrimitiveGroup): Message to copy into the current one.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CopyFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_PrimitiveGroup, 1, "other_msg", 0))) __PYX_ERR(0, 3360, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_14CopyFrom(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_14CopyFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_14PrimitiveGroup_CopyFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3360, __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("pyrosm_proto.PrimitiveGroup.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3372
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveGroup_HasField(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("HasField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_HasField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3372, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_17HasField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3372, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3372, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3379
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'dense':             # <<<<<<<<<<<<<<
 *             return self._dense is not None and self._dense._is_present_in_parent
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_dense, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3379, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":3380
 *         """
 *         if field_name == 'dense':
 *             return self._dense is not None and self._dense._is_present_in_parent             # <<<<<<<<<<<<<<
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_dense) != Py_None);
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_5 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->_dense->_is_present_in_parent != 0);
    __pyx_t_5 = __pyx_t_7;
    __pyx_L4_bool_binop_done:;
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":3379
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'dense':             # <<<<<<<<<<<<<<
 *             return self._dense is not None and self._dense._is_present_in_parent
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  }

  /* "pyrosm_proto.pyx":3381
 *         if field_name == 'dense':
 *             return self._dense is not None and self._dense._is_present_in_parent
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint IsInitialized(self):
 */
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_singular, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 3381, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3372
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

  /* 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("pyrosm_proto.PrimitiveGroup.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_16HasField[] = "\n        Checks if a certain field is set for the message.\n\n        Params:\n            field_name (str): The name of the field to check.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_16HasField(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_16HasField(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("HasField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_14PrimitiveGroup_HasField(__pyx_v_self, __pyx_v_field_name, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3372, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3383
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveGroup_IsInitialized(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_v_i;
  struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_nodes_msg = 0;
  struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_ways_msg = 0;
  struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_relations_msg = 0;
  struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_changesets_msg = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_IsInitialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3383, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_19IsInitialized)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3383, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3383, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3398
 * 
 * 
 *         if self._dense is not None and self._dense._is_present_in_parent and not self._dense.IsInitialized():             # <<<<<<<<<<<<<<
 *             return False
 *         for i in range(len(self._nodes)):
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_dense) != Py_None);
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_self->_dense->_is_present_in_parent != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->_dense->__pyx_vtab)->IsInitialized(__pyx_v_self->_dense, 0) != 0)) != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":3399
 * 
 *         if self._dense is not None and self._dense._is_present_in_parent and not self._dense.IsInitialized():
 *             return False             # <<<<<<<<<<<<<<
 *         for i in range(len(self._nodes)):
 *             nodes_msg = <Node>self._nodes[i]
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":3398
 * 
 * 
 *         if self._dense is not None and self._dense._is_present_in_parent and not self._dense.IsInitialized():             # <<<<<<<<<<<<<<
 *             return False
 *         for i in range(len(self._nodes)):
 */
  }

  /* "pyrosm_proto.pyx":3400
 *         if self._dense is not None and self._dense._is_present_in_parent and not self._dense.IsInitialized():
 *             return False
 *         for i in range(len(self._nodes)):             # <<<<<<<<<<<<<<
 *             nodes_msg = <Node>self._nodes[i]
 *             if not nodes_msg.IsInitialized():
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_nodes);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_8 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "pyrosm_proto.pyx":3401
 *             return False
 *         for i in range(len(self._nodes)):
 *             nodes_msg = <Node>self._nodes[i]             # <<<<<<<<<<<<<<
 *             if not nodes_msg.IsInitialized():
 *                 return False
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_nodes), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_nodes_msg, ((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":3402
 *         for i in range(len(self._nodes)):
 *             nodes_msg = <Node>self._nodes[i]
 *             if not nodes_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 return False
 *         for i in range(len(self._ways)):
 */
    __pyx_t_5 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_nodes_msg->__pyx_vtab)->IsInitialized(__pyx_v_nodes_msg, 0) != 0)) != 0);
    if (__pyx_t_5) {

      /* "pyrosm_proto.pyx":3403
 *             nodes_msg = <Node>self._nodes[i]
 *             if not nodes_msg.IsInitialized():
 *                 return False             # <<<<<<<<<<<<<<
 *         for i in range(len(self._ways)):
 *             ways_msg = <Way>self._ways[i]
 */
      __pyx_r = 0;
      goto __pyx_L0;

      /* "pyrosm_proto.pyx":3402
 *         for i in range(len(self._nodes)):
 *             nodes_msg = <Node>self._nodes[i]
 *             if not nodes_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 return False
 *         for i in range(len(self._ways)):
 */
    }
  }

  /* "pyrosm_proto.pyx":3404
 *             if not nodes_msg.IsInitialized():
 *                 return False
 *         for i in range(len(self._ways)):             # <<<<<<<<<<<<<<
 *             ways_msg = <Way>self._ways[i]
 *             if not ways_msg.IsInitialized():
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_ways);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_8 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "pyrosm_proto.pyx":3405
 *                 return False
 *         for i in range(len(self._ways)):
 *             ways_msg = <Way>self._ways[i]             # <<<<<<<<<<<<<<
 *             if not ways_msg.IsInitialized():
 *                 return False
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_ways), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_ways_msg, ((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3406
 *         for i in range(len(self._ways)):
 *             ways_msg = <Way>self._ways[i]
 *             if not ways_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 return False
 *         for i in range(len(self._relations)):
 */
    __pyx_t_5 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_ways_msg->__pyx_vtab)->IsInitialized(__pyx_v_ways_msg, 0) != 0)) != 0);
    if (__pyx_t_5) {

      /* "pyrosm_proto.pyx":3407
 *             ways_msg = <Way>self._ways[i]
 *             if not ways_msg.IsInitialized():
 *                 return False             # <<<<<<<<<<<<<<
 *         for i in range(len(self._relations)):
 *             relations_msg = <Relation>self._relations[i]
 */
      __pyx_r = 0;
      goto __pyx_L0;

      /* "pyrosm_proto.pyx":3406
 *         for i in range(len(self._ways)):
 *             ways_msg = <Way>self._ways[i]
 *             if not ways_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 return False
 *         for i in range(len(self._relations)):
 */
    }
  }

  /* "pyrosm_proto.pyx":3408
 *             if not ways_msg.IsInitialized():
 *                 return False
 *         for i in range(len(self._relations)):             # <<<<<<<<<<<<<<
 *             relations_msg = <Relation>self._relations[i]
 *             if not relations_msg.IsInitialized():
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_relations);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_8 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3408, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "pyrosm_proto.pyx":3409
 *                 return False
 *         for i in range(len(self._relations)):
 *             relations_msg = <Relation>self._relations[i]             # <<<<<<<<<<<<<<
 *             if not relations_msg.IsInitialized():
 *                 return False
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_relations), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_relations_msg, ((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":3410
 *         for i in range(len(self._relations)):
 *             relations_msg = <Relation>self._relations[i]
 *             if not relations_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 return False
 *         for i in range(len(self._changesets)):
 */
    __pyx_t_5 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_relations_msg->__pyx_vtab)->IsInitialized(__pyx_v_relations_msg, 0) != 0)) != 0);
    if (__pyx_t_5) {

      /* "pyrosm_proto.pyx":3411
 *             relations_msg = <Relation>self._relations[i]
 *             if not relations_msg.IsInitialized():
 *                 return False             # <<<<<<<<<<<<<<
 *         for i in range(len(self._changesets)):
 *             changesets_msg = <ChangeSet>self._changesets[i]
 */
      __pyx_r = 0;
      goto __pyx_L0;

      /* "pyrosm_proto.pyx":3410
 *         for i in range(len(self._relations)):
 *             relations_msg = <Relation>self._relations[i]
 *             if not relations_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 return False
 *         for i in range(len(self._changesets)):
 */
    }
  }

  /* "pyrosm_proto.pyx":3412
 *             if not relations_msg.IsInitialized():
 *                 return False
 *         for i in range(len(self._changesets)):             # <<<<<<<<<<<<<<
 *             changesets_msg = <ChangeSet>self._changesets[i]
 *             if not changesets_msg.IsInitialized():
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_changesets);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_8 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3412, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "pyrosm_proto.pyx":3413
 *                 return False
 *         for i in range(len(self._changesets)):
 *             changesets_msg = <ChangeSet>self._changesets[i]             # <<<<<<<<<<<<<<
 *             if not changesets_msg.IsInitialized():
 *                 return False
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_changesets), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_changesets_msg, ((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3414
 *         for i in range(len(self._changesets)):
 *             changesets_msg = <ChangeSet>self._changesets[i]
 *             if not changesets_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
    __pyx_t_5 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_changesets_msg->__pyx_vtab)->IsInitialized(__pyx_v_changesets_msg, 0) != 0)) != 0);
    if (__pyx_t_5) {

      /* "pyrosm_proto.pyx":3415
 *             changesets_msg = <ChangeSet>self._changesets[i]
 *             if not changesets_msg.IsInitialized():
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         return True
 */
      __pyx_r = 0;
      goto __pyx_L0;

      /* "pyrosm_proto.pyx":3414
 *         for i in range(len(self._changesets)):
 *             changesets_msg = <ChangeSet>self._changesets[i]
 *             if not changesets_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
    }
  }

  /* "pyrosm_proto.pyx":3417
 *                 return False
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef void MergeFrom(self, PrimitiveGroup other_msg):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3383
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

  /* 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_WriteUnraisable("pyrosm_proto.PrimitiveGroup.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_nodes_msg);
  __Pyx_XDECREF((PyObject *)__pyx_v_ways_msg);
  __Pyx_XDECREF((PyObject *)__pyx_v_relations_msg);
  __Pyx_XDECREF((PyObject *)__pyx_v_changesets_msg);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_18IsInitialized[] = "\n        Checks if the message is initialized.\n\n        Returns:\n            bool: True if the message is initialized (i.e. all of its required\n                fields are set).\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsInitialized (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_18IsInitialized(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_18IsInitialized(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_12pyrosm_proto_14PrimitiveGroup_IsInitialized(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3383, __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("pyrosm_proto.PrimitiveGroup.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3419
 *         return True
 * 
 *     cpdef void MergeFrom(self, PrimitiveGroup other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveGroup_MergeFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  int __pyx_v_i;
  struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_nodes_elt = 0;
  struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_ways_elt = 0;
  struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_relations_elt = 0;
  struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_changesets_elt = 0;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3419, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_21MergeFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3419, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3432
 *         cdef ChangeSet changesets_elt
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":3433
 * 
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":3432
 *         cdef ChangeSet changesets_elt
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "pyrosm_proto.pyx":3436
 * 
 * 
 *         for i in range(len(other_msg._nodes)):             # <<<<<<<<<<<<<<
 *             nodes_elt = Node()
 *             nodes_elt.MergeFrom(other_msg._nodes[i])
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_nodes);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3436, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __pyx_t_7;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "pyrosm_proto.pyx":3437
 * 
 *         for i in range(len(other_msg._nodes)):
 *             nodes_elt = Node()             # <<<<<<<<<<<<<<
 *             nodes_elt.MergeFrom(other_msg._nodes[i])
 *             list.append(self._nodes, nodes_elt)
 */
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_12pyrosm_proto_Node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_nodes_elt, ((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3438
 *         for i in range(len(other_msg._nodes)):
 *             nodes_elt = Node()
 *             nodes_elt.MergeFrom(other_msg._nodes[i])             # <<<<<<<<<<<<<<
 *             list.append(self._nodes, nodes_elt)
 *         if other_msg._dense is not None and other_msg._dense._is_present_in_parent:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_other_msg->_nodes), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrosm_proto_Node))))) __PYX_ERR(0, 3438, __pyx_L1_error)
    ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_nodes_elt->__pyx_vtab)->MergeFrom(__pyx_v_nodes_elt, ((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_t_1), 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3439
 *             nodes_elt = Node()
 *             nodes_elt.MergeFrom(other_msg._nodes[i])
 *             list.append(self._nodes, nodes_elt)             # <<<<<<<<<<<<<<
 *         if other_msg._dense is not None and other_msg._dense._is_present_in_parent:
 *             if self._dense is None:
 */
    if (unlikely(((PyObject *)__pyx_v_self->_nodes) == Py_None)) {
      PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
      __PYX_ERR(0, 3439, __pyx_L1_error)
    }
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_nodes);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyList_Append(((PyObject*)__pyx_t_1), ((PyObject *)__pyx_v_nodes_elt)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3439, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "pyrosm_proto.pyx":3440
 *             nodes_elt.MergeFrom(other_msg._nodes[i])
 *             list.append(self._nodes, nodes_elt)
 *         if other_msg._dense is not None and other_msg._dense._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             if self._dense is None:
 *                 self._dense = DenseNodes.__new__(DenseNodes)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_other_msg->_dense) != Py_None);
  __pyx_t_11 = (__pyx_t_5 != 0);
  if (__pyx_t_11) {
  } else {
    __pyx_t_6 = __pyx_t_11;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_11 = (__pyx_v_other_msg->_dense->_is_present_in_parent != 0);
  __pyx_t_6 = __pyx_t_11;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":3441
 *             list.append(self._nodes, nodes_elt)
 *         if other_msg._dense is not None and other_msg._dense._is_present_in_parent:
 *             if self._dense is None:             # <<<<<<<<<<<<<<
 *                 self._dense = DenseNodes.__new__(DenseNodes)
 *                 self._dense.reset()
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_dense) == Py_None);
    __pyx_t_11 = (__pyx_t_6 != 0);
    if (__pyx_t_11) {

      /* "pyrosm_proto.pyx":3442
 *         if other_msg._dense is not None and other_msg._dense._is_present_in_parent:
 *             if self._dense is None:
 *                 self._dense = DenseNodes.__new__(DenseNodes)             # <<<<<<<<<<<<<<
 *                 self._dense.reset()
 *                 self._dense._listener = <PyObject *>self
 */
      __pyx_t_1 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_DenseNodes(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_DenseNodes), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3442, __pyx_L1_error)
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
      __Pyx_GOTREF(__pyx_v_self->_dense);
      __Pyx_DECREF(((PyObject *)__pyx_v_self->_dense));
      __pyx_v_self->_dense = ((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyrosm_proto.pyx":3443
 *             if self._dense is None:
 *                 self._dense = DenseNodes.__new__(DenseNodes)
 *                 self._dense.reset()             # <<<<<<<<<<<<<<
 *                 self._dense._listener = <PyObject *>self
 *             self._dense.MergeFrom(other_msg._dense)
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->_dense->__pyx_vtab)->reset(__pyx_v_self->_dense, 0);

      /* "pyrosm_proto.pyx":3444
 *                 self._dense = DenseNodes.__new__(DenseNodes)
 *                 self._dense.reset()
 *                 self._dense._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *             self._dense.MergeFrom(other_msg._dense)
 *         for i in range(len(other_msg._ways)):
 */
      __pyx_v_self->_dense->_listener = ((PyObject *)__pyx_v_self);

      /* "pyrosm_proto.pyx":3441
 *             list.append(self._nodes, nodes_elt)
 *         if other_msg._dense is not None and other_msg._dense._is_present_in_parent:
 *             if self._dense is None:             # <<<<<<<<<<<<<<
 *                 self._dense = DenseNodes.__new__(DenseNodes)
 *                 self._dense.reset()
 */
    }

    /* "pyrosm_proto.pyx":3445
 *                 self._dense.reset()
 *                 self._dense._listener = <PyObject *>self
 *             self._dense.MergeFrom(other_msg._dense)             # <<<<<<<<<<<<<<
 *         for i in range(len(other_msg._ways)):
 *             ways_elt = Way()
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_dense);
    __Pyx_INCREF(__pyx_t_1);
    ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->_dense->__pyx_vtab)->MergeFrom(__pyx_v_self->_dense, ((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_t_1), 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3440
 *             nodes_elt.MergeFrom(other_msg._nodes[i])
 *             list.append(self._nodes, nodes_elt)
 *         if other_msg._dense is not None and other_msg._dense._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             if self._dense is None:
 *                 self._dense = DenseNodes.__new__(DenseNodes)
 */
  }

  /* "pyrosm_proto.pyx":3446
 *                 self._dense._listener = <PyObject *>self
 *             self._dense.MergeFrom(other_msg._dense)
 *         for i in range(len(other_msg._ways)):             # <<<<<<<<<<<<<<
 *             ways_elt = Way()
 *             ways_elt.MergeFrom(other_msg._ways[i])
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_ways);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3446, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __pyx_t_7;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "pyrosm_proto.pyx":3447
 *             self._dense.MergeFrom(other_msg._dense)
 *         for i in range(len(other_msg._ways)):
 *             ways_elt = Way()             # <<<<<<<<<<<<<<
 *             ways_elt.MergeFrom(other_msg._ways[i])
 *             list.append(self._ways, ways_elt)
 */
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_12pyrosm_proto_Way)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_ways_elt, ((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3448
 *         for i in range(len(other_msg._ways)):
 *             ways_elt = Way()
 *             ways_elt.MergeFrom(other_msg._ways[i])             # <<<<<<<<<<<<<<
 *             list.append(self._ways, ways_elt)
 *         for i in range(len(other_msg._relations)):
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_other_msg->_ways), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrosm_proto_Way))))) __PYX_ERR(0, 3448, __pyx_L1_error)
    ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_ways_elt->__pyx_vtab)->MergeFrom(__pyx_v_ways_elt, ((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_t_1), 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3449
 *             ways_elt = Way()
 *             ways_elt.MergeFrom(other_msg._ways[i])
 *             list.append(self._ways, ways_elt)             # <<<<<<<<<<<<<<
 *         for i in range(len(other_msg._relations)):
 *             relations_elt = Relation()
 */
    if (unlikely(((PyObject *)__pyx_v_self->_ways) == Py_None)) {
      PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
      __PYX_ERR(0, 3449, __pyx_L1_error)
    }
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_ways);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyList_Append(((PyObject*)__pyx_t_1), ((PyObject *)__pyx_v_ways_elt)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3449, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "pyrosm_proto.pyx":3450
 *             ways_elt.MergeFrom(other_msg._ways[i])
 *             list.append(self._ways, ways_elt)
 *         for i in range(len(other_msg._relations)):             # <<<<<<<<<<<<<<
 *             relations_elt = Relation()
 *             relations_elt.MergeFrom(other_msg._relations[i])
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_relations);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __pyx_t_7;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "pyrosm_proto.pyx":3451
 *             list.append(self._ways, ways_elt)
 *         for i in range(len(other_msg._relations)):
 *             relations_elt = Relation()             # <<<<<<<<<<<<<<
 *             relations_elt.MergeFrom(other_msg._relations[i])
 *             list.append(self._relations, relations_elt)
 */
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_12pyrosm_proto_Relation)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_relations_elt, ((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3452
 *         for i in range(len(other_msg._relations)):
 *             relations_elt = Relation()
 *             relations_elt.MergeFrom(other_msg._relations[i])             # <<<<<<<<<<<<<<
 *             list.append(self._relations, relations_elt)
 *         for i in range(len(other_msg._changesets)):
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_other_msg->_relations), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrosm_proto_Relation))))) __PYX_ERR(0, 3452, __pyx_L1_error)
    ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_relations_elt->__pyx_vtab)->MergeFrom(__pyx_v_relations_elt, ((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_t_1), 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3453
 *             relations_elt = Relation()
 *             relations_elt.MergeFrom(other_msg._relations[i])
 *             list.append(self._relations, relations_elt)             # <<<<<<<<<<<<<<
 *         for i in range(len(other_msg._changesets)):
 *             changesets_elt = ChangeSet()
 */
    if (unlikely(((PyObject *)__pyx_v_self->_relations) == Py_None)) {
      PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
      __PYX_ERR(0, 3453, __pyx_L1_error)
    }
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_relations);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyList_Append(((PyObject*)__pyx_t_1), ((PyObject *)__pyx_v_relations_elt)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3453, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "pyrosm_proto.pyx":3454
 *             relations_elt.MergeFrom(other_msg._relations[i])
 *             list.append(self._relations, relations_elt)
 *         for i in range(len(other_msg._changesets)):             # <<<<<<<<<<<<<<
 *             changesets_elt = ChangeSet()
 *             changesets_elt.MergeFrom(other_msg._changesets[i])
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_changesets);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3454, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __pyx_t_7;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "pyrosm_proto.pyx":3455
 *             list.append(self._relations, relations_elt)
 *         for i in range(len(other_msg._changesets)):
 *             changesets_elt = ChangeSet()             # <<<<<<<<<<<<<<
 *             changesets_elt.MergeFrom(other_msg._changesets[i])
 *             list.append(self._changesets, changesets_elt)
 */
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_12pyrosm_proto_ChangeSet)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_changesets_elt, ((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3456
 *         for i in range(len(other_msg._changesets)):
 *             changesets_elt = ChangeSet()
 *             changesets_elt.MergeFrom(other_msg._changesets[i])             # <<<<<<<<<<<<<<
 *             list.append(self._changesets, changesets_elt)
 * 
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_other_msg->_changesets), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrosm_proto_ChangeSet))))) __PYX_ERR(0, 3456, __pyx_L1_error)
    ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_changesets_elt->__pyx_vtab)->MergeFrom(__pyx_v_changesets_elt, ((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_t_1), 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3457
 *             changesets_elt = ChangeSet()
 *             changesets_elt.MergeFrom(other_msg._changesets[i])
 *             list.append(self._changesets, changesets_elt)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    if (unlikely(((PyObject *)__pyx_v_self->_changesets) == Py_None)) {
      PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
      __PYX_ERR(0, 3457, __pyx_L1_error)
    }
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_changesets);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyList_Append(((PyObject*)__pyx_t_1), ((PyObject *)__pyx_v_changesets_elt)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3457, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "pyrosm_proto.pyx":3459
 *             list.append(self._changesets, changesets_elt)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3419
 *         return True
 * 
 *     cpdef void MergeFrom(self, PrimitiveGroup other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.PrimitiveGroup.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_nodes_elt);
  __Pyx_XDECREF((PyObject *)__pyx_v_ways_elt);
  __Pyx_XDECREF((PyObject *)__pyx_v_relations_elt);
  __Pyx_XDECREF((PyObject *)__pyx_v_changesets_elt);
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_20MergeFrom[] = "\n        Merges the contents of the specified message into the current message.\n\n        Params:\n            other_msg: Message to merge into the current message.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_PrimitiveGroup, 1, "other_msg", 0))) __PYX_ERR(0, 3419, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_20MergeFrom(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_20MergeFrom(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_14PrimitiveGroup_MergeFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3419, __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("pyrosm_proto.PrimitiveGroup.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3461
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveGroup_MergeFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_MergeFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  unsigned char const *__pyx_t_10;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3461, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_23MergeFromString)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3461, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3461, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3461, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3461, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3461, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3475
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, False)
 */
  __pyx_t_7 = (__pyx_v_size != Py_None);
  if ((__pyx_t_7 != 0)) {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3475, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_8;
  } else {
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3475, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_9;
  }
  __pyx_v_length = __pyx_t_5;

  /* "pyrosm_proto.pyx":3477
 *         length = size if size is not None else len(data)
 * 
 *         buf = self._protobuf_deserialize(data, length, False)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_10 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 3477, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_10, __pyx_v_length, 0);

  /* "pyrosm_proto.pyx":3479
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  __pyx_t_7 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "pyrosm_proto.pyx":3480
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_GIVEREF(__pyx_v_size);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_size);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Truncated_message_got_s_expected, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3480, __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, 3480, __pyx_L1_error)

    /* "pyrosm_proto.pyx":3479
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  }

  /* "pyrosm_proto.pyx":3482
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3484
 *         self._Modified()
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3461
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_22MergeFromString[] = "\n        Merges serialized protocol buffer data into this message.\n\n        Params:\n            data (bytes): a string of binary data.\n            size (int): optional - the length of the data string\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "MergeFromString") < 0)) __PYX_ERR(0, 3461, __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_data = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MergeFromString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3461, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_22MergeFromString(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), __pyx_v_data, __pyx_v_size);

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_22MergeFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_MergeFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_PrimitiveGroup->MergeFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3461, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3486
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_14PrimitiveGroup_ParseFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_ParseFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_reset = ((int)1);
  int __pyx_v_cache = ((int)0);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  unsigned char const *__pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_reset = __pyx_optional_args->reset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cache = __pyx_optional_args->cache;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3486, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_25ParseFromString)) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3486, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3486, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3486, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3486, __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(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3486, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_size);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 3+__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, 3486, __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, 3486, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3502
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         if reset:
 */
  __pyx_t_9 = (__pyx_v_size != Py_None);
  if ((__pyx_t_9 != 0)) {
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3502, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3502, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_11;
  }
  __pyx_v_length = __pyx_t_7;

  /* "pyrosm_proto.pyx":3504
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_9 = (__pyx_v_reset != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":3505
 * 
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":3504
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":3507
 *             self.reset()
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_12 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 3507, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_12, __pyx_v_length, __pyx_v_cache);

  /* "pyrosm_proto.pyx":3509
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  __pyx_t_9 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "pyrosm_proto.pyx":3510
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message")             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s_Truncated_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Truncated_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3510, __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, 3510, __pyx_L1_error)

    /* "pyrosm_proto.pyx":3509
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  }

  /* "pyrosm_proto.pyx":3512
 *             raise DecodeError("Truncated message")
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3514
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  __pyx_t_9 = (__pyx_v_cache != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":3515
 * 
 *         if cache:
 *             self._cached_serialization = data             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) __PYX_ERR(0, 3515, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3514
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  }

  /* "pyrosm_proto.pyx":3517
 *             self._cached_serialization = data
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3486
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_24ParseFromString[] = "\n        Populate the message class from a string of protobuf encoded binary data.\n\n        Params:\n            data (bytes): a string of binary data\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n            cache (bool): optional - whether to cache serialized data\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_v_reset;
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,&__pyx_n_s_cache,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromString") < 0)) __PYX_ERR(0, 3486, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    if (values[2]) {
      __pyx_v_reset = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3486, __pyx_L3_error)
    } else {
      __pyx_v_reset = ((int)1);
    }
    if (values[3]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3486, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromString", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3486, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_24ParseFromString(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset, __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_24ParseFromString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_ParseFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.reset = __pyx_v_reset;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_PrimitiveGroup->ParseFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3486, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3520
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FromString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_26FromString(((PyTypeObject*)__pyx_v_cls), ((PyObject *)__pyx_v_s));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("FromString", 0);

  /* "pyrosm_proto.pyx":3521
 *     @classmethod
 *     def FromString(cls, s):
 *         message = cls()             # <<<<<<<<<<<<<<
 *         message.MergeFromString(s)
 *         return message
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3522
 *     def FromString(cls, s):
 *         message = cls()
 *         message.MergeFromString(s)             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3522, __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;

  /* "pyrosm_proto.pyx":3523
 *         message = cls()
 *         message.MergeFromString(s)
 *         return message             # <<<<<<<<<<<<<<
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3520
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.FromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3525
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # nodes
 */

static void __pyx_f_12pyrosm_proto_14PrimitiveGroup__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_cache) {
  struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_nodes_elt = 0;
  PyObject *__pyx_v_nodes_elt_buf = 0;
  PyObject *__pyx_v_dense_buf = 0;
  struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_ways_elt = 0;
  PyObject *__pyx_v_ways_elt_buf = 0;
  struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_relations_elt = 0;
  PyObject *__pyx_v_relations_elt_buf = 0;
  struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_changesets_elt = 0;
  PyObject *__pyx_v_changesets_elt_buf = 0;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("_protobuf_serialize", 0);
  __Pyx_INCREF(__pyx_v_buf);

  /* "pyrosm_proto.pyx":3530
 *         cdef Node nodes_elt
 *         cdef bytearray nodes_elt_buf
 *         for nodes_elt in self._nodes:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             if nodes_elt._cached_serialization is not None:
 */
  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_nodes))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_nodes))) {
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_nodes); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->_nodes)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3530, __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, 3530, __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, 3530, __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, 3530, __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, 3530, __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, 3530, __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, 3530, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_12pyrosm_proto_Node))))) __PYX_ERR(0, 3530, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_nodes_elt, ((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":3531
 *         cdef bytearray nodes_elt_buf
 *         for nodes_elt in self._nodes:
 *             set_varint64(10, buf)             # <<<<<<<<<<<<<<
 *             if nodes_elt._cached_serialization is not None:
 *                 set_varint64(len(nodes_elt._cached_serialization), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(10, __pyx_v_buf));

    /* "pyrosm_proto.pyx":3532
 *         for nodes_elt in self._nodes:
 *             set_varint64(10, buf)
 *             if nodes_elt._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(nodes_elt._cached_serialization), buf)
 *                 buf += nodes_elt._cached_serialization
 */
    __pyx_t_5 = (__pyx_v_nodes_elt->_cached_serialization != ((PyObject*)Py_None));
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "pyrosm_proto.pyx":3533
 *             set_varint64(10, buf)
 *             if nodes_elt._cached_serialization is not None:
 *                 set_varint64(len(nodes_elt._cached_serialization), buf)             # <<<<<<<<<<<<<<
 *                 buf += nodes_elt._cached_serialization
 *             else:
 */
      __pyx_t_4 = __pyx_v_nodes_elt->_cached_serialization;
      __Pyx_INCREF(__pyx_t_4);
      if (unlikely(__pyx_t_4 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(0, 3533, __pyx_L1_error)
      }
      __pyx_t_7 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3533, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_7, __pyx_v_buf));

      /* "pyrosm_proto.pyx":3534
 *             if nodes_elt._cached_serialization is not None:
 *                 set_varint64(len(nodes_elt._cached_serialization), buf)
 *                 buf += nodes_elt._cached_serialization             # <<<<<<<<<<<<<<
 *             else:
 *                 nodes_elt_buf = bytearray()
 */
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_nodes_elt->_cached_serialization); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3534, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":3532
 *         for nodes_elt in self._nodes:
 *             set_varint64(10, buf)
 *             if nodes_elt._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(nodes_elt._cached_serialization), buf)
 *                 buf += nodes_elt._cached_serialization
 */
      goto __pyx_L5;
    }

    /* "pyrosm_proto.pyx":3536
 *                 buf += nodes_elt._cached_serialization
 *             else:
 *                 nodes_elt_buf = bytearray()             # <<<<<<<<<<<<<<
 *                 nodes_elt._protobuf_serialize(nodes_elt_buf, cache)
 *                 set_varint64(len(nodes_elt_buf), buf)
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_nodes_elt_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":3537
 *             else:
 *                 nodes_elt_buf = bytearray()
 *                 nodes_elt._protobuf_serialize(nodes_elt_buf, cache)             # <<<<<<<<<<<<<<
 *                 set_varint64(len(nodes_elt_buf), buf)
 *                 buf += nodes_elt_buf
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_nodes_elt->__pyx_vtab)->_protobuf_serialize(__pyx_v_nodes_elt, __pyx_v_nodes_elt_buf, __pyx_v_cache);

      /* "pyrosm_proto.pyx":3538
 *                 nodes_elt_buf = bytearray()
 *                 nodes_elt._protobuf_serialize(nodes_elt_buf, cache)
 *                 set_varint64(len(nodes_elt_buf), buf)             # <<<<<<<<<<<<<<
 *                 buf += nodes_elt_buf
 *                 if cache:
 */
      __pyx_t_7 = PyByteArray_GET_SIZE(__pyx_v_nodes_elt_buf); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3538, __pyx_L1_error)
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_7, __pyx_v_buf));

      /* "pyrosm_proto.pyx":3539
 *                 nodes_elt._protobuf_serialize(nodes_elt_buf, cache)
 *                 set_varint64(len(nodes_elt_buf), buf)
 *                 buf += nodes_elt_buf             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     nodes_elt._cached_serialization = bytes(nodes_elt_buf)
 */
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_nodes_elt_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3539, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":3540
 *                 set_varint64(len(nodes_elt_buf), buf)
 *                 buf += nodes_elt_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     nodes_elt._cached_serialization = bytes(nodes_elt_buf)
 *         # dense
 */
      __pyx_t_6 = (__pyx_v_cache != 0);
      if (__pyx_t_6) {

        /* "pyrosm_proto.pyx":3541
 *                 buf += nodes_elt_buf
 *                 if cache:
 *                     nodes_elt._cached_serialization = bytes(nodes_elt_buf)             # <<<<<<<<<<<<<<
 *         # dense
 *         cdef bytearray dense_buf
 */
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_nodes_elt_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3541, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_nodes_elt->_cached_serialization);
        __Pyx_DECREF(__pyx_v_nodes_elt->_cached_serialization);
        __pyx_v_nodes_elt->_cached_serialization = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyrosm_proto.pyx":3540
 *                 set_varint64(len(nodes_elt_buf), buf)
 *                 buf += nodes_elt_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     nodes_elt._cached_serialization = bytes(nodes_elt_buf)
 *         # dense
 */
      }
    }
    __pyx_L5:;

    /* "pyrosm_proto.pyx":3530
 *         cdef Node nodes_elt
 *         cdef bytearray nodes_elt_buf
 *         for nodes_elt in self._nodes:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             if nodes_elt._cached_serialization is not None:
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3544
 *         # dense
 *         cdef bytearray dense_buf
 *         if self._dense is not None and self._dense._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             set_varint64(18, buf)
 *             if self._dense._cached_serialization is not None:
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_dense) != Py_None);
  __pyx_t_8 = (__pyx_t_5 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_self->_dense->_is_present_in_parent != 0);
  __pyx_t_6 = __pyx_t_8;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":3545
 *         cdef bytearray dense_buf
 *         if self._dense is not None and self._dense._is_present_in_parent:
 *             set_varint64(18, buf)             # <<<<<<<<<<<<<<
 *             if self._dense._cached_serialization is not None:
 *                 set_varint64(len(self._dense._cached_serialization), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(18, __pyx_v_buf));

    /* "pyrosm_proto.pyx":3546
 *         if self._dense is not None and self._dense._is_present_in_parent:
 *             set_varint64(18, buf)
 *             if self._dense._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(self._dense._cached_serialization), buf)
 *                 buf += self._dense._cached_serialization
 */
    __pyx_t_6 = (__pyx_v_self->_dense->_cached_serialization != ((PyObject*)Py_None));
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (__pyx_t_8) {

      /* "pyrosm_proto.pyx":3547
 *             set_varint64(18, buf)
 *             if self._dense._cached_serialization is not None:
 *                 set_varint64(len(self._dense._cached_serialization), buf)             # <<<<<<<<<<<<<<
 *                 buf += self._dense._cached_serialization
 *             else:
 */
      __pyx_t_1 = __pyx_v_self->_dense->_cached_serialization;
      __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, 3547, __pyx_L1_error)
      }
      __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3547, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_2, __pyx_v_buf));

      /* "pyrosm_proto.pyx":3548
 *             if self._dense._cached_serialization is not None:
 *                 set_varint64(len(self._dense._cached_serialization), buf)
 *                 buf += self._dense._cached_serialization             # <<<<<<<<<<<<<<
 *             else:
 *                 dense_buf = bytearray()
 */
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_self->_dense->_cached_serialization); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pyrosm_proto.pyx":3546
 *         if self._dense is not None and self._dense._is_present_in_parent:
 *             set_varint64(18, buf)
 *             if self._dense._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(self._dense._cached_serialization), buf)
 *                 buf += self._dense._cached_serialization
 */
      goto __pyx_L10;
    }

    /* "pyrosm_proto.pyx":3550
 *                 buf += self._dense._cached_serialization
 *             else:
 *                 dense_buf = bytearray()             # <<<<<<<<<<<<<<
 *                 self._dense._protobuf_serialize(dense_buf, cache)
 *                 set_varint64(len(dense_buf), buf)
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_dense_buf = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyrosm_proto.pyx":3551
 *             else:
 *                 dense_buf = bytearray()
 *                 self._dense._protobuf_serialize(dense_buf, cache)             # <<<<<<<<<<<<<<
 *                 set_varint64(len(dense_buf), buf)
 *                 buf += dense_buf
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->_dense->__pyx_vtab)->_protobuf_serialize(__pyx_v_self->_dense, __pyx_v_dense_buf, __pyx_v_cache);

      /* "pyrosm_proto.pyx":3552
 *                 dense_buf = bytearray()
 *                 self._dense._protobuf_serialize(dense_buf, cache)
 *                 set_varint64(len(dense_buf), buf)             # <<<<<<<<<<<<<<
 *                 buf += dense_buf
 *                 if cache:
 */
      __pyx_t_2 = PyByteArray_GET_SIZE(__pyx_v_dense_buf); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3552, __pyx_L1_error)
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_2, __pyx_v_buf));

      /* "pyrosm_proto.pyx":3553
 *                 self._dense._protobuf_serialize(dense_buf, cache)
 *                 set_varint64(len(dense_buf), buf)
 *                 buf += dense_buf             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     self._dense._cached_serialization = bytes(dense_buf)
 */
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_dense_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pyrosm_proto.pyx":3554
 *                 set_varint64(len(dense_buf), buf)
 *                 buf += dense_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._dense._cached_serialization = bytes(dense_buf)
 *         # ways
 */
      __pyx_t_8 = (__pyx_v_cache != 0);
      if (__pyx_t_8) {

        /* "pyrosm_proto.pyx":3555
 *                 buf += dense_buf
 *                 if cache:
 *                     self._dense._cached_serialization = bytes(dense_buf)             # <<<<<<<<<<<<<<
 *         # ways
 *         cdef Way ways_elt
 */
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_dense_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3555, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_v_self->_dense->_cached_serialization);
        __Pyx_DECREF(__pyx_v_self->_dense->_cached_serialization);
        __pyx_v_self->_dense->_cached_serialization = ((PyObject*)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyrosm_proto.pyx":3554
 *                 set_varint64(len(dense_buf), buf)
 *                 buf += dense_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._dense._cached_serialization = bytes(dense_buf)
 *         # ways
 */
      }
    }
    __pyx_L10:;

    /* "pyrosm_proto.pyx":3544
 *         # dense
 *         cdef bytearray dense_buf
 *         if self._dense is not None and self._dense._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             set_varint64(18, buf)
 *             if self._dense._cached_serialization is not None:
 */
  }

  /* "pyrosm_proto.pyx":3559
 *         cdef Way ways_elt
 *         cdef bytearray ways_elt_buf
 *         for ways_elt in self._ways:             # <<<<<<<<<<<<<<
 *             set_varint64(26, buf)
 *             if ways_elt._cached_serialization is not None:
 */
  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_ways))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_ways))) {
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_ways); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->_ways)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3559, __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, 3559, __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, 3559, __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, 3559, __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, 3559, __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, 3559, __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, 3559, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_12pyrosm_proto_Way))))) __PYX_ERR(0, 3559, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_ways_elt, ((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":3560
 *         cdef bytearray ways_elt_buf
 *         for ways_elt in self._ways:
 *             set_varint64(26, buf)             # <<<<<<<<<<<<<<
 *             if ways_elt._cached_serialization is not None:
 *                 set_varint64(len(ways_elt._cached_serialization), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(26, __pyx_v_buf));

    /* "pyrosm_proto.pyx":3561
 *         for ways_elt in self._ways:
 *             set_varint64(26, buf)
 *             if ways_elt._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(ways_elt._cached_serialization), buf)
 *                 buf += ways_elt._cached_serialization
 */
    __pyx_t_8 = (__pyx_v_ways_elt->_cached_serialization != ((PyObject*)Py_None));
    __pyx_t_6 = (__pyx_t_8 != 0);
    if (__pyx_t_6) {

      /* "pyrosm_proto.pyx":3562
 *             set_varint64(26, buf)
 *             if ways_elt._cached_serialization is not None:
 *                 set_varint64(len(ways_elt._cached_serialization), buf)             # <<<<<<<<<<<<<<
 *                 buf += ways_elt._cached_serialization
 *             else:
 */
      __pyx_t_4 = __pyx_v_ways_elt->_cached_serialization;
      __Pyx_INCREF(__pyx_t_4);
      if (unlikely(__pyx_t_4 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(0, 3562, __pyx_L1_error)
      }
      __pyx_t_7 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3562, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_7, __pyx_v_buf));

      /* "pyrosm_proto.pyx":3563
 *             if ways_elt._cached_serialization is not None:
 *                 set_varint64(len(ways_elt._cached_serialization), buf)
 *                 buf += ways_elt._cached_serialization             # <<<<<<<<<<<<<<
 *             else:
 *                 ways_elt_buf = bytearray()
 */
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_ways_elt->_cached_serialization); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":3561
 *         for ways_elt in self._ways:
 *             set_varint64(26, buf)
 *             if ways_elt._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(ways_elt._cached_serialization), buf)
 *                 buf += ways_elt._cached_serialization
 */
      goto __pyx_L14;
    }

    /* "pyrosm_proto.pyx":3565
 *                 buf += ways_elt._cached_serialization
 *             else:
 *                 ways_elt_buf = bytearray()             # <<<<<<<<<<<<<<
 *                 ways_elt._protobuf_serialize(ways_elt_buf, cache)
 *                 set_varint64(len(ways_elt_buf), buf)
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3565, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_ways_elt_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":3566
 *             else:
 *                 ways_elt_buf = bytearray()
 *                 ways_elt._protobuf_serialize(ways_elt_buf, cache)             # <<<<<<<<<<<<<<
 *                 set_varint64(len(ways_elt_buf), buf)
 *                 buf += ways_elt_buf
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_ways_elt->__pyx_vtab)->_protobuf_serialize(__pyx_v_ways_elt, __pyx_v_ways_elt_buf, __pyx_v_cache);

      /* "pyrosm_proto.pyx":3567
 *                 ways_elt_buf = bytearray()
 *                 ways_elt._protobuf_serialize(ways_elt_buf, cache)
 *                 set_varint64(len(ways_elt_buf), buf)             # <<<<<<<<<<<<<<
 *                 buf += ways_elt_buf
 *                 if cache:
 */
      __pyx_t_7 = PyByteArray_GET_SIZE(__pyx_v_ways_elt_buf); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3567, __pyx_L1_error)
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_7, __pyx_v_buf));

      /* "pyrosm_proto.pyx":3568
 *                 ways_elt._protobuf_serialize(ways_elt_buf, cache)
 *                 set_varint64(len(ways_elt_buf), buf)
 *                 buf += ways_elt_buf             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     ways_elt._cached_serialization = bytes(ways_elt_buf)
 */
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_ways_elt_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":3569
 *                 set_varint64(len(ways_elt_buf), buf)
 *                 buf += ways_elt_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     ways_elt._cached_serialization = bytes(ways_elt_buf)
 *         # relations
 */
      __pyx_t_6 = (__pyx_v_cache != 0);
      if (__pyx_t_6) {

        /* "pyrosm_proto.pyx":3570
 *                 buf += ways_elt_buf
 *                 if cache:
 *                     ways_elt._cached_serialization = bytes(ways_elt_buf)             # <<<<<<<<<<<<<<
 *         # relations
 *         cdef Relation relations_elt
 */
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_ways_elt_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3570, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_ways_elt->_cached_serialization);
        __Pyx_DECREF(__pyx_v_ways_elt->_cached_serialization);
        __pyx_v_ways_elt->_cached_serialization = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyrosm_proto.pyx":3569
 *                 set_varint64(len(ways_elt_buf), buf)
 *                 buf += ways_elt_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     ways_elt._cached_serialization = bytes(ways_elt_buf)
 *         # relations
 */
      }
    }
    __pyx_L14:;

    /* "pyrosm_proto.pyx":3559
 *         cdef Way ways_elt
 *         cdef bytearray ways_elt_buf
 *         for ways_elt in self._ways:             # <<<<<<<<<<<<<<
 *             set_varint64(26, buf)
 *             if ways_elt._cached_serialization is not None:
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3574
 *         cdef Relation relations_elt
 *         cdef bytearray relations_elt_buf
 *         for relations_elt in self._relations:             # <<<<<<<<<<<<<<
 *             set_varint64(34, buf)
 *             if relations_elt._cached_serialization is not None:
 */
  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_relations))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_relations))) {
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_relations); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->_relations)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3574, __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, 3574, __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, 3574, __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, 3574, __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, 3574, __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, 3574, __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, 3574, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_12pyrosm_proto_Relation))))) __PYX_ERR(0, 3574, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_relations_elt, ((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":3575
 *         cdef bytearray relations_elt_buf
 *         for relations_elt in self._relations:
 *             set_varint64(34, buf)             # <<<<<<<<<<<<<<
 *             if relations_elt._cached_serialization is not None:
 *                 set_varint64(len(relations_elt._cached_serialization), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(34, __pyx_v_buf));

    /* "pyrosm_proto.pyx":3576
 *         for relations_elt in self._relations:
 *             set_varint64(34, buf)
 *             if relations_elt._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(relations_elt._cached_serialization), buf)
 *                 buf += relations_elt._cached_serialization
 */
    __pyx_t_6 = (__pyx_v_relations_elt->_cached_serialization != ((PyObject*)Py_None));
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (__pyx_t_8) {

      /* "pyrosm_proto.pyx":3577
 *             set_varint64(34, buf)
 *             if relations_elt._cached_serialization is not None:
 *                 set_varint64(len(relations_elt._cached_serialization), buf)             # <<<<<<<<<<<<<<
 *                 buf += relations_elt._cached_serialization
 *             else:
 */
      __pyx_t_4 = __pyx_v_relations_elt->_cached_serialization;
      __Pyx_INCREF(__pyx_t_4);
      if (unlikely(__pyx_t_4 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(0, 3577, __pyx_L1_error)
      }
      __pyx_t_7 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_7, __pyx_v_buf));

      /* "pyrosm_proto.pyx":3578
 *             if relations_elt._cached_serialization is not None:
 *                 set_varint64(len(relations_elt._cached_serialization), buf)
 *                 buf += relations_elt._cached_serialization             # <<<<<<<<<<<<<<
 *             else:
 *                 relations_elt_buf = bytearray()
 */
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_relations_elt->_cached_serialization); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3578, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":3576
 *         for relations_elt in self._relations:
 *             set_varint64(34, buf)
 *             if relations_elt._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(relations_elt._cached_serialization), buf)
 *                 buf += relations_elt._cached_serialization
 */
      goto __pyx_L18;
    }

    /* "pyrosm_proto.pyx":3580
 *                 buf += relations_elt._cached_serialization
 *             else:
 *                 relations_elt_buf = bytearray()             # <<<<<<<<<<<<<<
 *                 relations_elt._protobuf_serialize(relations_elt_buf, cache)
 *                 set_varint64(len(relations_elt_buf), buf)
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_relations_elt_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":3581
 *             else:
 *                 relations_elt_buf = bytearray()
 *                 relations_elt._protobuf_serialize(relations_elt_buf, cache)             # <<<<<<<<<<<<<<
 *                 set_varint64(len(relations_elt_buf), buf)
 *                 buf += relations_elt_buf
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_relations_elt->__pyx_vtab)->_protobuf_serialize(__pyx_v_relations_elt, __pyx_v_relations_elt_buf, __pyx_v_cache);

      /* "pyrosm_proto.pyx":3582
 *                 relations_elt_buf = bytearray()
 *                 relations_elt._protobuf_serialize(relations_elt_buf, cache)
 *                 set_varint64(len(relations_elt_buf), buf)             # <<<<<<<<<<<<<<
 *                 buf += relations_elt_buf
 *                 if cache:
 */
      __pyx_t_7 = PyByteArray_GET_SIZE(__pyx_v_relations_elt_buf); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3582, __pyx_L1_error)
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_7, __pyx_v_buf));

      /* "pyrosm_proto.pyx":3583
 *                 relations_elt._protobuf_serialize(relations_elt_buf, cache)
 *                 set_varint64(len(relations_elt_buf), buf)
 *                 buf += relations_elt_buf             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     relations_elt._cached_serialization = bytes(relations_elt_buf)
 */
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_relations_elt_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3583, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":3584
 *                 set_varint64(len(relations_elt_buf), buf)
 *                 buf += relations_elt_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     relations_elt._cached_serialization = bytes(relations_elt_buf)
 *         # changesets
 */
      __pyx_t_8 = (__pyx_v_cache != 0);
      if (__pyx_t_8) {

        /* "pyrosm_proto.pyx":3585
 *                 buf += relations_elt_buf
 *                 if cache:
 *                     relations_elt._cached_serialization = bytes(relations_elt_buf)             # <<<<<<<<<<<<<<
 *         # changesets
 *         cdef ChangeSet changesets_elt
 */
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_relations_elt_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3585, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_relations_elt->_cached_serialization);
        __Pyx_DECREF(__pyx_v_relations_elt->_cached_serialization);
        __pyx_v_relations_elt->_cached_serialization = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyrosm_proto.pyx":3584
 *                 set_varint64(len(relations_elt_buf), buf)
 *                 buf += relations_elt_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     relations_elt._cached_serialization = bytes(relations_elt_buf)
 *         # changesets
 */
      }
    }
    __pyx_L18:;

    /* "pyrosm_proto.pyx":3574
 *         cdef Relation relations_elt
 *         cdef bytearray relations_elt_buf
 *         for relations_elt in self._relations:             # <<<<<<<<<<<<<<
 *             set_varint64(34, buf)
 *             if relations_elt._cached_serialization is not None:
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3589
 *         cdef ChangeSet changesets_elt
 *         cdef bytearray changesets_elt_buf
 *         for changesets_elt in self._changesets:             # <<<<<<<<<<<<<<
 *             set_varint64(42, buf)
 *             if changesets_elt._cached_serialization is not None:
 */
  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_changesets))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_changesets))) {
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_changesets); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->_changesets)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3589, __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, 3589, __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, 3589, __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, 3589, __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, 3589, __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, 3589, __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, 3589, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_12pyrosm_proto_ChangeSet))))) __PYX_ERR(0, 3589, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_changesets_elt, ((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":3590
 *         cdef bytearray changesets_elt_buf
 *         for changesets_elt in self._changesets:
 *             set_varint64(42, buf)             # <<<<<<<<<<<<<<
 *             if changesets_elt._cached_serialization is not None:
 *                 set_varint64(len(changesets_elt._cached_serialization), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(42, __pyx_v_buf));

    /* "pyrosm_proto.pyx":3591
 *         for changesets_elt in self._changesets:
 *             set_varint64(42, buf)
 *             if changesets_elt._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(changesets_elt._cached_serialization), buf)
 *                 buf += changesets_elt._cached_serialization
 */
    __pyx_t_8 = (__pyx_v_changesets_elt->_cached_serialization != ((PyObject*)Py_None));
    __pyx_t_6 = (__pyx_t_8 != 0);
    if (__pyx_t_6) {

      /* "pyrosm_proto.pyx":3592
 *             set_varint64(42, buf)
 *             if changesets_elt._cached_serialization is not None:
 *                 set_varint64(len(changesets_elt._cached_serialization), buf)             # <<<<<<<<<<<<<<
 *                 buf += changesets_elt._cached_serialization
 *             else:
 */
      __pyx_t_4 = __pyx_v_changesets_elt->_cached_serialization;
      __Pyx_INCREF(__pyx_t_4);
      if (unlikely(__pyx_t_4 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(0, 3592, __pyx_L1_error)
      }
      __pyx_t_7 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3592, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_7, __pyx_v_buf));

      /* "pyrosm_proto.pyx":3593
 *             if changesets_elt._cached_serialization is not None:
 *                 set_varint64(len(changesets_elt._cached_serialization), buf)
 *                 buf += changesets_elt._cached_serialization             # <<<<<<<<<<<<<<
 *             else:
 *                 changesets_elt_buf = bytearray()
 */
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_changesets_elt->_cached_serialization); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3593, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":3591
 *         for changesets_elt in self._changesets:
 *             set_varint64(42, buf)
 *             if changesets_elt._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(changesets_elt._cached_serialization), buf)
 *                 buf += changesets_elt._cached_serialization
 */
      goto __pyx_L22;
    }

    /* "pyrosm_proto.pyx":3595
 *                 buf += changesets_elt._cached_serialization
 *             else:
 *                 changesets_elt_buf = bytearray()             # <<<<<<<<<<<<<<
 *                 changesets_elt._protobuf_serialize(changesets_elt_buf, cache)
 *                 set_varint64(len(changesets_elt_buf), buf)
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_changesets_elt_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":3596
 *             else:
 *                 changesets_elt_buf = bytearray()
 *                 changesets_elt._protobuf_serialize(changesets_elt_buf, cache)             # <<<<<<<<<<<<<<
 *                 set_varint64(len(changesets_elt_buf), buf)
 *                 buf += changesets_elt_buf
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_changesets_elt->__pyx_vtab)->_protobuf_serialize(__pyx_v_changesets_elt, __pyx_v_changesets_elt_buf, __pyx_v_cache);

      /* "pyrosm_proto.pyx":3597
 *                 changesets_elt_buf = bytearray()
 *                 changesets_elt._protobuf_serialize(changesets_elt_buf, cache)
 *                 set_varint64(len(changesets_elt_buf), buf)             # <<<<<<<<<<<<<<
 *                 buf += changesets_elt_buf
 *                 if cache:
 */
      __pyx_t_7 = PyByteArray_GET_SIZE(__pyx_v_changesets_elt_buf); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3597, __pyx_L1_error)
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_7, __pyx_v_buf));

      /* "pyrosm_proto.pyx":3598
 *                 changesets_elt._protobuf_serialize(changesets_elt_buf, cache)
 *                 set_varint64(len(changesets_elt_buf), buf)
 *                 buf += changesets_elt_buf             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     changesets_elt._cached_serialization = bytes(changesets_elt_buf)
 */
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_changesets_elt_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyrosm_proto.pyx":3599
 *                 set_varint64(len(changesets_elt_buf), buf)
 *                 buf += changesets_elt_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     changesets_elt._cached_serialization = bytes(changesets_elt_buf)
 * 
 */
      __pyx_t_6 = (__pyx_v_cache != 0);
      if (__pyx_t_6) {

        /* "pyrosm_proto.pyx":3600
 *                 buf += changesets_elt_buf
 *                 if cache:
 *                     changesets_elt._cached_serialization = bytes(changesets_elt_buf)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void _Modified(self):
 */
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_changesets_elt_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3600, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_changesets_elt->_cached_serialization);
        __Pyx_DECREF(__pyx_v_changesets_elt->_cached_serialization);
        __pyx_v_changesets_elt->_cached_serialization = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyrosm_proto.pyx":3599
 *                 set_varint64(len(changesets_elt_buf), buf)
 *                 buf += changesets_elt_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     changesets_elt._cached_serialization = bytes(changesets_elt_buf)
 * 
 */
      }
    }
    __pyx_L22:;

    /* "pyrosm_proto.pyx":3589
 *         cdef ChangeSet changesets_elt
 *         cdef bytearray changesets_elt_buf
 *         for changesets_elt in self._changesets:             # <<<<<<<<<<<<<<
 *             set_varint64(42, buf)
 *             if changesets_elt._cached_serialization is not None:
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3525
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # nodes
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pyrosm_proto.PrimitiveGroup._protobuf_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_nodes_elt);
  __Pyx_XDECREF(__pyx_v_nodes_elt_buf);
  __Pyx_XDECREF(__pyx_v_dense_buf);
  __Pyx_XDECREF((PyObject *)__pyx_v_ways_elt);
  __Pyx_XDECREF(__pyx_v_ways_elt_buf);
  __Pyx_XDECREF((PyObject *)__pyx_v_relations_elt);
  __Pyx_XDECREF(__pyx_v_relations_elt_buf);
  __Pyx_XDECREF((PyObject *)__pyx_v_changesets_elt);
  __Pyx_XDECREF(__pyx_v_changesets_elt_buf);
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_RefNannyFinishContext();
}

/* "pyrosm_proto.pyx":3602
 *                     changesets_elt._cached_serialization = bytes(changesets_elt_buf)
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_14PrimitiveGroup__Modified(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Modified); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3602, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_29_Modified)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3602, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3603
 * 
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":3604
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()             # <<<<<<<<<<<<<<
 *         self._cached_serialization = None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_listener), __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3604, __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;

  /* "pyrosm_proto.pyx":3605
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
  __Pyx_DECREF(__pyx_v_self->_cached_serialization);
  __pyx_v_self->_cached_serialization = ((PyObject*)Py_None);

  /* "pyrosm_proto.pyx":3602
 *                     changesets_elt._cached_serialization = bytes(changesets_elt_buf)
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.PrimitiveGroup._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_Modified (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_28_Modified(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_28_Modified(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_14PrimitiveGroup__Modified(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3602, __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("pyrosm_proto.PrimitiveGroup._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3607
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_14PrimitiveGroup_SerializeToString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_SerializeToString *__pyx_optional_args) {
  int __pyx_v_cache = ((int)0);
  int __pyx_v_i;
  struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_nodes_msg = 0;
  struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_ways_msg = 0;
  struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_relations_msg = 0;
  struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_changesets_msg = 0;
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_out = 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;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cache = __pyx_optional_args->cache;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_31SerializeToString)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3607, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3607, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 3607, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3621
 * 
 * 
 *         if self._dense is not None and self._dense._is_present_in_parent and not self._dense.IsInitialized():             # <<<<<<<<<<<<<<
 *             raise Exception("Message PrimitiveGroup is missing required field: dense")
 *         for i in range(len(self._nodes)):
 */
  __pyx_t_7 = (((PyObject *)__pyx_v_self->_dense) != Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_self->_dense->_is_present_in_parent != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->_dense->__pyx_vtab)->IsInitialized(__pyx_v_self->_dense, 0) != 0)) != 0);
  __pyx_t_6 = __pyx_t_8;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":3622
 * 
 *         if self._dense is not None and self._dense._is_present_in_parent and not self._dense.IsInitialized():
 *             raise Exception("Message PrimitiveGroup is missing required field: dense")             # <<<<<<<<<<<<<<
 *         for i in range(len(self._nodes)):
 *             nodes_msg = <Node>self._nodes[i]
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3622, __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, 3622, __pyx_L1_error)

    /* "pyrosm_proto.pyx":3621
 * 
 * 
 *         if self._dense is not None and self._dense._is_present_in_parent and not self._dense.IsInitialized():             # <<<<<<<<<<<<<<
 *             raise Exception("Message PrimitiveGroup is missing required field: dense")
 *         for i in range(len(self._nodes)):
 */
  }

  /* "pyrosm_proto.pyx":3623
 *         if self._dense is not None and self._dense._is_present_in_parent and not self._dense.IsInitialized():
 *             raise Exception("Message PrimitiveGroup is missing required field: dense")
 *         for i in range(len(self._nodes)):             # <<<<<<<<<<<<<<
 *             nodes_msg = <Node>self._nodes[i]
 *             if not nodes_msg.IsInitialized():
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_nodes);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pyrosm_proto.pyx":3624
 *             raise Exception("Message PrimitiveGroup is missing required field: dense")
 *         for i in range(len(self._nodes)):
 *             nodes_msg = <Node>self._nodes[i]             # <<<<<<<<<<<<<<
 *             if not nodes_msg.IsInitialized():
 *                 raise Exception("Message PrimitiveGroup is missing required field: nodes[%d]" % i)
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_nodes), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_nodes_msg, ((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":3625
 *         for i in range(len(self._nodes)):
 *             nodes_msg = <Node>self._nodes[i]
 *             if not nodes_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 raise Exception("Message PrimitiveGroup is missing required field: nodes[%d]" % i)
 *         for i in range(len(self._ways)):
 */
    __pyx_t_6 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_nodes_msg->__pyx_vtab)->IsInitialized(__pyx_v_nodes_msg, 0) != 0)) != 0);
    if (unlikely(__pyx_t_6)) {

      /* "pyrosm_proto.pyx":3626
 *             nodes_msg = <Node>self._nodes[i]
 *             if not nodes_msg.IsInitialized():
 *                 raise Exception("Message PrimitiveGroup is missing required field: nodes[%d]" % i)             # <<<<<<<<<<<<<<
 *         for i in range(len(self._ways)):
 *             ways_msg = <Way>self._ways[i]
 */
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3626, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Message_PrimitiveGroup_is_missin_2, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3626, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3626, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 3626, __pyx_L1_error)

      /* "pyrosm_proto.pyx":3625
 *         for i in range(len(self._nodes)):
 *             nodes_msg = <Node>self._nodes[i]
 *             if not nodes_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 raise Exception("Message PrimitiveGroup is missing required field: nodes[%d]" % i)
 *         for i in range(len(self._ways)):
 */
    }
  }

  /* "pyrosm_proto.pyx":3627
 *             if not nodes_msg.IsInitialized():
 *                 raise Exception("Message PrimitiveGroup is missing required field: nodes[%d]" % i)
 *         for i in range(len(self._ways)):             # <<<<<<<<<<<<<<
 *             ways_msg = <Way>self._ways[i]
 *             if not ways_msg.IsInitialized():
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_ways);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_9 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3627, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pyrosm_proto.pyx":3628
 *                 raise Exception("Message PrimitiveGroup is missing required field: nodes[%d]" % i)
 *         for i in range(len(self._ways)):
 *             ways_msg = <Way>self._ways[i]             # <<<<<<<<<<<<<<
 *             if not ways_msg.IsInitialized():
 *                 raise Exception("Message PrimitiveGroup is missing required field: ways[%d]" % i)
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_ways), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_ways_msg, ((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3629
 *         for i in range(len(self._ways)):
 *             ways_msg = <Way>self._ways[i]
 *             if not ways_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 raise Exception("Message PrimitiveGroup is missing required field: ways[%d]" % i)
 *         for i in range(len(self._relations)):
 */
    __pyx_t_6 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_ways_msg->__pyx_vtab)->IsInitialized(__pyx_v_ways_msg, 0) != 0)) != 0);
    if (unlikely(__pyx_t_6)) {

      /* "pyrosm_proto.pyx":3630
 *             ways_msg = <Way>self._ways[i]
 *             if not ways_msg.IsInitialized():
 *                 raise Exception("Message PrimitiveGroup is missing required field: ways[%d]" % i)             # <<<<<<<<<<<<<<
 *         for i in range(len(self._relations)):
 *             relations_msg = <Relation>self._relations[i]
 */
      __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3630, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Message_PrimitiveGroup_is_missin_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3630, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3630, __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, 3630, __pyx_L1_error)

      /* "pyrosm_proto.pyx":3629
 *         for i in range(len(self._ways)):
 *             ways_msg = <Way>self._ways[i]
 *             if not ways_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 raise Exception("Message PrimitiveGroup is missing required field: ways[%d]" % i)
 *         for i in range(len(self._relations)):
 */
    }
  }

  /* "pyrosm_proto.pyx":3631
 *             if not ways_msg.IsInitialized():
 *                 raise Exception("Message PrimitiveGroup is missing required field: ways[%d]" % i)
 *         for i in range(len(self._relations)):             # <<<<<<<<<<<<<<
 *             relations_msg = <Relation>self._relations[i]
 *             if not relations_msg.IsInitialized():
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_relations);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3631, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pyrosm_proto.pyx":3632
 *                 raise Exception("Message PrimitiveGroup is missing required field: ways[%d]" % i)
 *         for i in range(len(self._relations)):
 *             relations_msg = <Relation>self._relations[i]             # <<<<<<<<<<<<<<
 *             if not relations_msg.IsInitialized():
 *                 raise Exception("Message PrimitiveGroup is missing required field: relations[%d]" % i)
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_relations), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_relations_msg, ((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":3633
 *         for i in range(len(self._relations)):
 *             relations_msg = <Relation>self._relations[i]
 *             if not relations_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 raise Exception("Message PrimitiveGroup is missing required field: relations[%d]" % i)
 *         for i in range(len(self._changesets)):
 */
    __pyx_t_6 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_relations_msg->__pyx_vtab)->IsInitialized(__pyx_v_relations_msg, 0) != 0)) != 0);
    if (unlikely(__pyx_t_6)) {

      /* "pyrosm_proto.pyx":3634
 *             relations_msg = <Relation>self._relations[i]
 *             if not relations_msg.IsInitialized():
 *                 raise Exception("Message PrimitiveGroup is missing required field: relations[%d]" % i)             # <<<<<<<<<<<<<<
 *         for i in range(len(self._changesets)):
 *             changesets_msg = <ChangeSet>self._changesets[i]
 */
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Message_PrimitiveGroup_is_missin_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 3634, __pyx_L1_error)

      /* "pyrosm_proto.pyx":3633
 *         for i in range(len(self._relations)):
 *             relations_msg = <Relation>self._relations[i]
 *             if not relations_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 raise Exception("Message PrimitiveGroup is missing required field: relations[%d]" % i)
 *         for i in range(len(self._changesets)):
 */
    }
  }

  /* "pyrosm_proto.pyx":3635
 *             if not relations_msg.IsInitialized():
 *                 raise Exception("Message PrimitiveGroup is missing required field: relations[%d]" % i)
 *         for i in range(len(self._changesets)):             # <<<<<<<<<<<<<<
 *             changesets_msg = <ChangeSet>self._changesets[i]
 *             if not changesets_msg.IsInitialized():
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_changesets);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_9 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pyrosm_proto.pyx":3636
 *                 raise Exception("Message PrimitiveGroup is missing required field: relations[%d]" % i)
 *         for i in range(len(self._changesets)):
 *             changesets_msg = <ChangeSet>self._changesets[i]             # <<<<<<<<<<<<<<
 *             if not changesets_msg.IsInitialized():
 *                 raise Exception("Message PrimitiveGroup is missing required field: changesets[%d]" % i)
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_changesets), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_changesets_msg, ((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3637
 *         for i in range(len(self._changesets)):
 *             changesets_msg = <ChangeSet>self._changesets[i]
 *             if not changesets_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 raise Exception("Message PrimitiveGroup is missing required field: changesets[%d]" % i)
 * 
 */
    __pyx_t_6 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_changesets_msg->__pyx_vtab)->IsInitialized(__pyx_v_changesets_msg, 0) != 0)) != 0);
    if (unlikely(__pyx_t_6)) {

      /* "pyrosm_proto.pyx":3638
 *             changesets_msg = <ChangeSet>self._changesets[i]
 *             if not changesets_msg.IsInitialized():
 *                 raise Exception("Message PrimitiveGroup is missing required field: changesets[%d]" % i)             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
      __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3638, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Message_PrimitiveGroup_is_missin_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3638, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3638, __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, 3638, __pyx_L1_error)

      /* "pyrosm_proto.pyx":3637
 *         for i in range(len(self._changesets)):
 *             changesets_msg = <ChangeSet>self._changesets[i]
 *             if not changesets_msg.IsInitialized():             # <<<<<<<<<<<<<<
 *                 raise Exception("Message PrimitiveGroup is missing required field: changesets[%d]" % i)
 * 
 */
    }
  }

  /* "pyrosm_proto.pyx":3640
 *                 raise Exception("Message PrimitiveGroup is missing required field: changesets[%d]" % i)
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_6 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_8 = (__pyx_t_6 != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":3641
 * 
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":3640
 *                 raise Exception("Message PrimitiveGroup is missing required field: changesets[%d]" % i)
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":3643
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3644
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)             # <<<<<<<<<<<<<<
 *         cdef bytes out = bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, __pyx_v_cache);

  /* "pyrosm_proto.pyx":3645
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3647
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  __pyx_t_8 = (__pyx_v_cache != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":3648
 * 
 *         if cache:
 *             self._cached_serialization = out             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = __pyx_v_out;

    /* "pyrosm_proto.pyx":3647
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  }

  /* "pyrosm_proto.pyx":3650
 *             self._cached_serialization = out
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializePartialToString(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3607
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.PrimitiveGroup.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_nodes_msg);
  __Pyx_XDECREF((PyObject *)__pyx_v_ways_msg);
  __Pyx_XDECREF((PyObject *)__pyx_v_relations_msg);
  __Pyx_XDECREF((PyObject *)__pyx_v_changesets_msg);
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_30SerializeToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cache,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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SerializeToString") < 0)) __PYX_ERR(0, 3607, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3607, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("SerializeToString", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3607, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_30SerializeToString(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_30SerializeToString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_SerializeToString __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_PrimitiveGroup->SerializeToString(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3607, __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("pyrosm_proto.PrimitiveGroup.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3652
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_14PrimitiveGroup_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_buf = 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;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_33SerializePartialToString)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3652, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 3652, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3659
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_5 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":3660
 *         """
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":3659
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":3662
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3663
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)             # <<<<<<<<<<<<<<
 *         return bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, 0);

  /* "pyrosm_proto.pyx":3664
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *     def SetInParent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3652
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.PrimitiveGroup.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_32SerializePartialToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_32SerializePartialToString(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_14PrimitiveGroup_SerializePartialToString(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3652, __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("pyrosm_proto.PrimitiveGroup.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3666
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_34SetInParent[] = "\n        Mark this an present in the parent.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_34SetInParent(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_34SetInParent(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent", 0);

  /* "pyrosm_proto.pyx":3670
 *         Mark this an present in the parent.
 *         """
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3666
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3672
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_36ParseFromJson[] = "\n        Populate the message class from a json string.\n\n        Params:\n            data (str): a json string\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromJson (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromJson") < 0)) __PYX_ERR(0, 3672, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    __pyx_v_reset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromJson", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3672, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_36ParseFromJson(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("ParseFromJson", 0);
  __Pyx_INCREF(__pyx_v_size);

  /* "pyrosm_proto.pyx":3681
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3682
 *         """
 *         if size is None:
 *             size = len(data)             # <<<<<<<<<<<<<<
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3682, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":3681
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  }

  /* "pyrosm_proto.pyx":3683
 *         if size is None:
 *             size = len(data)
 *         d = json.loads(data[:size])             # <<<<<<<<<<<<<<
 *         self.ParseFromDict(d, reset)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_json); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_d = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":3684
 *             size = len(data)
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToJson(self, **kwargs):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3684, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3684, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3684, __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_d);
    __Pyx_GIVEREF(__pyx_v_d);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_d);
    __Pyx_INCREF(__pyx_v_reset);
    __Pyx_GIVEREF(__pyx_v_reset);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_reset);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":3672
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3686
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_38SerializeToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializeToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializeToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_38SerializeToJson(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializeToJson", 0);

  /* "pyrosm_proto.pyx":3693
 *             str: a json formatted string
 *         """
 *         d = self.SerializeToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3694
 *         """
 *         d = self.SerializeToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToJson(self, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3686
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.SerializeToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3696
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_40SerializePartialToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializePartialToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializePartialToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_40SerializePartialToJson(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToJson", 0);

  /* "pyrosm_proto.pyx":3703
 *             str: a json formatted string
 *         """
 *         d = self.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3704
 *         """
 *         d = self.SerializePartialToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromDict(self, d, reset=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3696
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.SerializePartialToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3706
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_42ParseFromDict[] = "\n        Populate the message class from a Python dictionary.\n\n        Params:\n            d (dict): a Python dictionary representing the message\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,&__pyx_n_s_reset,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 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_reset);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromDict") < 0)) __PYX_ERR(0, 3706, __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_d = values[0];
    __pyx_v_reset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromDict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3706, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_42ParseFromDict(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), __pyx_v_d, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_nodes_dict = NULL;
  struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_nodes_elt = NULL;
  PyObject *__pyx_v_ways_dict = NULL;
  struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_ways_elt = NULL;
  PyObject *__pyx_v_relations_dict = NULL;
  struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_relations_elt = NULL;
  PyObject *__pyx_v_changesets_dict = NULL;
  struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_changesets_elt = 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;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromDict", 0);

  /* "pyrosm_proto.pyx":3714
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reset); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3714, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":3715
 *         """
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         assert type(d) == dict
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":3714
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":3717
 *             self.reset()
 * 
 *         assert type(d) == dict             # <<<<<<<<<<<<<<
 *         try:
 *             for nodes_dict in d["nodes"]:
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_d)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3717, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3717, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 3717, __pyx_L1_error)
    }
  }
  #endif

  /* "pyrosm_proto.pyx":3718
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             for nodes_dict in d["nodes"]:
 *                 nodes_elt = Node()
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":3719
 *         assert type(d) == dict
 *         try:
 *             for nodes_dict in d["nodes"]:             # <<<<<<<<<<<<<<
 *                 nodes_elt = Node()
 *                 nodes_elt.ParseFromDict(nodes_dict)
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_nodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3719, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
        __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0;
        __pyx_t_8 = NULL;
      } else {
        __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3719, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3719, __pyx_L4_error)
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      for (;;) {
        if (likely(!__pyx_t_8)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3719, __pyx_L4_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3719, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3719, __pyx_L4_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3719, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_8(__pyx_t_6);
          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, 3719, __pyx_L4_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_v_nodes_dict, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyrosm_proto.pyx":3720
 *         try:
 *             for nodes_dict in d["nodes"]:
 *                 nodes_elt = Node()             # <<<<<<<<<<<<<<
 *                 nodes_elt.ParseFromDict(nodes_dict)
 *                 self.nodes.append(nodes_elt)
 */
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_12pyrosm_proto_Node)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3720, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_nodes_elt, ((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyrosm_proto.pyx":3721
 *             for nodes_dict in d["nodes"]:
 *                 nodes_elt = Node()
 *                 nodes_elt.ParseFromDict(nodes_dict)             # <<<<<<<<<<<<<<
 *                 self.nodes.append(nodes_elt)
 *         except KeyError:
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_nodes_elt), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3721, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_nodes_dict) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_nodes_dict);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3721, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyrosm_proto.pyx":3722
 *                 nodes_elt = Node()
 *                 nodes_elt.ParseFromDict(nodes_dict)
 *                 self.nodes.append(nodes_elt)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3722, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_2, ((PyObject *)__pyx_v_nodes_elt)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 3722, __pyx_L4_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyrosm_proto.pyx":3719
 *         assert type(d) == dict
 *         try:
 *             for nodes_dict in d["nodes"]:             # <<<<<<<<<<<<<<
 *                 nodes_elt = Node()
 *                 nodes_elt.ParseFromDict(nodes_dict)
 */
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "pyrosm_proto.pyx":3718
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             for nodes_dict in d["nodes"]:
 *                 nodes_elt = Node()
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":3723
 *                 nodes_elt.ParseFromDict(nodes_dict)
 *                 self.nodes.append(nodes_elt)
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_12) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":3718
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             for nodes_dict in d["nodes"]:
 *                 nodes_elt = Node()
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":3725
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.dense.ParseFromDict(d["dense"])
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":3726
 *             pass
 *         try:
 *             self.dense.ParseFromDict(d["dense"])             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dense); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3726, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3726, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_dense); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3726, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_2);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3726, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "pyrosm_proto.pyx":3725
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.dense.ParseFromDict(d["dense"])
 *         except KeyError:
 */
    }
    __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_L17_try_end;
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":3727
 *         try:
 *             self.dense.ParseFromDict(d["dense"])
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_12) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L13_exception_handled;
    }
    goto __pyx_L14_except_error;
    __pyx_L14_except_error:;

    /* "pyrosm_proto.pyx":3725
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.dense.ParseFromDict(d["dense"])
 *         except KeyError:
 */
    __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_L13_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_L17_try_end:;
  }

  /* "pyrosm_proto.pyx":3729
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             for ways_dict in d["ways"]:
 *                 ways_elt = Way()
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":3730
 *             pass
 *         try:
 *             for ways_dict in d["ways"]:             # <<<<<<<<<<<<<<
 *                 ways_elt = Way()
 *                 ways_elt.ParseFromDict(ways_dict)
 */
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_ways); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3730, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
        __pyx_t_9 = __pyx_t_6; __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = 0;
        __pyx_t_8 = NULL;
      } else {
        __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3730, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3730, __pyx_L18_error)
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      for (;;) {
        if (likely(!__pyx_t_8)) {
          if (likely(PyList_CheckExact(__pyx_t_9))) {
            if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_9)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3730, __pyx_L18_error)
            #else
            __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3730, __pyx_L18_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          } else {
            if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3730, __pyx_L18_error)
            #else
            __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3730, __pyx_L18_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          }
        } else {
          __pyx_t_6 = __pyx_t_8(__pyx_t_9);
          if (unlikely(!__pyx_t_6)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 3730, __pyx_L18_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_6);
        }
        __Pyx_XDECREF_SET(__pyx_v_ways_dict, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "pyrosm_proto.pyx":3731
 *         try:
 *             for ways_dict in d["ways"]:
 *                 ways_elt = Way()             # <<<<<<<<<<<<<<
 *                 ways_elt.ParseFromDict(ways_dict)
 *                 self.ways.append(ways_elt)
 */
        __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_12pyrosm_proto_Way)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3731, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_XDECREF_SET(__pyx_v_ways_elt, ((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_t_6));
        __pyx_t_6 = 0;

        /* "pyrosm_proto.pyx":3732
 *             for ways_dict in d["ways"]:
 *                 ways_elt = Way()
 *                 ways_elt.ParseFromDict(ways_dict)             # <<<<<<<<<<<<<<
 *                 self.ways.append(ways_elt)
 *         except KeyError:
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ways_elt), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3732, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_10, __pyx_v_ways_dict) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_ways_dict);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3732, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "pyrosm_proto.pyx":3733
 *                 ways_elt = Way()
 *                 ways_elt.ParseFromDict(ways_dict)
 *                 self.ways.append(ways_elt)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ways); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3733, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_6, ((PyObject *)__pyx_v_ways_elt)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 3733, __pyx_L18_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "pyrosm_proto.pyx":3730
 *             pass
 *         try:
 *             for ways_dict in d["ways"]:             # <<<<<<<<<<<<<<
 *                 ways_elt = Way()
 *                 ways_elt.ParseFromDict(ways_dict)
 */
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "pyrosm_proto.pyx":3729
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             for ways_dict in d["ways"]:
 *                 ways_elt = Way()
 */
    }
    __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_L23_try_end;
    __pyx_L18_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":3734
 *                 ways_elt.ParseFromDict(ways_dict)
 *                 self.ways.append(ways_elt)
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_12) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L19_exception_handled;
    }
    goto __pyx_L20_except_error;
    __pyx_L20_except_error:;

    /* "pyrosm_proto.pyx":3729
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             for ways_dict in d["ways"]:
 *                 ways_elt = Way()
 */
    __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_L19_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_L23_try_end:;
  }

  /* "pyrosm_proto.pyx":3736
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             for relations_dict in d["relations"]:
 *                 relations_elt = Relation()
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":3737
 *             pass
 *         try:
 *             for relations_dict in d["relations"]:             # <<<<<<<<<<<<<<
 *                 relations_elt = Relation()
 *                 relations_elt.ParseFromDict(relations_dict)
 */
      __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_relations); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3737, __pyx_L26_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
        __pyx_t_6 = __pyx_t_9; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0;
        __pyx_t_8 = NULL;
      } else {
        __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3737, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3737, __pyx_L26_error)
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      for (;;) {
        if (likely(!__pyx_t_8)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3737, __pyx_L26_error)
            #else
            __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3737, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_9);
            #endif
          } else {
            if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3737, __pyx_L26_error)
            #else
            __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3737, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_9);
            #endif
          }
        } else {
          __pyx_t_9 = __pyx_t_8(__pyx_t_6);
          if (unlikely(!__pyx_t_9)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 3737, __pyx_L26_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_9);
        }
        __Pyx_XDECREF_SET(__pyx_v_relations_dict, __pyx_t_9);
        __pyx_t_9 = 0;

        /* "pyrosm_proto.pyx":3738
 *         try:
 *             for relations_dict in d["relations"]:
 *                 relations_elt = Relation()             # <<<<<<<<<<<<<<
 *                 relations_elt.ParseFromDict(relations_dict)
 *                 self.relations.append(relations_elt)
 */
        __pyx_t_9 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_12pyrosm_proto_Relation)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3738, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_XDECREF_SET(__pyx_v_relations_elt, ((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_t_9));
        __pyx_t_9 = 0;

        /* "pyrosm_proto.pyx":3739
 *             for relations_dict in d["relations"]:
 *                 relations_elt = Relation()
 *                 relations_elt.ParseFromDict(relations_dict)             # <<<<<<<<<<<<<<
 *                 self.relations.append(relations_elt)
 *         except KeyError:
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_relations_elt), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3739, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_10, __pyx_v_relations_dict) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_relations_dict);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3739, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "pyrosm_proto.pyx":3740
 *                 relations_elt = Relation()
 *                 relations_elt.ParseFromDict(relations_dict)
 *                 self.relations.append(relations_elt)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_relations); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3740, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_9, ((PyObject *)__pyx_v_relations_elt)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 3740, __pyx_L26_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "pyrosm_proto.pyx":3737
 *             pass
 *         try:
 *             for relations_dict in d["relations"]:             # <<<<<<<<<<<<<<
 *                 relations_elt = Relation()
 *                 relations_elt.ParseFromDict(relations_dict)
 */
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "pyrosm_proto.pyx":3736
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             for relations_dict in d["relations"]:
 *                 relations_elt = Relation()
 */
    }
    __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_L31_try_end;
    __pyx_L26_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":3741
 *                 relations_elt.ParseFromDict(relations_dict)
 *                 self.relations.append(relations_elt)
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_12) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L27_exception_handled;
    }
    goto __pyx_L28_except_error;
    __pyx_L28_except_error:;

    /* "pyrosm_proto.pyx":3736
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             for relations_dict in d["relations"]:
 *                 relations_elt = Relation()
 */
    __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_L27_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_L31_try_end:;
  }

  /* "pyrosm_proto.pyx":3743
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             for changesets_dict in d["changesets"]:
 *                 changesets_elt = ChangeSet()
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":3744
 *             pass
 *         try:
 *             for changesets_dict in d["changesets"]:             # <<<<<<<<<<<<<<
 *                 changesets_elt = ChangeSet()
 *                 changesets_elt.ParseFromDict(changesets_dict)
 */
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_changesets); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3744, __pyx_L34_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
        __pyx_t_9 = __pyx_t_6; __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = 0;
        __pyx_t_8 = NULL;
      } else {
        __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3744, __pyx_L34_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3744, __pyx_L34_error)
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      for (;;) {
        if (likely(!__pyx_t_8)) {
          if (likely(PyList_CheckExact(__pyx_t_9))) {
            if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_9)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3744, __pyx_L34_error)
            #else
            __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3744, __pyx_L34_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          } else {
            if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3744, __pyx_L34_error)
            #else
            __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3744, __pyx_L34_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          }
        } else {
          __pyx_t_6 = __pyx_t_8(__pyx_t_9);
          if (unlikely(!__pyx_t_6)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 3744, __pyx_L34_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_6);
        }
        __Pyx_XDECREF_SET(__pyx_v_changesets_dict, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "pyrosm_proto.pyx":3745
 *         try:
 *             for changesets_dict in d["changesets"]:
 *                 changesets_elt = ChangeSet()             # <<<<<<<<<<<<<<
 *                 changesets_elt.ParseFromDict(changesets_dict)
 *                 self.changesets.append(changesets_elt)
 */
        __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_12pyrosm_proto_ChangeSet)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3745, __pyx_L34_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_XDECREF_SET(__pyx_v_changesets_elt, ((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_t_6));
        __pyx_t_6 = 0;

        /* "pyrosm_proto.pyx":3746
 *             for changesets_dict in d["changesets"]:
 *                 changesets_elt = ChangeSet()
 *                 changesets_elt.ParseFromDict(changesets_dict)             # <<<<<<<<<<<<<<
 *                 self.changesets.append(changesets_elt)
 *         except KeyError:
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_changesets_elt), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3746, __pyx_L34_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_10, __pyx_v_changesets_dict) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_changesets_dict);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3746, __pyx_L34_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "pyrosm_proto.pyx":3747
 *                 changesets_elt = ChangeSet()
 *                 changesets_elt.ParseFromDict(changesets_dict)
 *                 self.changesets.append(changesets_elt)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_changesets); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3747, __pyx_L34_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_6, ((PyObject *)__pyx_v_changesets_elt)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 3747, __pyx_L34_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "pyrosm_proto.pyx":3744
 *             pass
 *         try:
 *             for changesets_dict in d["changesets"]:             # <<<<<<<<<<<<<<
 *                 changesets_elt = ChangeSet()
 *                 changesets_elt.ParseFromDict(changesets_dict)
 */
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "pyrosm_proto.pyx":3743
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             for changesets_dict in d["changesets"]:
 *                 changesets_elt = ChangeSet()
 */
    }
    __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_L39_try_end;
    __pyx_L34_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":3748
 *                 changesets_elt.ParseFromDict(changesets_dict)
 *                 self.changesets.append(changesets_elt)
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_12) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L35_exception_handled;
    }
    goto __pyx_L36_except_error;
    __pyx_L36_except_error:;

    /* "pyrosm_proto.pyx":3743
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             for changesets_dict in d["changesets"]:
 *                 changesets_elt = ChangeSet()
 */
    __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_L35_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_L39_try_end:;
  }

  /* "pyrosm_proto.pyx":3751
 *             pass
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3753
 *         self._Modified()
 * 
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3706
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nodes_dict);
  __Pyx_XDECREF((PyObject *)__pyx_v_nodes_elt);
  __Pyx_XDECREF(__pyx_v_ways_dict);
  __Pyx_XDECREF((PyObject *)__pyx_v_ways_elt);
  __Pyx_XDECREF(__pyx_v_relations_dict);
  __Pyx_XDECREF((PyObject *)__pyx_v_relations_elt);
  __Pyx_XDECREF(__pyx_v_changesets_dict);
  __Pyx_XDECREF((PyObject *)__pyx_v_changesets_elt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3755
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_44SerializeToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_44SerializeToDict(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_dense_dict = NULL;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("SerializeToDict", 0);

  /* "pyrosm_proto.pyx":3762
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if len(self.nodes) > 0:
 *             out["nodes"] = [m.SerializeToDict() for m in self.nodes]
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3763
 *         """
 *         out = {}
 *         if len(self.nodes) > 0:             # <<<<<<<<<<<<<<
 *             out["nodes"] = [m.SerializeToDict() for m in self.nodes]
 *         dense_dict = self.dense.SerializeToDict()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":3764
 *         out = {}
 *         if len(self.nodes) > 0:
 *             out["nodes"] = [m.SerializeToDict() for m in self.nodes]             # <<<<<<<<<<<<<<
 *         dense_dict = self.dense.SerializeToDict()
 *         if dense_dict != {}:
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nodes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_2 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3764, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3764, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3764, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3764, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3764, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_6(__pyx_t_5);
        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, 3764, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 3764, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_nodes, __pyx_t_1) < 0)) __PYX_ERR(0, 3764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3763
 *         """
 *         out = {}
 *         if len(self.nodes) > 0:             # <<<<<<<<<<<<<<
 *             out["nodes"] = [m.SerializeToDict() for m in self.nodes]
 *         dense_dict = self.dense.SerializeToDict()
 */
  }

  /* "pyrosm_proto.pyx":3765
 *         if len(self.nodes) > 0:
 *             out["nodes"] = [m.SerializeToDict() for m in self.nodes]
 *         dense_dict = self.dense.SerializeToDict()             # <<<<<<<<<<<<<<
 *         if dense_dict != {}:
 *             out["dense"] = dense_dict
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dense); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_dense_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3766
 *             out["nodes"] = [m.SerializeToDict() for m in self.nodes]
 *         dense_dict = self.dense.SerializeToDict()
 *         if dense_dict != {}:             # <<<<<<<<<<<<<<
 *             out["dense"] = dense_dict
 *         if len(self.ways) > 0:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_dense_dict, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":3767
 *         dense_dict = self.dense.SerializeToDict()
 *         if dense_dict != {}:
 *             out["dense"] = dense_dict             # <<<<<<<<<<<<<<
 *         if len(self.ways) > 0:
 *             out["ways"] = [m.SerializeToDict() for m in self.ways]
 */
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_dense, __pyx_v_dense_dict) < 0)) __PYX_ERR(0, 3767, __pyx_L1_error)

    /* "pyrosm_proto.pyx":3766
 *             out["nodes"] = [m.SerializeToDict() for m in self.nodes]
 *         dense_dict = self.dense.SerializeToDict()
 *         if dense_dict != {}:             # <<<<<<<<<<<<<<
 *             out["dense"] = dense_dict
 *         if len(self.ways) > 0:
 */
  }

  /* "pyrosm_proto.pyx":3768
 *         if dense_dict != {}:
 *             out["dense"] = dense_dict
 *         if len(self.ways) > 0:             # <<<<<<<<<<<<<<
 *             out["ways"] = [m.SerializeToDict() for m in self.ways]
 *         if len(self.relations) > 0:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ways); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3768, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":3769
 *             out["dense"] = dense_dict
 *         if len(self.ways) > 0:
 *             out["ways"] = [m.SerializeToDict() for m in self.ways]             # <<<<<<<<<<<<<<
 *         if len(self.relations) > 0:
 *             out["relations"] = [m.SerializeToDict() for m in self.relations]
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ways); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_2 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3769, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3769, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3769, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3769, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3769, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_6(__pyx_t_5);
        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, 3769, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 3769, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_ways, __pyx_t_4) < 0)) __PYX_ERR(0, 3769, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":3768
 *         if dense_dict != {}:
 *             out["dense"] = dense_dict
 *         if len(self.ways) > 0:             # <<<<<<<<<<<<<<
 *             out["ways"] = [m.SerializeToDict() for m in self.ways]
 *         if len(self.relations) > 0:
 */
  }

  /* "pyrosm_proto.pyx":3770
 *         if len(self.ways) > 0:
 *             out["ways"] = [m.SerializeToDict() for m in self.ways]
 *         if len(self.relations) > 0:             # <<<<<<<<<<<<<<
 *             out["relations"] = [m.SerializeToDict() for m in self.relations]
 *         if len(self.changesets) > 0:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_relations); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3770, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":3771
 *             out["ways"] = [m.SerializeToDict() for m in self.ways]
 *         if len(self.relations) > 0:
 *             out["relations"] = [m.SerializeToDict() for m in self.relations]             # <<<<<<<<<<<<<<
 *         if len(self.changesets) > 0:
 *             out["changesets"] = [m.SerializeToDict() for m in self.changesets]
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_relations); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
      __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3771, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        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_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3771, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3771, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3771, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3771, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_6(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 3771, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 3771, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_relations, __pyx_t_4) < 0)) __PYX_ERR(0, 3771, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":3770
 *         if len(self.ways) > 0:
 *             out["ways"] = [m.SerializeToDict() for m in self.ways]
 *         if len(self.relations) > 0:             # <<<<<<<<<<<<<<
 *             out["relations"] = [m.SerializeToDict() for m in self.relations]
 *         if len(self.changesets) > 0:
 */
  }

  /* "pyrosm_proto.pyx":3772
 *         if len(self.relations) > 0:
 *             out["relations"] = [m.SerializeToDict() for m in self.relations]
 *         if len(self.changesets) > 0:             # <<<<<<<<<<<<<<
 *             out["changesets"] = [m.SerializeToDict() for m in self.changesets]
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_changesets); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":3773
 *             out["relations"] = [m.SerializeToDict() for m in self.relations]
 *         if len(self.changesets) > 0:
 *             out["changesets"] = [m.SerializeToDict() for m in self.changesets]             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_changesets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_2 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3773, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3773, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3773, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3773, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3773, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_6(__pyx_t_5);
        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, 3773, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 3773, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_changesets, __pyx_t_4) < 0)) __PYX_ERR(0, 3773, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":3772
 *         if len(self.relations) > 0:
 *             out["relations"] = [m.SerializeToDict() for m in self.relations]
 *         if len(self.changesets) > 0:             # <<<<<<<<<<<<<<
 *             out["changesets"] = [m.SerializeToDict() for m in self.changesets]
 * 
 */
  }

  /* "pyrosm_proto.pyx":3775
 *             out["changesets"] = [m.SerializeToDict() for m in self.changesets]
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3755
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.SerializeToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_dense_dict);
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3777
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_46SerializePartialToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_46SerializePartialToDict(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_dense_dict = NULL;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToDict", 0);

  /* "pyrosm_proto.pyx":3784
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if len(self.nodes) > 0:
 *             out["nodes"] = [m.SerializePartialToDict() for m in self.nodes]
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3785
 *         """
 *         out = {}
 *         if len(self.nodes) > 0:             # <<<<<<<<<<<<<<
 *             out["nodes"] = [m.SerializePartialToDict() for m in self.nodes]
 *         dense_dict = self.dense.SerializePartialToDict()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3785, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":3786
 *         out = {}
 *         if len(self.nodes) > 0:
 *             out["nodes"] = [m.SerializePartialToDict() for m in self.nodes]             # <<<<<<<<<<<<<<
 *         dense_dict = self.dense.SerializePartialToDict()
 *         if dense_dict != {}:
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nodes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_2 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3786, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3786, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3786, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3786, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3786, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3786, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_6(__pyx_t_5);
        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, 3786, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3786, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3786, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 3786, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_nodes, __pyx_t_1) < 0)) __PYX_ERR(0, 3786, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3785
 *         """
 *         out = {}
 *         if len(self.nodes) > 0:             # <<<<<<<<<<<<<<
 *             out["nodes"] = [m.SerializePartialToDict() for m in self.nodes]
 *         dense_dict = self.dense.SerializePartialToDict()
 */
  }

  /* "pyrosm_proto.pyx":3787
 *         if len(self.nodes) > 0:
 *             out["nodes"] = [m.SerializePartialToDict() for m in self.nodes]
 *         dense_dict = self.dense.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         if dense_dict != {}:
 *             out["dense"] = dense_dict
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dense); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_dense_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3788
 *             out["nodes"] = [m.SerializePartialToDict() for m in self.nodes]
 *         dense_dict = self.dense.SerializePartialToDict()
 *         if dense_dict != {}:             # <<<<<<<<<<<<<<
 *             out["dense"] = dense_dict
 *         if len(self.ways) > 0:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_dense_dict, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":3789
 *         dense_dict = self.dense.SerializePartialToDict()
 *         if dense_dict != {}:
 *             out["dense"] = dense_dict             # <<<<<<<<<<<<<<
 *         if len(self.ways) > 0:
 *             out["ways"] = [m.SerializePartialToDict() for m in self.ways]
 */
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_dense, __pyx_v_dense_dict) < 0)) __PYX_ERR(0, 3789, __pyx_L1_error)

    /* "pyrosm_proto.pyx":3788
 *             out["nodes"] = [m.SerializePartialToDict() for m in self.nodes]
 *         dense_dict = self.dense.SerializePartialToDict()
 *         if dense_dict != {}:             # <<<<<<<<<<<<<<
 *             out["dense"] = dense_dict
 *         if len(self.ways) > 0:
 */
  }

  /* "pyrosm_proto.pyx":3790
 *         if dense_dict != {}:
 *             out["dense"] = dense_dict
 *         if len(self.ways) > 0:             # <<<<<<<<<<<<<<
 *             out["ways"] = [m.SerializePartialToDict() for m in self.ways]
 *         if len(self.relations) > 0:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ways); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":3791
 *             out["dense"] = dense_dict
 *         if len(self.ways) > 0:
 *             out["ways"] = [m.SerializePartialToDict() for m in self.ways]             # <<<<<<<<<<<<<<
 *         if len(self.relations) > 0:
 *             out["relations"] = [m.SerializePartialToDict() for m in self.relations]
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ways); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_2 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3791, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3791, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3791, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3791, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3791, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3791, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_6(__pyx_t_5);
        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, 3791, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3791, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3791, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 3791, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_ways, __pyx_t_4) < 0)) __PYX_ERR(0, 3791, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":3790
 *         if dense_dict != {}:
 *             out["dense"] = dense_dict
 *         if len(self.ways) > 0:             # <<<<<<<<<<<<<<
 *             out["ways"] = [m.SerializePartialToDict() for m in self.ways]
 *         if len(self.relations) > 0:
 */
  }

  /* "pyrosm_proto.pyx":3792
 *         if len(self.ways) > 0:
 *             out["ways"] = [m.SerializePartialToDict() for m in self.ways]
 *         if len(self.relations) > 0:             # <<<<<<<<<<<<<<
 *             out["relations"] = [m.SerializePartialToDict() for m in self.relations]
 *         if len(self.changesets) > 0:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_relations); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":3793
 *             out["ways"] = [m.SerializePartialToDict() for m in self.ways]
 *         if len(self.relations) > 0:
 *             out["relations"] = [m.SerializePartialToDict() for m in self.relations]             # <<<<<<<<<<<<<<
 *         if len(self.changesets) > 0:
 *             out["changesets"] = [m.SerializePartialToDict() for m in self.changesets]
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_relations); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
      __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3793, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        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_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3793, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3793, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3793, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3793, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_6(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 3793, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 3793, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_relations, __pyx_t_4) < 0)) __PYX_ERR(0, 3793, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":3792
 *         if len(self.ways) > 0:
 *             out["ways"] = [m.SerializePartialToDict() for m in self.ways]
 *         if len(self.relations) > 0:             # <<<<<<<<<<<<<<
 *             out["relations"] = [m.SerializePartialToDict() for m in self.relations]
 *         if len(self.changesets) > 0:
 */
  }

  /* "pyrosm_proto.pyx":3794
 *         if len(self.relations) > 0:
 *             out["relations"] = [m.SerializePartialToDict() for m in self.relations]
 *         if len(self.changesets) > 0:             # <<<<<<<<<<<<<<
 *             out["changesets"] = [m.SerializePartialToDict() for m in self.changesets]
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_changesets); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3794, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":3795
 *             out["relations"] = [m.SerializePartialToDict() for m in self.relations]
 *         if len(self.changesets) > 0:
 *             out["changesets"] = [m.SerializePartialToDict() for m in self.changesets]             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_changesets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_2 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3795, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3795, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3795, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3795, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3795, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_6(__pyx_t_5);
        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, 3795, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 3795, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_changesets, __pyx_t_4) < 0)) __PYX_ERR(0, 3795, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":3794
 *         if len(self.relations) > 0:
 *             out["relations"] = [m.SerializePartialToDict() for m in self.relations]
 *         if len(self.changesets) > 0:             # <<<<<<<<<<<<<<
 *             out["changesets"] = [m.SerializePartialToDict() for m in self.changesets]
 * 
 */
  }

  /* "pyrosm_proto.pyx":3797
 *             out["changesets"] = [m.SerializePartialToDict() for m in self.changesets]
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def Items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3777
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.SerializePartialToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_dense_dict);
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveGroup_50generator20(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":3799
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_48Items[] = "\n        Iterator over the field names and values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_48Items(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_48Items(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_20_Items(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_20_Items, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 3799, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_14PrimitiveGroup_50generator20, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Items, __pyx_n_s_PrimitiveGroup_Items, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 3799, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveGroup_50generator20(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3799, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3806
 *             iterator
 *         """
 *         yield 'nodes', self.nodes             # <<<<<<<<<<<<<<
 *         yield 'dense', self.dense
 *         yield 'ways', self.ways
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_nodes);
  __Pyx_GIVEREF(__pyx_n_s_nodes);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_nodes);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3806, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3807
 *         """
 *         yield 'nodes', self.nodes
 *         yield 'dense', self.dense             # <<<<<<<<<<<<<<
 *         yield 'ways', self.ways
 *         yield 'relations', self.relations
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_dense); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_dense);
  __Pyx_GIVEREF(__pyx_n_s_dense);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_dense);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3807, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3808
 *         yield 'nodes', self.nodes
 *         yield 'dense', self.dense
 *         yield 'ways', self.ways             # <<<<<<<<<<<<<<
 *         yield 'relations', self.relations
 *         yield 'changesets', self.changesets
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_ways); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_ways);
  __Pyx_GIVEREF(__pyx_n_s_ways);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ways);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3808, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3809
 *         yield 'dense', self.dense
 *         yield 'ways', self.ways
 *         yield 'relations', self.relations             # <<<<<<<<<<<<<<
 *         yield 'changesets', self.changesets
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_relations); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_relations);
  __Pyx_GIVEREF(__pyx_n_s_relations);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_relations);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3809, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3810
 *         yield 'ways', self.ways
 *         yield 'relations', self.relations
 *         yield 'changesets', self.changesets             # <<<<<<<<<<<<<<
 * 
 *     def Fields(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_changesets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_changesets);
  __Pyx_GIVEREF(__pyx_n_s_changesets);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_changesets);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3810, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":3799
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveGroup_53generator21(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":3812
 *         yield 'changesets', self.changesets
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_51Fields[] = "\n        Iterator over the field names of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_51Fields(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_21_Fields(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_21_Fields, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 3812, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_14PrimitiveGroup_53generator21, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Fields, __pyx_n_s_PrimitiveGroup_Fields, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 3812, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveGroup_53generator21(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3812, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3819
 *             iterator
 *         """
 *         yield 'nodes'             # <<<<<<<<<<<<<<
 *         yield 'dense'
 *         yield 'ways'
 */
  __Pyx_INCREF(__pyx_n_s_nodes);
  __pyx_r = __pyx_n_s_nodes;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3819, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3820
 *         """
 *         yield 'nodes'
 *         yield 'dense'             # <<<<<<<<<<<<<<
 *         yield 'ways'
 *         yield 'relations'
 */
  __Pyx_INCREF(__pyx_n_s_dense);
  __pyx_r = __pyx_n_s_dense;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3820, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3821
 *         yield 'nodes'
 *         yield 'dense'
 *         yield 'ways'             # <<<<<<<<<<<<<<
 *         yield 'relations'
 *         yield 'changesets'
 */
  __Pyx_INCREF(__pyx_n_s_ways);
  __pyx_r = __pyx_n_s_ways;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3821, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3822
 *         yield 'dense'
 *         yield 'ways'
 *         yield 'relations'             # <<<<<<<<<<<<<<
 *         yield 'changesets'
 * 
 */
  __Pyx_INCREF(__pyx_n_s_relations);
  __pyx_r = __pyx_n_s_relations;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3822, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3823
 *         yield 'ways'
 *         yield 'relations'
 *         yield 'changesets'             # <<<<<<<<<<<<<<
 * 
 *     def Values(self):
 */
  __Pyx_INCREF(__pyx_n_s_changesets);
  __pyx_r = __pyx_n_s_changesets;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3823, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":3812
 *         yield 'changesets', self.changesets
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveGroup_56generator22(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":3825
 *         yield 'changesets'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_54Values[] = "\n        Iterator over the values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_54Values(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_54Values(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_22_Values(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_22_Values, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 3825, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_14PrimitiveGroup_56generator22, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Values, __pyx_n_s_PrimitiveGroup_Values, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 3825, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveGroup_56generator22(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3825, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3832
 *             iterator
 *         """
 *         yield self.nodes             # <<<<<<<<<<<<<<
 *         yield self.dense
 *         yield self.ways
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3832, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3833
 *         """
 *         yield self.nodes
 *         yield self.dense             # <<<<<<<<<<<<<<
 *         yield self.ways
 *         yield self.relations
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_dense); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3833, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3834
 *         yield self.nodes
 *         yield self.dense
 *         yield self.ways             # <<<<<<<<<<<<<<
 *         yield self.relations
 *         yield self.changesets
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_ways); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3834, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3835
 *         yield self.dense
 *         yield self.ways
 *         yield self.relations             # <<<<<<<<<<<<<<
 *         yield self.changesets
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_relations); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3835, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3836
 *         yield self.ways
 *         yield self.relations
 *         yield self.changesets             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_changesets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3836, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":3825
 *         yield 'changesets'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveGroup_59generator23(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":3840
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_14PrimitiveGroup_57Setters[] = "\n        Iterator over functions to set the fields in a message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_57Setters(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_57Setters(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_23_Setters(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_23_Setters, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 3840, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_14PrimitiveGroup_59generator23, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Setters, __pyx_n_s_PrimitiveGroup_Setters, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 3840, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.Setters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3847
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.nodes = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_14PrimitiveGroup_7Setters_1setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7Setters_1setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_7Setters_setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":3848
 *         """
 *         def setter(value):
 *             self.nodes = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3848, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_nodes, __pyx_v_value) < 0) __PYX_ERR(0, 3848, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3847
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.nodes = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3850
 *             self.nodes = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.dense = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_14PrimitiveGroup_7Setters_3setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7Setters_3setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_7Setters_2setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":3851
 *         yield setter
 *         def setter(value):
 *             self.dense = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3851, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_dense, __pyx_v_value) < 0) __PYX_ERR(0, 3851, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3850
 *             self.nodes = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.dense = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3853
 *             self.dense = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.ways = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_14PrimitiveGroup_7Setters_5setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7Setters_5setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_7Setters_4setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":3854
 *         yield setter
 *         def setter(value):
 *             self.ways = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3854, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_ways, __pyx_v_value) < 0) __PYX_ERR(0, 3854, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3853
 *             self.dense = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.ways = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3856
 *             self.ways = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.relations = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_14PrimitiveGroup_7Setters_7setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7Setters_7setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_7Setters_6setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":3857
 *         yield setter
 *         def setter(value):
 *             self.relations = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3857, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_relations, __pyx_v_value) < 0) __PYX_ERR(0, 3857, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3856
 *             self.ways = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.relations = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3859
 *             self.relations = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.changesets = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_14PrimitiveGroup_7Setters_9setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7Setters_9setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_7Setters_8setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":3860
 *         yield setter
 *         def setter(value):
 *             self.changesets = value             # <<<<<<<<<<<<<<
 *         yield setter
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3860, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_changesets, __pyx_v_value) < 0) __PYX_ERR(0, 3860, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3859
 *             self.relations = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.changesets = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3840
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

static PyObject *__pyx_gb_12pyrosm_proto_14PrimitiveGroup_59generator23(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3840, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3847
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.nodes = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_14PrimitiveGroup_7Setters_1setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_setter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3849
 *         def setter(value):
 *             self.nodes = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.dense = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3849, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3850
 *             self.nodes = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.dense = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_14PrimitiveGroup_7Setters_3setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3852
 *         def setter(value):
 *             self.dense = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.ways = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3852, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3853
 *             self.dense = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.ways = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_14PrimitiveGroup_7Setters_5setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3855
 *         def setter(value):
 *             self.ways = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.relations = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3855, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3856
 *             self.ways = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.relations = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_14PrimitiveGroup_7Setters_7setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3858
 *         def setter(value):
 *             self.relations = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.changesets = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3858, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3859
 *             self.relations = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.changesets = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_14PrimitiveGroup_7Setters_9setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3861
 *         def setter(value):
 *             self.changesets = value
 *         yield setter             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3861, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":3840
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

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

/* "pyrosm_proto.pxd":203
 *     cdef uint64_t __field_bitmap0
 * 
 *     cdef public bint _is_present_in_parent             # <<<<<<<<<<<<<<
 *     cdef bytes _cached_serialization
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_21_is_present_in_parent___get__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_present_in_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 203, __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("pyrosm_proto.PrimitiveGroup._is_present_in_parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_14PrimitiveGroup_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_14PrimitiveGroup_21_is_present_in_parent_2__set__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_14PrimitiveGroup_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 203, __pyx_L1_error)
  __pyx_v_self->_is_present_in_parent = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup._is_present_in_parent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_61__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_61__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_12pyrosm_proto_14PrimitiveGroup_60__reduce_cython__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_63__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_14PrimitiveGroup_63__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_12pyrosm_proto_14PrimitiveGroup_62__setstate_cython__(((struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_12pyrosm_proto_14PrimitiveGroup_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.PrimitiveGroup.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3868
 * cdef class StringTable:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_11StringTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_11StringTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable___cinit__(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static int __pyx_pf_12pyrosm_proto_11StringTable___cinit__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrosm_proto.pyx":3869
 * 
 *     def __cinit__(self):
 *         self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

  /* "pyrosm_proto.pyx":3868
 * cdef class StringTable:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

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

/* "pyrosm_proto.pyx":3871
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._s is not None:
 */

/* Python wrapper */
static void __pyx_pw_12pyrosm_proto_11StringTable_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrosm_proto_11StringTable_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrosm_proto_11StringTable_2__dealloc__(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static void __pyx_pf_12pyrosm_proto_11StringTable_2__dealloc__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrosm_proto.pyx":3873
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._s is not None:             # <<<<<<<<<<<<<<
 *             self._s._listener = <PyObject *>null_listener
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_s) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3874
 *         # Remove any references to self from child messages or repeated fields
 *         if self._s is not None:
 *             self._s._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, **kwargs):
 */
    __pyx_v_self->_s->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3873
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._s is not None:             # <<<<<<<<<<<<<<
 *             self._s._listener = <PyObject *>null_listener
 * 
 */
  }

  /* "pyrosm_proto.pyx":3871
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._s is not None:
 */

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

/* "pyrosm_proto.pyx":3876
 *             self._s._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_11StringTable_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_11StringTable_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_4__init__(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self), __pyx_v_kwargs);

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

static int __pyx_pf_12pyrosm_proto_11StringTable_4__init__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_field_name = NULL;
  PyObject *__pyx_v_field_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrosm_proto.pyx":3877
 * 
 *     def __init__(self, **kwargs):
 *         self.reset()             # <<<<<<<<<<<<<<
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3878
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3878, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":3879
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('s',):
 */
    __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3879, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3879, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3879, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3879, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3879, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 3879, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 3879, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3879, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3879, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3879, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 3879, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 3879, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":3880
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('s',):
 *                         getattr(self, field_name).extend(field_value)
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "pyrosm_proto.pyx":3881
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('s',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_s, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3881, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_13 = (__pyx_t_1 != 0);
          if (__pyx_t_13) {

            /* "pyrosm_proto.pyx":3882
 *                 try:
 *                     if field_name in ('s',):
 *                         getattr(self, field_name).extend(field_value)             # <<<<<<<<<<<<<<
 *                     else:
 *                         setattr(self, field_name, field_value)
 */
            __pyx_t_7 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3882, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_extend); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3882, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_7 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_7)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3882, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":3881
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('s',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":3884
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 *                         setattr(self, field_name, field_value)             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 */
          /*else*/ {
            __pyx_t_14 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name, __pyx_v_field_value); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 3884, __pyx_L8_error)
          }
          __pyx_L16:;

          /* "pyrosm_proto.pyx":3880
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('s',):
 *                         getattr(self, field_name).extend(field_value)
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L15_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrosm_proto.pyx":3885
 *                     else:
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return
 */
        __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_15) {
          __Pyx_AddTraceback("pyrosm_proto.StringTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 3885, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GOTREF(__pyx_t_7);

          /* "pyrosm_proto.pyx":3886
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))             # <<<<<<<<<<<<<<
 *         return
 * 
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3886, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_field_name);
          __Pyx_GIVEREF(__pyx_v_field_name);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_field_name);
          __pyx_t_16 = __Pyx_PyString_Format(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3886, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3886, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 3886, __pyx_L10_except_error)
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;

        /* "pyrosm_proto.pyx":3880
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('s',):
 *                         getattr(self, field_name).extend(field_value)
 */
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L15_try_end:;
      }

      /* "pyrosm_proto.pyx":3879
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('s',):
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":3878
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  }

  /* "pyrosm_proto.pyx":3887
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3876
 *             self._s._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XDECREF(__pyx_v_field_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3889
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           's',]
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_6__str__(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_6__str__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_messages = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyrosm_proto.pyx":3890
 * 
 *     def __str__(self):
 *         fields = [             # <<<<<<<<<<<<<<
 *                           's',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_s);
  __Pyx_GIVEREF(__pyx_n_s_s);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_s);
  __pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3892
 *         fields = [
 *                           's',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]             # <<<<<<<<<<<<<<
 *         messages = []
 *         for message in messages:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 3892, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3892, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3892, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3892, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3892, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 3892, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3893
 *                           's',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []             # <<<<<<<<<<<<<<
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_messages = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3894
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  __pyx_t_1 = __pyx_v_messages; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 3894, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":3895
 *         messages = []
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))             # <<<<<<<<<<<<<<
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3895, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":3896
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    __pyx_t_4 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3896, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3896, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 3896, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3896, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 3896, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3896, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 3896, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":3897
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))             # <<<<<<<<<<<<<<
 *             components.append('}')
 *         return '\n'.join(components)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_line);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3897, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":3896
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":3898
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 *             components.append('}')             # <<<<<<<<<<<<<<
 *         return '\n'.join(components)
 * 
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_kp_s__2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3898, __pyx_L1_error)

    /* "pyrosm_proto.pyx":3894
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3899
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 *         return '\n'.join(components)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3889
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           's',]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_messages);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3901
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_11StringTable_reset(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("reset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11StringTable_9reset)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3901, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3904
 *         # reset values and populate defaults
 * 
 *         self.__field_bitmap0 = 0             # <<<<<<<<<<<<<<
 * 
 *         if self._s is not None:
 */
  __pyx_v_self->__pyx___field_bitmap0 = 0;

  /* "pyrosm_proto.pyx":3906
 *         self.__field_bitmap0 = 0
 * 
 *         if self._s is not None:             # <<<<<<<<<<<<<<
 *             self._s._listener = <PyObject *>null_listener
 *         self._s = BytesList.__new__(BytesList)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_s) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":3907
 * 
 *         if self._s is not None:
 *             self._s._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._s = BytesList.__new__(BytesList)
 *         self._s._listener = <PyObject *>self
 */
    __pyx_v_self->_s->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3906
 *         self.__field_bitmap0 = 0
 * 
 *         if self._s is not None:             # <<<<<<<<<<<<<<
 *             self._s._listener = <PyObject *>null_listener
 *         self._s = BytesList.__new__(BytesList)
 */
  }

  /* "pyrosm_proto.pyx":3908
 *         if self._s is not None:
 *             self._s._listener = <PyObject *>null_listener
 *         self._s = BytesList.__new__(BytesList)             # <<<<<<<<<<<<<<
 *         self._s._listener = <PyObject *>self
 *         return
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_BytesList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_BytesList)))) __PYX_ERR(0, 3908, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_s);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_s));
  __pyx_v_self->_s = ((struct __pyx_obj_12pyrobuf_list_BytesList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":3909
 *             self._s._listener = <PyObject *>null_listener
 *         self._s = BytesList.__new__(BytesList)
 *         self._s._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_v_self->_s->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":3910
 *         self._s = BytesList.__new__(BytesList)
 *         self._s._listener = <PyObject *>self
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3901
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

  /* 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_WriteUnraisable("pyrosm_proto.StringTable.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_8reset(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_8reset(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_11StringTable_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3901, __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("pyrosm_proto.StringTable.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3914
 * 
 *     @property
 *     def s(self):             # <<<<<<<<<<<<<<
 *         return self._s
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_1s_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_1s_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_1s___get__(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_1s___get__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":3915
 *     @property
 *     def s(self):
 *         return self._s             # <<<<<<<<<<<<<<
 * 
 *     @s.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_s));
  __pyx_r = ((PyObject *)__pyx_v_self->_s);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3914
 * 
 *     @property
 *     def s(self):             # <<<<<<<<<<<<<<
 *         return self._s
 * 
 */

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

/* "pyrosm_proto.pyx":3918
 * 
 *     @s.setter
 *     def s(self, value):             # <<<<<<<<<<<<<<
 *         if self._s is not None:
 *             self._s._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_11StringTable_1s_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_11StringTable_1s_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_1s_2__set__(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_11StringTable_1s_2__set__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":3919
 *     @s.setter
 *     def s(self, value):
 *         if self._s is not None:             # <<<<<<<<<<<<<<
 *             self._s._listener = <PyObject *>null_listener
 *         self._s = BytesList.__new__(BytesList)
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_s) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":3920
 *     def s(self, value):
 *         if self._s is not None:
 *             self._s._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._s = BytesList.__new__(BytesList)
 *         self._s._listener = <PyObject *>self
 */
    __pyx_v_self->_s->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3919
 *     @s.setter
 *     def s(self, value):
 *         if self._s is not None:             # <<<<<<<<<<<<<<
 *             self._s._listener = <PyObject *>null_listener
 *         self._s = BytesList.__new__(BytesList)
 */
  }

  /* "pyrosm_proto.pyx":3921
 *         if self._s is not None:
 *             self._s._listener = <PyObject *>null_listener
 *         self._s = BytesList.__new__(BytesList)             # <<<<<<<<<<<<<<
 *         self._s._listener = <PyObject *>self
 *         for val in value:
 */
  __pyx_t_3 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_BytesList), __pyx_empty_tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_12pyrobuf_list_BytesList)))) __PYX_ERR(0, 3921, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_s);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_s));
  __pyx_v_self->_s = ((struct __pyx_obj_12pyrobuf_list_BytesList *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":3922
 *             self._s._listener = <PyObject *>null_listener
 *         self._s = BytesList.__new__(BytesList)
 *         self._s._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         for val in value:
 *             if isinstance(val, bytes):
 */
  __pyx_v_self->_s->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":3923
 *         self._s = BytesList.__new__(BytesList)
 *         self._s._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             if isinstance(val, bytes):
 *                 list.append(self._s, val)
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3923, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3923, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3923, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3923, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3923, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3923, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "pyrosm_proto.pyx":3924
 *         self._s._listener = <PyObject *>self
 *         for val in value:
 *             if isinstance(val, bytes):             # <<<<<<<<<<<<<<
 *                 list.append(self._s, val)
 *             else:
 */
    __pyx_t_2 = PyBytes_Check(__pyx_v_val); 
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (likely(__pyx_t_1)) {

      /* "pyrosm_proto.pyx":3925
 *         for val in value:
 *             if isinstance(val, bytes):
 *                 list.append(self._s, val)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (val, type(val), bytes))
 */
      if (unlikely(((PyObject *)__pyx_v_self->_s) == Py_None)) {
        PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
        __PYX_ERR(0, 3925, __pyx_L1_error)
      }
      __pyx_t_6 = ((PyObject *)__pyx_v_self->_s);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyList_Append(((PyObject*)__pyx_t_6), __pyx_v_val); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 3925, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "pyrosm_proto.pyx":3924
 *         self._s._listener = <PyObject *>self
 *         for val in value:
 *             if isinstance(val, bytes):             # <<<<<<<<<<<<<<
 *                 list.append(self._s, val)
 *             else:
 */
      goto __pyx_L6;
    }

    /* "pyrosm_proto.pyx":3927
 *                 list.append(self._s, val)
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (val, type(val), bytes))             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    /*else*/ {
      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_val);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_val)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_val)));
      PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)Py_TYPE(__pyx_v_val)));
      __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
      PyTuple_SET_ITEM(__pyx_t_6, 2, ((PyObject *)(&PyBytes_Type)));
      __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 3927, __pyx_L1_error)
    }
    __pyx_L6:;

    /* "pyrosm_proto.pyx":3923
 *         self._s = BytesList.__new__(BytesList)
 *         self._s._listener = <PyObject *>self
 *         for val in value:             # <<<<<<<<<<<<<<
 *             if isinstance(val, bytes):
 *                 list.append(self._s, val)
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":3928
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (val, type(val), bytes))
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3918
 * 
 *     @s.setter
 *     def s(self, value):             # <<<<<<<<<<<<<<
 *         if self._s is not None:
 *             self._s._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.s.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3931
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

static int __pyx_f_12pyrosm_proto_11StringTable__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, CYTHON_UNUSED int __pyx_v_cache) {
  int __pyx_v_current_offset;
  int64_t __pyx_v_key;
  int64_t __pyx_v_field_size;
  PyObject *__pyx_v_s_elt = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("_protobuf_deserialize", 0);

  /* "pyrosm_proto.pyx":3932
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):
 *         cdef int current_offset = 0             # <<<<<<<<<<<<<<
 *         cdef int64_t key
 *         cdef int64_t field_size
 */
  __pyx_v_current_offset = 0;

  /* "pyrosm_proto.pyx":3936
 *         cdef int64_t field_size
 *         cdef bytes s_elt
 *         while current_offset < size:             # <<<<<<<<<<<<<<
 *             key = get_varint64(memory, &current_offset)
 *             # s
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_current_offset < __pyx_v_size) != 0);
    if (!__pyx_t_1) break;

    /* "pyrosm_proto.pyx":3937
 *         cdef bytes s_elt
 *         while current_offset < size:
 *             key = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # s
 *             if key == 10:
 */
    __pyx_v_key = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

    /* "pyrosm_proto.pyx":3939
 *             key = get_varint64(memory, &current_offset)
 *             # s
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 s_elt = memory[current_offset:current_offset + field_size]
 */
    __pyx_t_1 = ((__pyx_v_key == 10) != 0);
    if (__pyx_t_1) {

      /* "pyrosm_proto.pyx":3940
 *             # s
 *             if key == 10:
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 s_elt = memory[current_offset:current_offset + field_size]
 *                 current_offset += <int>field_size
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":3941
 *             if key == 10:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 s_elt = memory[current_offset:current_offset + field_size]             # <<<<<<<<<<<<<<
 *                 current_offset += <int>field_size
 *                 list.append(self._s, s_elt)
 */
      __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3941, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_s_elt, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":3942
 *                 field_size = get_varint64(memory, &current_offset)
 *                 s_elt = memory[current_offset:current_offset + field_size]
 *                 current_offset += <int>field_size             # <<<<<<<<<<<<<<
 *                 list.append(self._s, s_elt)
 *             # Unknown field - need to skip proper number of bytes
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((int)__pyx_v_field_size));

      /* "pyrosm_proto.pyx":3943
 *                 s_elt = memory[current_offset:current_offset + field_size]
 *                 current_offset += <int>field_size
 *                 list.append(self._s, s_elt)             # <<<<<<<<<<<<<<
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 */
      if (unlikely(((PyObject *)__pyx_v_self->_s) == Py_None)) {
        PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
        __PYX_ERR(0, 3943, __pyx_L1_error)
      }
      __pyx_t_2 = ((PyObject *)__pyx_v_self->_s);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyList_Append(((PyObject*)__pyx_t_2), __pyx_v_s_elt); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 3943, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":3939
 *             key = get_varint64(memory, &current_offset)
 *             # s
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 s_elt = memory[current_offset:current_offset + field_size]
 */
      goto __pyx_L5;
    }

    /* "pyrosm_proto.pyx":3946
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)             # <<<<<<<<<<<<<<
 * 
 *         self._is_present_in_parent = True
 */
    /*else*/ {
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        if (unlikely(!(__pyx_f_12pyrobuf_util_skip_generic(__pyx_v_memory, (&__pyx_v_current_offset), __pyx_v_size, (__pyx_v_key & 0x7)) != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 3946, __pyx_L1_error)
        }
      }
      #endif
    }
    __pyx_L5:;
  }

  /* "pyrosm_proto.pyx":3948
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)
 * 
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 * 
 *         return current_offset
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":3950
 *         self._is_present_in_parent = True
 * 
 *         return current_offset             # <<<<<<<<<<<<<<
 * 
 *     cpdef void Clear(self):
 */
  __pyx_r = __pyx_v_current_offset;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3931
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("pyrosm_proto.StringTable._protobuf_deserialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s_elt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3952
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_11StringTable_Clear(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3952, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11StringTable_11Clear)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3952, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3954
 *     cpdef void Clear(self):
 *         """Clears all data that was set in the message."""
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3955
 *         """Clears all data that was set in the message."""
 *         self.reset()
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void ClearField(self, field_name):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3952
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.StringTable.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_10Clear[] = "Clears all data that was set in the message.";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Clear (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_10Clear(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_10Clear(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_11StringTable_Clear(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3952, __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("pyrosm_proto.StringTable.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3957
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 's':
 */

static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static void __pyx_f_12pyrosm_proto_11StringTable_ClearField(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("ClearField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ClearField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11StringTable_13ClearField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3957, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3959
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 's':             # <<<<<<<<<<<<<<
 *             self._s._listener = <PyObject *>null_listener
 *             self._s = BytesList.__new__(BytesList)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_s, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3959, __pyx_L1_error)
  if (likely(__pyx_t_5)) {

    /* "pyrosm_proto.pyx":3960
 *         """Clears the contents of a given field."""
 *         if field_name == 's':
 *             self._s._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._s = BytesList.__new__(BytesList)
 *             self._s._listener = <PyObject *>self
 */
    __pyx_v_self->_s->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":3961
 *         if field_name == 's':
 *             self._s._listener = <PyObject *>null_listener
 *             self._s = BytesList.__new__(BytesList)             # <<<<<<<<<<<<<<
 *             self._s._listener = <PyObject *>self
 *         else:
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_BytesList), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_BytesList)))) __PYX_ERR(0, 3961, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_s);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_s));
    __pyx_v_self->_s = ((struct __pyx_obj_12pyrobuf_list_BytesList *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":3962
 *             self._s._listener = <PyObject *>null_listener
 *             self._s = BytesList.__new__(BytesList)
 *             self._s._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 */
    __pyx_v_self->_s->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":3959
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 's':             # <<<<<<<<<<<<<<
 *             self._s._listener = <PyObject *>null_listener
 *             self._s = BytesList.__new__(BytesList)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":3964
 *             self._s._listener = <PyObject *>self
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3964, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":3966
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void CopyFrom(self, StringTable other_msg):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3957
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 's':
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.StringTable.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_12ClearField[] = "Clears the contents of a given field.";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ClearField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_12ClearField(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_12ClearField(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ClearField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_11StringTable_ClearField(__pyx_v_self, __pyx_v_field_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3957, __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("pyrosm_proto.StringTable.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3968
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, StringTable other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_11StringTable_CopyFrom(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CopyFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3968, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11StringTable_15CopyFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3968, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3975
 *             other_msg (StringTable): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":3976
 *         """
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 *         self.reset()
 *         self.MergeFrom(other_msg)
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":3975
 *             other_msg (StringTable): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  }

  /* "pyrosm_proto.pyx":3977
 *         if self is other_msg:
 *             return
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self.MergeFrom(other_msg)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":3978
 *             return
 *         self.reset()
 *         self.MergeFrom(other_msg)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint HasField(self, field_name) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->MergeFrom(__pyx_v_self, __pyx_v_other_msg, 0);

  /* "pyrosm_proto.pyx":3968
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, StringTable other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.StringTable.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_14CopyFrom[] = "\n        Copies the content of the specified message into the current message.\n\n        Params:\n            other_msg (StringTable): Message to copy into the current one.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CopyFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_StringTable, 1, "other_msg", 0))) __PYX_ERR(0, 3968, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_14CopyFrom(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_14CopyFrom(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_11StringTable_CopyFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3968, __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("pyrosm_proto.StringTable.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3980
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static int __pyx_f_12pyrosm_proto_11StringTable_HasField(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("HasField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_HasField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3980, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11StringTable_17HasField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3980, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3980, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":3987
 *             field_name (str): The name of the field to check.
 *         """
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint IsInitialized(self):
 */
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_singular, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 3987, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3980
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

  /* 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("pyrosm_proto.StringTable.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_16HasField[] = "\n        Checks if a certain field is set for the message.\n\n        Params:\n            field_name (str): The name of the field to check.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_16HasField(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_16HasField(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("HasField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_11StringTable_HasField(__pyx_v_self, __pyx_v_field_name, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3980, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":3989
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_12pyrosm_proto_11StringTable_IsInitialized(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_IsInitialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3989, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11StringTable_19IsInitialized)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3989, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3989, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4000
 * 
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef void MergeFrom(self, StringTable other_msg):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":3989
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

  /* 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_WriteUnraisable("pyrosm_proto.StringTable.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_18IsInitialized[] = "\n        Checks if the message is initialized.\n\n        Returns:\n            bool: True if the message is initialized (i.e. all of its required\n                fields are set).\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsInitialized (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_18IsInitialized(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_18IsInitialized(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_12pyrosm_proto_11StringTable_IsInitialized(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3989, __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("pyrosm_proto.StringTable.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4002
 *         return True
 * 
 *     cpdef void MergeFrom(self, StringTable other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_11StringTable_MergeFrom(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11StringTable_21MergeFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4002, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4011
 *         cdef int i
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":4012
 * 
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4011
 *         cdef int i
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "pyrosm_proto.pyx":4015
 * 
 * 
 *         self._s += other_msg._s             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  __pyx_t_1 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_self->_s), ((PyObject *)__pyx_v_other_msg->_s)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_BytesList))))) __PYX_ERR(0, 4015, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_s);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_s));
  __pyx_v_self->_s = ((struct __pyx_obj_12pyrobuf_list_BytesList *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4017
 *         self._s += other_msg._s
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4002
 *         return True
 * 
 *     cpdef void MergeFrom(self, StringTable other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.StringTable.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_20MergeFrom[] = "\n        Merges the contents of the specified message into the current message.\n\n        Params:\n            other_msg: Message to merge into the current message.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_StringTable, 1, "other_msg", 0))) __PYX_ERR(0, 4002, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_20MergeFrom(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_20MergeFrom(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_11StringTable_MergeFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4002, __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("pyrosm_proto.StringTable.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4019
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_11StringTable_MergeFromString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11StringTable_MergeFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  unsigned char const *__pyx_t_10;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4019, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11StringTable_23MergeFromString)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4019, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4019, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4019, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4019, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4019, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4033
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, False)
 */
  __pyx_t_7 = (__pyx_v_size != Py_None);
  if ((__pyx_t_7 != 0)) {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4033, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_8;
  } else {
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4033, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_9;
  }
  __pyx_v_length = __pyx_t_5;

  /* "pyrosm_proto.pyx":4035
 *         length = size if size is not None else len(data)
 * 
 *         buf = self._protobuf_deserialize(data, length, False)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_10 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 4035, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_10, __pyx_v_length, 0);

  /* "pyrosm_proto.pyx":4037
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  __pyx_t_7 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "pyrosm_proto.pyx":4038
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4038, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4038, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4038, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_GIVEREF(__pyx_v_size);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_size);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Truncated_message_got_s_expected, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4038, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4038, __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, 4038, __pyx_L1_error)

    /* "pyrosm_proto.pyx":4037
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  }

  /* "pyrosm_proto.pyx":4040
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4042
 *         self._Modified()
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4019
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_22MergeFromString[] = "\n        Merges serialized protocol buffer data into this message.\n\n        Params:\n            data (bytes): a string of binary data.\n            size (int): optional - the length of the data string\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "MergeFromString") < 0)) __PYX_ERR(0, 4019, __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_data = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MergeFromString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4019, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.StringTable.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_22MergeFromString(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self), __pyx_v_data, __pyx_v_size);

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_22MergeFromString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_11StringTable_MergeFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_StringTable->MergeFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4019, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4044
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_11StringTable_ParseFromString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11StringTable_ParseFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_reset = ((int)1);
  int __pyx_v_cache = ((int)0);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  unsigned char const *__pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_reset = __pyx_optional_args->reset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cache = __pyx_optional_args->cache;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4044, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11StringTable_25ParseFromString)) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4044, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4044, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4044, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4044, __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(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4044, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_size);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 3+__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, 4044, __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, 4044, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4060
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         if reset:
 */
  __pyx_t_9 = (__pyx_v_size != Py_None);
  if ((__pyx_t_9 != 0)) {
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4060, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4060, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_11;
  }
  __pyx_v_length = __pyx_t_7;

  /* "pyrosm_proto.pyx":4062
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_9 = (__pyx_v_reset != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":4063
 * 
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":4062
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":4065
 *             self.reset()
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_12 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 4065, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_12, __pyx_v_length, __pyx_v_cache);

  /* "pyrosm_proto.pyx":4067
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  __pyx_t_9 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "pyrosm_proto.pyx":4068
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message")             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s_Truncated_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Truncated_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4068, __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, 4068, __pyx_L1_error)

    /* "pyrosm_proto.pyx":4067
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  }

  /* "pyrosm_proto.pyx":4070
 *             raise DecodeError("Truncated message")
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4072
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  __pyx_t_9 = (__pyx_v_cache != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":4073
 * 
 *         if cache:
 *             self._cached_serialization = data             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) __PYX_ERR(0, 4073, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":4072
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  }

  /* "pyrosm_proto.pyx":4075
 *             self._cached_serialization = data
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4044
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_24ParseFromString[] = "\n        Populate the message class from a string of protobuf encoded binary data.\n\n        Params:\n            data (bytes): a string of binary data\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n            cache (bool): optional - whether to cache serialized data\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_v_reset;
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,&__pyx_n_s_cache,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromString") < 0)) __PYX_ERR(0, 4044, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    if (values[2]) {
      __pyx_v_reset = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4044, __pyx_L3_error)
    } else {
      __pyx_v_reset = ((int)1);
    }
    if (values[3]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4044, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromString", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4044, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.StringTable.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_24ParseFromString(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset, __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_24ParseFromString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_11StringTable_ParseFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.reset = __pyx_v_reset;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_StringTable->ParseFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4044, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4078
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FromString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_26FromString(((PyTypeObject*)__pyx_v_cls), ((PyObject *)__pyx_v_s));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("FromString", 0);

  /* "pyrosm_proto.pyx":4079
 *     @classmethod
 *     def FromString(cls, s):
 *         message = cls()             # <<<<<<<<<<<<<<
 *         message.MergeFromString(s)
 *         return message
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4080
 *     def FromString(cls, s):
 *         message = cls()
 *         message.MergeFromString(s)             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4080, __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;

  /* "pyrosm_proto.pyx":4081
 *         message = cls()
 *         message.MergeFromString(s)
 *         return message             # <<<<<<<<<<<<<<
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4078
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.FromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4083
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # s
 */

static void __pyx_f_12pyrosm_proto_11StringTable__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_buf, CYTHON_UNUSED int __pyx_v_cache) {
  PyObject *__pyx_v_s_elt = 0;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  __Pyx_RefNannySetupContext("_protobuf_serialize", 0);
  __Pyx_INCREF(__pyx_v_buf);

  /* "pyrosm_proto.pyx":4087
 *         # s
 *         cdef bytes s_elt
 *         for s_elt in self._s:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             set_varint64(len(s_elt), buf)
 */
  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_s))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_s))) {
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_s); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->_s)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4087, __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, 4087, __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, 4087, __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, 4087, __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, 4087, __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, 4087, __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, 4087, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 4087, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_s_elt, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":4088
 *         cdef bytes s_elt
 *         for s_elt in self._s:
 *             set_varint64(10, buf)             # <<<<<<<<<<<<<<
 *             set_varint64(len(s_elt), buf)
 *             buf += s_elt
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(10, __pyx_v_buf));

    /* "pyrosm_proto.pyx":4089
 *         for s_elt in self._s:
 *             set_varint64(10, buf)
 *             set_varint64(len(s_elt), buf)             # <<<<<<<<<<<<<<
 *             buf += s_elt
 * 
 */
    if (unlikely(__pyx_v_s_elt == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 4089, __pyx_L1_error)
    }
    __pyx_t_5 = PyBytes_GET_SIZE(__pyx_v_s_elt); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4089, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_5, __pyx_v_buf));

    /* "pyrosm_proto.pyx":4090
 *             set_varint64(10, buf)
 *             set_varint64(len(s_elt), buf)
 *             buf += s_elt             # <<<<<<<<<<<<<<
 * 
 *     cpdef void _Modified(self):
 */
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_s_elt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4090, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":4087
 *         # s
 *         cdef bytes s_elt
 *         for s_elt in self._s:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             set_varint64(len(s_elt), buf)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4083
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # s
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pyrosm_proto.StringTable._protobuf_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s_elt);
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_RefNannyFinishContext();
}

/* "pyrosm_proto.pyx":4092
 *             buf += s_elt
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_11StringTable__Modified(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Modified); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4092, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11StringTable_29_Modified)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4092, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4093
 * 
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":4094
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()             # <<<<<<<<<<<<<<
 *         self._cached_serialization = None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_listener), __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4094, __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;

  /* "pyrosm_proto.pyx":4095
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
  __Pyx_DECREF(__pyx_v_self->_cached_serialization);
  __pyx_v_self->_cached_serialization = ((PyObject*)Py_None);

  /* "pyrosm_proto.pyx":4092
 *             buf += s_elt
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.StringTable._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_Modified (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_28_Modified(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_28_Modified(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_11StringTable__Modified(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4092, __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("pyrosm_proto.StringTable._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4097
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_11StringTable_SerializeToString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11StringTable_SerializeToString *__pyx_optional_args) {
  int __pyx_v_cache = ((int)0);
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_out = 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;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cache = __pyx_optional_args->cache;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4097, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11StringTable_31SerializeToString)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4097, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4097, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 4097, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4107
 * 
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_6 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":4108
 * 
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4107
 * 
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":4110
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4111
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)             # <<<<<<<<<<<<<<
 *         cdef bytes out = bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, __pyx_v_cache);

  /* "pyrosm_proto.pyx":4112
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4114
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  __pyx_t_7 = (__pyx_v_cache != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":4115
 * 
 *         if cache:
 *             self._cached_serialization = out             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = __pyx_v_out;

    /* "pyrosm_proto.pyx":4114
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  }

  /* "pyrosm_proto.pyx":4117
 *             self._cached_serialization = out
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializePartialToString(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4097
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.StringTable.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_30SerializeToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cache,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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SerializeToString") < 0)) __PYX_ERR(0, 4097, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4097, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("SerializeToString", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4097, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.StringTable.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_30SerializeToString(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self), __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_30SerializeToString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_12pyrosm_proto_11StringTable_SerializeToString __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_StringTable->SerializeToString(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4097, __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("pyrosm_proto.StringTable.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4119
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_11StringTable_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_buf = 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;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4119, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_11StringTable_33SerializePartialToString)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4119, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 4119, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4126
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_5 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":4127
 *         """
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4126
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":4129
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4130
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)             # <<<<<<<<<<<<<<
 *         return bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, 0);

  /* "pyrosm_proto.pyx":4131
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *     def SetInParent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4119
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.StringTable.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_32SerializePartialToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_32SerializePartialToString(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_11StringTable_SerializePartialToString(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4119, __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("pyrosm_proto.StringTable.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4133
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_34SetInParent[] = "\n        Mark this an present in the parent.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_34SetInParent(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_34SetInParent(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent", 0);

  /* "pyrosm_proto.pyx":4137
 *         Mark this an present in the parent.
 *         """
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4133
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4139
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_36ParseFromJson[] = "\n        Populate the message class from a json string.\n\n        Params:\n            data (str): a json string\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromJson (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromJson") < 0)) __PYX_ERR(0, 4139, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    __pyx_v_reset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromJson", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4139, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.StringTable.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_36ParseFromJson(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("ParseFromJson", 0);
  __Pyx_INCREF(__pyx_v_size);

  /* "pyrosm_proto.pyx":4148
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4149
 *         """
 *         if size is None:
 *             size = len(data)             # <<<<<<<<<<<<<<
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4149, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":4148
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  }

  /* "pyrosm_proto.pyx":4150
 *         if size is None:
 *             size = len(data)
 *         d = json.loads(data[:size])             # <<<<<<<<<<<<<<
 *         self.ParseFromDict(d, reset)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_json); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_d = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":4151
 *             size = len(data)
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToJson(self, **kwargs):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4151, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4151, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4151, __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_d);
    __Pyx_GIVEREF(__pyx_v_d);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_d);
    __Pyx_INCREF(__pyx_v_reset);
    __Pyx_GIVEREF(__pyx_v_reset);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_reset);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":4139
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4153
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_38SerializeToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializeToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializeToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_38SerializeToJson(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializeToJson", 0);

  /* "pyrosm_proto.pyx":4160
 *             str: a json formatted string
 *         """
 *         d = self.SerializeToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4161
 *         """
 *         d = self.SerializeToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToJson(self, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4153
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.SerializeToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4163
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_40SerializePartialToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializePartialToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializePartialToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_40SerializePartialToJson(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToJson", 0);

  /* "pyrosm_proto.pyx":4170
 *             str: a json formatted string
 *         """
 *         d = self.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4171
 *         """
 *         d = self.SerializePartialToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromDict(self, d, reset=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4163
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.SerializePartialToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4173
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_42ParseFromDict[] = "\n        Populate the message class from a Python dictionary.\n\n        Params:\n            d (dict): a Python dictionary representing the message\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,&__pyx_n_s_reset,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 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_reset);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromDict") < 0)) __PYX_ERR(0, 4173, __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_d = values[0];
    __pyx_v_reset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromDict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4173, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.StringTable.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_42ParseFromDict(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self), __pyx_v_d, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset) {
  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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("ParseFromDict", 0);

  /* "pyrosm_proto.pyx":4181
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reset); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4181, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":4182
 *         """
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         assert type(d) == dict
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":4181
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":4184
 *             self.reset()
 * 
 *         assert type(d) == dict             # <<<<<<<<<<<<<<
 *         try:
 *             self.s = base64.b64decode(d["s"].encode('utf-8'))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_d)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4184, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4184, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 4184, __pyx_L1_error)
    }
  }
  #endif

  /* "pyrosm_proto.pyx":4185
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.s = base64.b64decode(d["s"].encode('utf-8'))
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":4186
 *         assert type(d) == dict
 *         try:
 *             self.s = base64.b64decode(d["s"].encode('utf-8'))             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_base64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4186, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_b64decode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4186, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_s); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4186, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_encode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4186, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_kp_s_utf_8);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4186, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __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);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4186, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_s, __pyx_t_2) < 0) __PYX_ERR(0, 4186, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":4185
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.s = base64.b64decode(d["s"].encode('utf-8'))
 *         except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":4187
 *         try:
 *             self.s = base64.b64decode(d["s"].encode('utf-8'))
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_10) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":4185
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.s = base64.b64decode(d["s"].encode('utf-8'))
 *         except KeyError:
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":4190
 *             pass
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_StringTable *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4192
 *         self._Modified()
 * 
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4173
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4194
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_44SerializeToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_44SerializeToDict(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("SerializeToDict", 0);

  /* "pyrosm_proto.pyx":4201
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if len(self.s) > 0:
 *             out["s"] = list(self.s)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4202
 *         """
 *         out = {}
 *         if len(self.s) > 0:             # <<<<<<<<<<<<<<
 *             out["s"] = list(self.s)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":4203
 *         out = {}
 *         if len(self.s) > 0:
 *             out["s"] = list(self.s)             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_s, __pyx_t_4) < 0)) __PYX_ERR(0, 4203, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":4202
 *         """
 *         out = {}
 *         if len(self.s) > 0:             # <<<<<<<<<<<<<<
 *             out["s"] = list(self.s)
 * 
 */
  }

  /* "pyrosm_proto.pyx":4205
 *             out["s"] = list(self.s)
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4194
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.SerializeToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4207
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_46SerializePartialToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_46SerializePartialToDict(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToDict", 0);

  /* "pyrosm_proto.pyx":4214
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if len(self.s) > 0:
 *             out["s"] = list(self.s)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4215
 *         """
 *         out = {}
 *         if len(self.s) > 0:             # <<<<<<<<<<<<<<
 *             out["s"] = list(self.s)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":4216
 *         out = {}
 *         if len(self.s) > 0:
 *             out["s"] = list(self.s)             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_s, __pyx_t_4) < 0)) __PYX_ERR(0, 4216, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":4215
 *         """
 *         out = {}
 *         if len(self.s) > 0:             # <<<<<<<<<<<<<<
 *             out["s"] = list(self.s)
 * 
 */
  }

  /* "pyrosm_proto.pyx":4218
 *             out["s"] = list(self.s)
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def Items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4207
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.SerializePartialToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_11StringTable_50generator24(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":4220
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_48Items[] = "\n        Iterator over the field names and values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_48Items(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_48Items(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_24_Items(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_24_Items, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 4220, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_11StringTable_50generator24, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Items, __pyx_n_s_StringTable_Items, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 4220, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.StringTable.Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_11StringTable_50generator24(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4220, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4227
 *             iterator
 *         """
 *         yield 's', self.s             # <<<<<<<<<<<<<<
 * 
 *     def Fields(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_s);
  __Pyx_GIVEREF(__pyx_n_s_s);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_s);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4227, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":4220
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_11StringTable_53generator25(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":4229
 *         yield 's', self.s
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_51Fields[] = "\n        Iterator over the field names of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_51Fields(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_25_Fields(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_25_Fields, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 4229, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_11StringTable_53generator25, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Fields, __pyx_n_s_StringTable_Fields, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 4229, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.StringTable.Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_11StringTable_53generator25(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4229, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4236
 *             iterator
 *         """
 *         yield 's'             # <<<<<<<<<<<<<<
 * 
 *     def Values(self):
 */
  __Pyx_INCREF(__pyx_n_s_s);
  __pyx_r = __pyx_n_s_s;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4236, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":4229
 *         yield 's', self.s
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_11StringTable_56generator26(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":4238
 *         yield 's'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_54Values[] = "\n        Iterator over the values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_54Values(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_54Values(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_26_Values(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_26_Values, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 4238, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_11StringTable_56generator26, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Values, __pyx_n_s_StringTable_Values, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 4238, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.StringTable.Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_11StringTable_56generator26(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4238, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4245
 *             iterator
 *         """
 *         yield self.s             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4245, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":4238
 *         yield 's'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_11StringTable_59generator27(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":4249
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_11StringTable_57Setters[] = "\n        Iterator over functions to set the fields in a message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_57Setters(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_57Setters(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_27_Setters(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_27_Setters, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 4249, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_11StringTable_59generator27, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Setters, __pyx_n_s_StringTable_Setters, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 4249, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.StringTable.Setters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4256
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.s = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_11StringTable_7Setters_1setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_7Setters_1setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_7Setters_setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":4257
 *         """
 *         def setter(value):
 *             self.s = value             # <<<<<<<<<<<<<<
 *         yield setter
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 4257, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_s, __pyx_v_value) < 0) __PYX_ERR(0, 4257, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4256
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.s = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.StringTable.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4249
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

static PyObject *__pyx_gb_12pyrosm_proto_11StringTable_59generator27(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4249, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4256
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.s = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_11StringTable_7Setters_1setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_setter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4258
 *         def setter(value):
 *             self.s = value
 *         yield setter             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4258, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":4249
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

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

/* "pyrosm_proto.pxd":235
 *     cdef uint64_t __field_bitmap0
 * 
 *     cdef public bint _is_present_in_parent             # <<<<<<<<<<<<<<
 *     cdef bytes _cached_serialization
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_21_is_present_in_parent___get__(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_present_in_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 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("pyrosm_proto.StringTable._is_present_in_parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_11StringTable_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_11StringTable_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_11StringTable_21_is_present_in_parent_2__set__(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_11StringTable_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 235, __pyx_L1_error)
  __pyx_v_self->_is_present_in_parent = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.StringTable._is_present_in_parent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_61__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_61__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_12pyrosm_proto_11StringTable_60__reduce_cython__(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_63__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_11StringTable_63__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_12pyrosm_proto_11StringTable_62__setstate_cython__(((struct __pyx_obj_12pyrosm_proto_StringTable *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_12pyrosm_proto_11StringTable_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_StringTable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.StringTable.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4265
 * cdef class Info:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Info_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Info_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info___cinit__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static int __pyx_pf_12pyrosm_proto_4Info___cinit__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrosm_proto.pyx":4266
 * 
 *     def __cinit__(self):
 *         self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

  /* "pyrosm_proto.pyx":4265
 * cdef class Info:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

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

/* "pyrosm_proto.pyx":4270
 * 
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Info_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Info_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_2__init__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), __pyx_v_kwargs);

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

static int __pyx_pf_12pyrosm_proto_4Info_2__init__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_field_name = NULL;
  PyObject *__pyx_v_field_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrosm_proto.pyx":4271
 * 
 *     def __init__(self, **kwargs):
 *         self.reset()             # <<<<<<<<<<<<<<
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4272
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4272, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":4273
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     setattr(self, field_name, field_value)
 */
    __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4273, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 4273, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 4273, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 4273, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 4273, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 4273, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 4273, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":4274
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "pyrosm_proto.pyx":4275
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     setattr(self, field_name, field_value)             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 */
          __pyx_t_13 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name, __pyx_v_field_value); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 4275, __pyx_L8_error)

          /* "pyrosm_proto.pyx":4274
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L15_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrosm_proto.pyx":4276
 *                 try:
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return
 */
        __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_14) {
          __Pyx_AddTraceback("pyrosm_proto.Info.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 4276, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_6);

          /* "pyrosm_proto.pyx":4277
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))             # <<<<<<<<<<<<<<
 *         return
 * 
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4277, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_field_name);
          __Pyx_GIVEREF(__pyx_v_field_name);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_field_name);
          __pyx_t_15 = __Pyx_PyString_Format(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4277, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4277, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 4277, __pyx_L10_except_error)
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;

        /* "pyrosm_proto.pyx":4274
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 */
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L15_try_end:;
      }

      /* "pyrosm_proto.pyx":4273
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     setattr(self, field_name, field_value)
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":4272
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  }

  /* "pyrosm_proto.pyx":4278
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4270
 * 
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("pyrosm_proto.Info.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XDECREF(__pyx_v_field_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4280
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'version',
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Info_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_4__str__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_4__str__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_messages = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyrosm_proto.pyx":4281
 * 
 *     def __str__(self):
 *         fields = [             # <<<<<<<<<<<<<<
 *                           'version',
 *                           'timestamp',
 */
  __pyx_t_1 = PyList_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_version);
  __Pyx_GIVEREF(__pyx_n_s_version);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_version);
  __Pyx_INCREF(__pyx_n_s_timestamp);
  __Pyx_GIVEREF(__pyx_n_s_timestamp);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_timestamp);
  __Pyx_INCREF(__pyx_n_s_changeset);
  __Pyx_GIVEREF(__pyx_n_s_changeset);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_changeset);
  __Pyx_INCREF(__pyx_n_s_uid);
  __Pyx_GIVEREF(__pyx_n_s_uid);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_uid);
  __Pyx_INCREF(__pyx_n_s_user_sid);
  __Pyx_GIVEREF(__pyx_n_s_user_sid);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_user_sid);
  __Pyx_INCREF(__pyx_n_s_visible);
  __Pyx_GIVEREF(__pyx_n_s_visible);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_visible);
  __pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4288
 *                           'user_sid',
 *                           'visible',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]             # <<<<<<<<<<<<<<
 *         messages = []
 *         for message in messages:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 4288, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4288, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4288, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4288, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4288, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 4288, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4289
 *                           'visible',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []             # <<<<<<<<<<<<<<
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_messages = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4290
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  __pyx_t_1 = __pyx_v_messages; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 4290, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":4291
 *         messages = []
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))             # <<<<<<<<<<<<<<
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4291, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":4292
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    __pyx_t_4 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4292, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4292, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 4292, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4292, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 4292, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4292, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 4292, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":4293
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))             # <<<<<<<<<<<<<<
 *             components.append('}')
 *         return '\n'.join(components)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4293, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_line);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4293, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4293, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":4292
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":4294
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 *             components.append('}')             # <<<<<<<<<<<<<<
 *         return '\n'.join(components)
 * 
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_kp_s__2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4294, __pyx_L1_error)

    /* "pyrosm_proto.pyx":4290
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4295
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 *         return '\n'.join(components)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4280
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'version',
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.Info.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_messages);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4297
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Info_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_4Info_reset(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4297, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Info_7reset)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4297, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4300
 *         # reset values and populate defaults
 * 
 *         self.__field_bitmap0 = 0             # <<<<<<<<<<<<<<
 * 
 *         self._version = -1
 */
  __pyx_v_self->__pyx___field_bitmap0 = 0;

  /* "pyrosm_proto.pyx":4302
 *         self.__field_bitmap0 = 0
 * 
 *         self._version = -1             # <<<<<<<<<<<<<<
 *         self._timestamp = 0
 *         self._changeset = 0
 */
  __pyx_v_self->_version = -1;

  /* "pyrosm_proto.pyx":4303
 * 
 *         self._version = -1
 *         self._timestamp = 0             # <<<<<<<<<<<<<<
 *         self._changeset = 0
 *         self._uid = 0
 */
  __pyx_v_self->_timestamp = 0;

  /* "pyrosm_proto.pyx":4304
 *         self._version = -1
 *         self._timestamp = 0
 *         self._changeset = 0             # <<<<<<<<<<<<<<
 *         self._uid = 0
 *         self._user_sid = 0
 */
  __pyx_v_self->_changeset = 0;

  /* "pyrosm_proto.pyx":4305
 *         self._timestamp = 0
 *         self._changeset = 0
 *         self._uid = 0             # <<<<<<<<<<<<<<
 *         self._user_sid = 0
 *         self._visible = 0
 */
  __pyx_v_self->_uid = 0;

  /* "pyrosm_proto.pyx":4306
 *         self._changeset = 0
 *         self._uid = 0
 *         self._user_sid = 0             # <<<<<<<<<<<<<<
 *         self._visible = 0
 *         return
 */
  __pyx_v_self->_user_sid = 0;

  /* "pyrosm_proto.pyx":4307
 *         self._uid = 0
 *         self._user_sid = 0
 *         self._visible = 0             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_v_self->_visible = 0;

  /* "pyrosm_proto.pyx":4308
 *         self._user_sid = 0
 *         self._visible = 0
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4297
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

  /* 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_WriteUnraisable("pyrosm_proto.Info.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_6reset(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_6reset(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Info_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4297, __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("pyrosm_proto.Info.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4312
 * 
 *     @property
 *     def version(self):             # <<<<<<<<<<<<<<
 *         return self._version
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7version_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7version_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_7version___get__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_7version___get__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":4313
 *     @property
 *     def version(self):
 *         return self._version             # <<<<<<<<<<<<<<
 * 
 *     @version.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4312
 * 
 *     @property
 *     def version(self):             # <<<<<<<<<<<<<<
 *         return self._version
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Info.version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4316
 * 
 *     @version.setter
 *     def version(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         self._version = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Info_7version_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Info_7version_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_7version_2__set__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Info_7version_2__set__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int32_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":4317
 *     @version.setter
 *     def version(self, value):
 *         self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *         self._version = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

  /* "pyrosm_proto.pyx":4318
 *     def version(self, value):
 *         self.__field_bitmap0 |= 1
 *         self._version = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4318, __pyx_L1_error)
  __pyx_v_self->_version = __pyx_t_1;

  /* "pyrosm_proto.pyx":4319
 *         self.__field_bitmap0 |= 1
 *         self._version = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4316
 * 
 *     @version.setter
 *     def version(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         self._version = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.version.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4322
 * 
 *     @property
 *     def timestamp(self):             # <<<<<<<<<<<<<<
 *         return self._timestamp
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_9timestamp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Info_9timestamp_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_9timestamp___get__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_9timestamp___get__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":4323
 *     @property
 *     def timestamp(self):
 *         return self._timestamp             # <<<<<<<<<<<<<<
 * 
 *     @timestamp.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4322
 * 
 *     @property
 *     def timestamp(self):             # <<<<<<<<<<<<<<
 *         return self._timestamp
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Info.timestamp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4326
 * 
 *     @timestamp.setter
 *     def timestamp(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 2
 *         self._timestamp = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Info_9timestamp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Info_9timestamp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_9timestamp_2__set__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Info_9timestamp_2__set__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":4327
 *     @timestamp.setter
 *     def timestamp(self, value):
 *         self.__field_bitmap0 |= 2             # <<<<<<<<<<<<<<
 *         self._timestamp = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 2);

  /* "pyrosm_proto.pyx":4328
 *     def timestamp(self, value):
 *         self.__field_bitmap0 |= 2
 *         self._timestamp = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4328, __pyx_L1_error)
  __pyx_v_self->_timestamp = __pyx_t_1;

  /* "pyrosm_proto.pyx":4329
 *         self.__field_bitmap0 |= 2
 *         self._timestamp = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4326
 * 
 *     @timestamp.setter
 *     def timestamp(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 2
 *         self._timestamp = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.timestamp.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4332
 * 
 *     @property
 *     def changeset(self):             # <<<<<<<<<<<<<<
 *         return self._changeset
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_9changeset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Info_9changeset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_9changeset___get__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_9changeset___get__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":4333
 *     @property
 *     def changeset(self):
 *         return self._changeset             # <<<<<<<<<<<<<<
 * 
 *     @changeset.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_changeset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4332
 * 
 *     @property
 *     def changeset(self):             # <<<<<<<<<<<<<<
 *         return self._changeset
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Info.changeset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4336
 * 
 *     @changeset.setter
 *     def changeset(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 4
 *         self._changeset = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Info_9changeset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Info_9changeset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_9changeset_2__set__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Info_9changeset_2__set__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":4337
 *     @changeset.setter
 *     def changeset(self, value):
 *         self.__field_bitmap0 |= 4             # <<<<<<<<<<<<<<
 *         self._changeset = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 4);

  /* "pyrosm_proto.pyx":4338
 *     def changeset(self, value):
 *         self.__field_bitmap0 |= 4
 *         self._changeset = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4338, __pyx_L1_error)
  __pyx_v_self->_changeset = __pyx_t_1;

  /* "pyrosm_proto.pyx":4339
 *         self.__field_bitmap0 |= 4
 *         self._changeset = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4336
 * 
 *     @changeset.setter
 *     def changeset(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 4
 *         self._changeset = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.changeset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4342
 * 
 *     @property
 *     def uid(self):             # <<<<<<<<<<<<<<
 *         return self._uid
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_3uid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Info_3uid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_3uid___get__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_3uid___get__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":4343
 *     @property
 *     def uid(self):
 *         return self._uid             # <<<<<<<<<<<<<<
 * 
 *     @uid.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_self->_uid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4342
 * 
 *     @property
 *     def uid(self):             # <<<<<<<<<<<<<<
 *         return self._uid
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Info.uid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4346
 * 
 *     @uid.setter
 *     def uid(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 8
 *         self._uid = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Info_3uid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Info_3uid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_3uid_2__set__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Info_3uid_2__set__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int32_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":4347
 *     @uid.setter
 *     def uid(self, value):
 *         self.__field_bitmap0 |= 8             # <<<<<<<<<<<<<<
 *         self._uid = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 8);

  /* "pyrosm_proto.pyx":4348
 *     def uid(self, value):
 *         self.__field_bitmap0 |= 8
 *         self._uid = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4348, __pyx_L1_error)
  __pyx_v_self->_uid = __pyx_t_1;

  /* "pyrosm_proto.pyx":4349
 *         self.__field_bitmap0 |= 8
 *         self._uid = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4346
 * 
 *     @uid.setter
 *     def uid(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 8
 *         self._uid = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.uid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4352
 * 
 *     @property
 *     def user_sid(self):             # <<<<<<<<<<<<<<
 *         return self._user_sid
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_8user_sid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Info_8user_sid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_8user_sid___get__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_8user_sid___get__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":4353
 *     @property
 *     def user_sid(self):
 *         return self._user_sid             # <<<<<<<<<<<<<<
 * 
 *     @user_sid.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_self->_user_sid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4352
 * 
 *     @property
 *     def user_sid(self):             # <<<<<<<<<<<<<<
 *         return self._user_sid
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Info.user_sid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4356
 * 
 *     @user_sid.setter
 *     def user_sid(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 16
 *         self._user_sid = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Info_8user_sid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Info_8user_sid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_8user_sid_2__set__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Info_8user_sid_2__set__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  uint32_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":4357
 *     @user_sid.setter
 *     def user_sid(self, value):
 *         self.__field_bitmap0 |= 16             # <<<<<<<<<<<<<<
 *         self._user_sid = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 16);

  /* "pyrosm_proto.pyx":4358
 *     def user_sid(self, value):
 *         self.__field_bitmap0 |= 16
 *         self._user_sid = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4358, __pyx_L1_error)
  __pyx_v_self->_user_sid = __pyx_t_1;

  /* "pyrosm_proto.pyx":4359
 *         self.__field_bitmap0 |= 16
 *         self._user_sid = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4356
 * 
 *     @user_sid.setter
 *     def user_sid(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 16
 *         self._user_sid = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.user_sid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4362
 * 
 *     @property
 *     def visible(self):             # <<<<<<<<<<<<<<
 *         return self._visible
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7visible_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7visible_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_7visible___get__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_7visible___get__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":4363
 *     @property
 *     def visible(self):
 *         return self._visible             # <<<<<<<<<<<<<<
 * 
 *     @visible.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_self->_visible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4362
 * 
 *     @property
 *     def visible(self):             # <<<<<<<<<<<<<<
 *         return self._visible
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Info.visible.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4366
 * 
 *     @visible.setter
 *     def visible(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 32
 *         self._visible = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Info_7visible_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Info_7visible_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_7visible_2__set__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Info_7visible_2__set__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  uint32_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":4367
 *     @visible.setter
 *     def visible(self, value):
 *         self.__field_bitmap0 |= 32             # <<<<<<<<<<<<<<
 *         self._visible = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 32);

  /* "pyrosm_proto.pyx":4368
 *     def visible(self, value):
 *         self.__field_bitmap0 |= 32
 *         self._visible = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4368, __pyx_L1_error)
  __pyx_v_self->_visible = __pyx_t_1;

  /* "pyrosm_proto.pyx":4369
 *         self.__field_bitmap0 |= 32
 *         self._visible = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4366
 * 
 *     @visible.setter
 *     def visible(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 32
 *         self._visible = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.visible.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4372
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

static int __pyx_f_12pyrosm_proto_4Info__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, CYTHON_UNUSED int __pyx_v_cache) {
  int __pyx_v_current_offset;
  int64_t __pyx_v_key;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("_protobuf_deserialize", 0);

  /* "pyrosm_proto.pyx":4373
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):
 *         cdef int current_offset = 0             # <<<<<<<<<<<<<<
 *         cdef int64_t key
 *         while current_offset < size:
 */
  __pyx_v_current_offset = 0;

  /* "pyrosm_proto.pyx":4375
 *         cdef int current_offset = 0
 *         cdef int64_t key
 *         while current_offset < size:             # <<<<<<<<<<<<<<
 *             key = get_varint64(memory, &current_offset)
 *             # version
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_current_offset < __pyx_v_size) != 0);
    if (!__pyx_t_1) break;

    /* "pyrosm_proto.pyx":4376
 *         cdef int64_t key
 *         while current_offset < size:
 *             key = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # version
 *             if key == 8:
 */
    __pyx_v_key = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

    /* "pyrosm_proto.pyx":4378
 *             key = get_varint64(memory, &current_offset)
 *             # version
 *             if key == 8:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 self._version = get_varint32(memory, &current_offset)
 */
    switch (__pyx_v_key) {
      case 8:

      /* "pyrosm_proto.pyx":4379
 *             # version
 *             if key == 8:
 *                 self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *                 self._version = get_varint32(memory, &current_offset)
 *             # timestamp
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

      /* "pyrosm_proto.pyx":4380
 *             if key == 8:
 *                 self.__field_bitmap0 |= 1
 *                 self._version = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # timestamp
 *             elif key == 16:
 */
      __pyx_v_self->_version = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":4378
 *             key = get_varint64(memory, &current_offset)
 *             # version
 *             if key == 8:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 self._version = get_varint32(memory, &current_offset)
 */
      break;
      case 16:

      /* "pyrosm_proto.pyx":4383
 *             # timestamp
 *             elif key == 16:
 *                 self.__field_bitmap0 |= 2             # <<<<<<<<<<<<<<
 *                 self._timestamp = get_varint64(memory, &current_offset)
 *             # changeset
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 2);

      /* "pyrosm_proto.pyx":4384
 *             elif key == 16:
 *                 self.__field_bitmap0 |= 2
 *                 self._timestamp = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # changeset
 *             elif key == 24:
 */
      __pyx_v_self->_timestamp = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":4382
 *                 self._version = get_varint32(memory, &current_offset)
 *             # timestamp
 *             elif key == 16:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 2
 *                 self._timestamp = get_varint64(memory, &current_offset)
 */
      break;
      case 24:

      /* "pyrosm_proto.pyx":4387
 *             # changeset
 *             elif key == 24:
 *                 self.__field_bitmap0 |= 4             # <<<<<<<<<<<<<<
 *                 self._changeset = get_varint64(memory, &current_offset)
 *             # uid
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 4);

      /* "pyrosm_proto.pyx":4388
 *             elif key == 24:
 *                 self.__field_bitmap0 |= 4
 *                 self._changeset = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # uid
 *             elif key == 32:
 */
      __pyx_v_self->_changeset = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":4386
 *                 self._timestamp = get_varint64(memory, &current_offset)
 *             # changeset
 *             elif key == 24:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 4
 *                 self._changeset = get_varint64(memory, &current_offset)
 */
      break;
      case 32:

      /* "pyrosm_proto.pyx":4391
 *             # uid
 *             elif key == 32:
 *                 self.__field_bitmap0 |= 8             # <<<<<<<<<<<<<<
 *                 self._uid = get_varint32(memory, &current_offset)
 *             # user_sid
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 8);

      /* "pyrosm_proto.pyx":4392
 *             elif key == 32:
 *                 self.__field_bitmap0 |= 8
 *                 self._uid = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # user_sid
 *             elif key == 40:
 */
      __pyx_v_self->_uid = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":4390
 *                 self._changeset = get_varint64(memory, &current_offset)
 *             # uid
 *             elif key == 32:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 8
 *                 self._uid = get_varint32(memory, &current_offset)
 */
      break;
      case 40:

      /* "pyrosm_proto.pyx":4395
 *             # user_sid
 *             elif key == 40:
 *                 self.__field_bitmap0 |= 16             # <<<<<<<<<<<<<<
 *                 self._user_sid = get_varint32(memory, &current_offset)
 *             # visible
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 16);

      /* "pyrosm_proto.pyx":4396
 *             elif key == 40:
 *                 self.__field_bitmap0 |= 16
 *                 self._user_sid = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # visible
 *             elif key == 48:
 */
      __pyx_v_self->_user_sid = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":4394
 *                 self._uid = get_varint32(memory, &current_offset)
 *             # user_sid
 *             elif key == 40:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 16
 *                 self._user_sid = get_varint32(memory, &current_offset)
 */
      break;
      case 48:

      /* "pyrosm_proto.pyx":4399
 *             # visible
 *             elif key == 48:
 *                 self.__field_bitmap0 |= 32             # <<<<<<<<<<<<<<
 *                 self._visible = get_varint32(memory, &current_offset)
 *             # Unknown field - need to skip proper number of bytes
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 32);

      /* "pyrosm_proto.pyx":4400
 *             elif key == 48:
 *                 self.__field_bitmap0 |= 32
 *                 self._visible = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 */
      __pyx_v_self->_visible = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":4398
 *                 self._user_sid = get_varint32(memory, &current_offset)
 *             # visible
 *             elif key == 48:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 32
 *                 self._visible = get_varint32(memory, &current_offset)
 */
      break;
      default:

      /* "pyrosm_proto.pyx":4403
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)             # <<<<<<<<<<<<<<
 * 
 *         self._is_present_in_parent = True
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        if (unlikely(!(__pyx_f_12pyrobuf_util_skip_generic(__pyx_v_memory, (&__pyx_v_current_offset), __pyx_v_size, (__pyx_v_key & 0x7)) != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 4403, __pyx_L1_error)
        }
      }
      #endif
      break;
    }
  }

  /* "pyrosm_proto.pyx":4405
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)
 * 
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 * 
 *         return current_offset
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":4407
 *         self._is_present_in_parent = True
 * 
 *         return current_offset             # <<<<<<<<<<<<<<
 * 
 *     cpdef void Clear(self):
 */
  __pyx_r = __pyx_v_current_offset;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4372
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pyrosm_proto.Info._protobuf_deserialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4409
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Info_9Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_4Info_Clear(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Info_9Clear)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4409, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4411
 *     cpdef void Clear(self):
 *         """Clears all data that was set in the message."""
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4412
 *         """Clears all data that was set in the message."""
 *         self.reset()
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void ClearField(self, field_name):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4409
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Info.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_9Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_8Clear[] = "Clears all data that was set in the message.";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_9Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Clear (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_8Clear(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_8Clear(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Info_Clear(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4409, __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("pyrosm_proto.Info.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4414
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'version':
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Info_11ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static void __pyx_f_12pyrosm_proto_4Info_ClearField(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("ClearField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ClearField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4414, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Info_11ClearField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4414, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4416
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'version':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._version = -1
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_version, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4416, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":4417
 *         """Clears the contents of a given field."""
 *         if field_name == 'version':
 *             self.__field_bitmap0 &= ~1             # <<<<<<<<<<<<<<
 *             self._version = -1
 *         elif field_name == 'timestamp':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~1));

    /* "pyrosm_proto.pyx":4418
 *         if field_name == 'version':
 *             self.__field_bitmap0 &= ~1
 *             self._version = -1             # <<<<<<<<<<<<<<
 *         elif field_name == 'timestamp':
 *             self.__field_bitmap0 &= ~2
 */
    __pyx_v_self->_version = -1;

    /* "pyrosm_proto.pyx":4416
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'version':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._version = -1
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":4419
 *             self.__field_bitmap0 &= ~1
 *             self._version = -1
 *         elif field_name == 'timestamp':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~2
 *             self._timestamp = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_timestamp, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4419, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":4420
 *             self._version = -1
 *         elif field_name == 'timestamp':
 *             self.__field_bitmap0 &= ~2             # <<<<<<<<<<<<<<
 *             self._timestamp = 0
 *         elif field_name == 'changeset':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~2));

    /* "pyrosm_proto.pyx":4421
 *         elif field_name == 'timestamp':
 *             self.__field_bitmap0 &= ~2
 *             self._timestamp = 0             # <<<<<<<<<<<<<<
 *         elif field_name == 'changeset':
 *             self.__field_bitmap0 &= ~4
 */
    __pyx_v_self->_timestamp = 0;

    /* "pyrosm_proto.pyx":4419
 *             self.__field_bitmap0 &= ~1
 *             self._version = -1
 *         elif field_name == 'timestamp':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~2
 *             self._timestamp = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":4422
 *             self.__field_bitmap0 &= ~2
 *             self._timestamp = 0
 *         elif field_name == 'changeset':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~4
 *             self._changeset = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_changeset, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4422, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":4423
 *             self._timestamp = 0
 *         elif field_name == 'changeset':
 *             self.__field_bitmap0 &= ~4             # <<<<<<<<<<<<<<
 *             self._changeset = 0
 *         elif field_name == 'uid':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~4));

    /* "pyrosm_proto.pyx":4424
 *         elif field_name == 'changeset':
 *             self.__field_bitmap0 &= ~4
 *             self._changeset = 0             # <<<<<<<<<<<<<<
 *         elif field_name == 'uid':
 *             self.__field_bitmap0 &= ~8
 */
    __pyx_v_self->_changeset = 0;

    /* "pyrosm_proto.pyx":4422
 *             self.__field_bitmap0 &= ~2
 *             self._timestamp = 0
 *         elif field_name == 'changeset':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~4
 *             self._changeset = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":4425
 *             self.__field_bitmap0 &= ~4
 *             self._changeset = 0
 *         elif field_name == 'uid':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~8
 *             self._uid = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_uid, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4425, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":4426
 *             self._changeset = 0
 *         elif field_name == 'uid':
 *             self.__field_bitmap0 &= ~8             # <<<<<<<<<<<<<<
 *             self._uid = 0
 *         elif field_name == 'user_sid':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~8));

    /* "pyrosm_proto.pyx":4427
 *         elif field_name == 'uid':
 *             self.__field_bitmap0 &= ~8
 *             self._uid = 0             # <<<<<<<<<<<<<<
 *         elif field_name == 'user_sid':
 *             self.__field_bitmap0 &= ~16
 */
    __pyx_v_self->_uid = 0;

    /* "pyrosm_proto.pyx":4425
 *             self.__field_bitmap0 &= ~4
 *             self._changeset = 0
 *         elif field_name == 'uid':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~8
 *             self._uid = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":4428
 *             self.__field_bitmap0 &= ~8
 *             self._uid = 0
 *         elif field_name == 'user_sid':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~16
 *             self._user_sid = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_user_sid, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4428, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":4429
 *             self._uid = 0
 *         elif field_name == 'user_sid':
 *             self.__field_bitmap0 &= ~16             # <<<<<<<<<<<<<<
 *             self._user_sid = 0
 *         elif field_name == 'visible':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~16));

    /* "pyrosm_proto.pyx":4430
 *         elif field_name == 'user_sid':
 *             self.__field_bitmap0 &= ~16
 *             self._user_sid = 0             # <<<<<<<<<<<<<<
 *         elif field_name == 'visible':
 *             self.__field_bitmap0 &= ~32
 */
    __pyx_v_self->_user_sid = 0;

    /* "pyrosm_proto.pyx":4428
 *             self.__field_bitmap0 &= ~8
 *             self._uid = 0
 *         elif field_name == 'user_sid':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~16
 *             self._user_sid = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":4431
 *             self.__field_bitmap0 &= ~16
 *             self._user_sid = 0
 *         elif field_name == 'visible':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~32
 *             self._visible = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_visible, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4431, __pyx_L1_error)
  if (likely(__pyx_t_5)) {

    /* "pyrosm_proto.pyx":4432
 *             self._user_sid = 0
 *         elif field_name == 'visible':
 *             self.__field_bitmap0 &= ~32             # <<<<<<<<<<<<<<
 *             self._visible = 0
 *         else:
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~32));

    /* "pyrosm_proto.pyx":4433
 *         elif field_name == 'visible':
 *             self.__field_bitmap0 &= ~32
 *             self._visible = 0             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 */
    __pyx_v_self->_visible = 0;

    /* "pyrosm_proto.pyx":4431
 *             self.__field_bitmap0 &= ~16
 *             self._user_sid = 0
 *         elif field_name == 'visible':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~32
 *             self._visible = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":4435
 *             self._visible = 0
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 4435, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":4437
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void CopyFrom(self, Info other_msg):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4414
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'version':
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Info.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_11ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_10ClearField[] = "Clears the contents of a given field.";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_11ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ClearField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_10ClearField(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_10ClearField(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ClearField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Info_ClearField(__pyx_v_self, __pyx_v_field_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4414, __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("pyrosm_proto.Info.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4439
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, Info other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Info_13CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_4Info_CopyFrom(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CopyFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4439, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Info_13CopyFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4439, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4446
 *             other_msg (Info): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":4447
 *         """
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 *         self.reset()
 *         self.MergeFrom(other_msg)
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4446
 *             other_msg (Info): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  }

  /* "pyrosm_proto.pyx":4448
 *         if self is other_msg:
 *             return
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self.MergeFrom(other_msg)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4449
 *             return
 *         self.reset()
 *         self.MergeFrom(other_msg)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint HasField(self, field_name) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->MergeFrom(__pyx_v_self, __pyx_v_other_msg, 0);

  /* "pyrosm_proto.pyx":4439
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, Info other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Info.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_13CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_12CopyFrom[] = "\n        Copies the content of the specified message into the current message.\n\n        Params:\n            other_msg (Info): Message to copy into the current one.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_13CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CopyFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_Info, 1, "other_msg", 0))) __PYX_ERR(0, 4439, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_12CopyFrom(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_12CopyFrom(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Info_CopyFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4439, __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("pyrosm_proto.Info.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4451
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Info_15HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static int __pyx_f_12pyrosm_proto_4Info_HasField(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("HasField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_HasField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4451, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Info_15HasField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4451, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4451, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4458
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'version':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'timestamp':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_version, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4458, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":4459
 *         """
 *         if field_name == 'version':
 *             return self.__field_bitmap0 & 1 == 1             # <<<<<<<<<<<<<<
 *         if field_name == 'timestamp':
 *             return self.__field_bitmap0 & 2 == 2
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4458
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'version':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'timestamp':
 */
  }

  /* "pyrosm_proto.pyx":4460
 *         if field_name == 'version':
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'timestamp':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'changeset':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_timestamp, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4460, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":4461
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'timestamp':
 *             return self.__field_bitmap0 & 2 == 2             # <<<<<<<<<<<<<<
 *         if field_name == 'changeset':
 *             return self.__field_bitmap0 & 4 == 4
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4460
 *         if field_name == 'version':
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'timestamp':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'changeset':
 */
  }

  /* "pyrosm_proto.pyx":4462
 *         if field_name == 'timestamp':
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'changeset':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 4 == 4
 *         if field_name == 'uid':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_changeset, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4462, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":4463
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'changeset':
 *             return self.__field_bitmap0 & 4 == 4             # <<<<<<<<<<<<<<
 *         if field_name == 'uid':
 *             return self.__field_bitmap0 & 8 == 8
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4462
 *         if field_name == 'timestamp':
 *             return self.__field_bitmap0 & 2 == 2
 *         if field_name == 'changeset':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 4 == 4
 *         if field_name == 'uid':
 */
  }

  /* "pyrosm_proto.pyx":4464
 *         if field_name == 'changeset':
 *             return self.__field_bitmap0 & 4 == 4
 *         if field_name == 'uid':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 8 == 8
 *         if field_name == 'user_sid':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_uid, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4464, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":4465
 *             return self.__field_bitmap0 & 4 == 4
 *         if field_name == 'uid':
 *             return self.__field_bitmap0 & 8 == 8             # <<<<<<<<<<<<<<
 *         if field_name == 'user_sid':
 *             return self.__field_bitmap0 & 16 == 16
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 8) == 8);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4464
 *         if field_name == 'changeset':
 *             return self.__field_bitmap0 & 4 == 4
 *         if field_name == 'uid':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 8 == 8
 *         if field_name == 'user_sid':
 */
  }

  /* "pyrosm_proto.pyx":4466
 *         if field_name == 'uid':
 *             return self.__field_bitmap0 & 8 == 8
 *         if field_name == 'user_sid':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 16 == 16
 *         if field_name == 'visible':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_user_sid, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4466, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":4467
 *             return self.__field_bitmap0 & 8 == 8
 *         if field_name == 'user_sid':
 *             return self.__field_bitmap0 & 16 == 16             # <<<<<<<<<<<<<<
 *         if field_name == 'visible':
 *             return self.__field_bitmap0 & 32 == 32
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 16) == 16);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4466
 *         if field_name == 'uid':
 *             return self.__field_bitmap0 & 8 == 8
 *         if field_name == 'user_sid':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 16 == 16
 *         if field_name == 'visible':
 */
  }

  /* "pyrosm_proto.pyx":4468
 *         if field_name == 'user_sid':
 *             return self.__field_bitmap0 & 16 == 16
 *         if field_name == 'visible':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 32 == 32
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_visible, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4468, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":4469
 *             return self.__field_bitmap0 & 16 == 16
 *         if field_name == 'visible':
 *             return self.__field_bitmap0 & 32 == 32             # <<<<<<<<<<<<<<
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 32) == 32);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4468
 *         if field_name == 'user_sid':
 *             return self.__field_bitmap0 & 16 == 16
 *         if field_name == 'visible':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 32 == 32
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  }

  /* "pyrosm_proto.pyx":4470
 *         if field_name == 'visible':
 *             return self.__field_bitmap0 & 32 == 32
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint IsInitialized(self):
 */
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_singular, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 4470, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4451
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

  /* 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("pyrosm_proto.Info.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_15HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_14HasField[] = "\n        Checks if a certain field is set for the message.\n\n        Params:\n            field_name (str): The name of the field to check.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_15HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_14HasField(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_14HasField(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("HasField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_4Info_HasField(__pyx_v_self, __pyx_v_field_name, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4451, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.Info.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4472
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Info_17IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_12pyrosm_proto_4Info_IsInitialized(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_IsInitialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Info_17IsInitialized)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4472, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4472, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4483
 * 
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef void MergeFrom(self, Info other_msg):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4472
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

  /* 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_WriteUnraisable("pyrosm_proto.Info.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_17IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_16IsInitialized[] = "\n        Checks if the message is initialized.\n\n        Returns:\n            bool: True if the message is initialized (i.e. all of its required\n                fields are set).\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_17IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsInitialized (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_16IsInitialized(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_16IsInitialized(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_12pyrosm_proto_4Info_IsInitialized(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4472, __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("pyrosm_proto.Info.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4485
 *         return True
 * 
 *     cpdef void MergeFrom(self, Info other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Info_19MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_4Info_MergeFrom(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int32_t __pyx_t_7;
  int64_t __pyx_t_8;
  uint32_t __pyx_t_9;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4485, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Info_19MergeFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4485, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4493
 *         """
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":4494
 * 
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4493
 *         """
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "pyrosm_proto.pyx":4497
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._version = other_msg._version
 *             self.__field_bitmap0 |= 1
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":4498
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._version = other_msg._version             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:
 */
    __pyx_t_7 = __pyx_v_other_msg->_version;
    __pyx_v_self->_version = __pyx_t_7;

    /* "pyrosm_proto.pyx":4499
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._version = other_msg._version
 *             self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 2 == 2:
 *             self._timestamp = other_msg._timestamp
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

    /* "pyrosm_proto.pyx":4497
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._version = other_msg._version
 *             self.__field_bitmap0 |= 1
 */
  }

  /* "pyrosm_proto.pyx":4500
 *             self._version = other_msg._version
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             self._timestamp = other_msg._timestamp
 *             self.__field_bitmap0 |= 2
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":4501
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:
 *             self._timestamp = other_msg._timestamp             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:
 */
    __pyx_t_8 = __pyx_v_other_msg->_timestamp;
    __pyx_v_self->_timestamp = __pyx_t_8;

    /* "pyrosm_proto.pyx":4502
 *         if other_msg.__field_bitmap0 & 2 == 2:
 *             self._timestamp = other_msg._timestamp
 *             self.__field_bitmap0 |= 2             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 4 == 4:
 *             self._changeset = other_msg._changeset
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 2);

    /* "pyrosm_proto.pyx":4500
 *             self._version = other_msg._version
 *             self.__field_bitmap0 |= 1
 *         if other_msg.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             self._timestamp = other_msg._timestamp
 *             self.__field_bitmap0 |= 2
 */
  }

  /* "pyrosm_proto.pyx":4503
 *             self._timestamp = other_msg._timestamp
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             self._changeset = other_msg._changeset
 *             self.__field_bitmap0 |= 4
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":4504
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:
 *             self._changeset = other_msg._changeset             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 4
 *         if other_msg.__field_bitmap0 & 8 == 8:
 */
    __pyx_t_8 = __pyx_v_other_msg->_changeset;
    __pyx_v_self->_changeset = __pyx_t_8;

    /* "pyrosm_proto.pyx":4505
 *         if other_msg.__field_bitmap0 & 4 == 4:
 *             self._changeset = other_msg._changeset
 *             self.__field_bitmap0 |= 4             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 8 == 8:
 *             self._uid = other_msg._uid
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 4);

    /* "pyrosm_proto.pyx":4503
 *             self._timestamp = other_msg._timestamp
 *             self.__field_bitmap0 |= 2
 *         if other_msg.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             self._changeset = other_msg._changeset
 *             self.__field_bitmap0 |= 4
 */
  }

  /* "pyrosm_proto.pyx":4506
 *             self._changeset = other_msg._changeset
 *             self.__field_bitmap0 |= 4
 *         if other_msg.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             self._uid = other_msg._uid
 *             self.__field_bitmap0 |= 8
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 8) == 8) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":4507
 *             self.__field_bitmap0 |= 4
 *         if other_msg.__field_bitmap0 & 8 == 8:
 *             self._uid = other_msg._uid             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 8
 *         if other_msg.__field_bitmap0 & 16 == 16:
 */
    __pyx_t_7 = __pyx_v_other_msg->_uid;
    __pyx_v_self->_uid = __pyx_t_7;

    /* "pyrosm_proto.pyx":4508
 *         if other_msg.__field_bitmap0 & 8 == 8:
 *             self._uid = other_msg._uid
 *             self.__field_bitmap0 |= 8             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 16 == 16:
 *             self._user_sid = other_msg._user_sid
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 8);

    /* "pyrosm_proto.pyx":4506
 *             self._changeset = other_msg._changeset
 *             self.__field_bitmap0 |= 4
 *         if other_msg.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             self._uid = other_msg._uid
 *             self.__field_bitmap0 |= 8
 */
  }

  /* "pyrosm_proto.pyx":4509
 *             self._uid = other_msg._uid
 *             self.__field_bitmap0 |= 8
 *         if other_msg.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             self._user_sid = other_msg._user_sid
 *             self.__field_bitmap0 |= 16
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 16) == 16) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":4510
 *             self.__field_bitmap0 |= 8
 *         if other_msg.__field_bitmap0 & 16 == 16:
 *             self._user_sid = other_msg._user_sid             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 16
 *         if other_msg.__field_bitmap0 & 32 == 32:
 */
    __pyx_t_9 = __pyx_v_other_msg->_user_sid;
    __pyx_v_self->_user_sid = __pyx_t_9;

    /* "pyrosm_proto.pyx":4511
 *         if other_msg.__field_bitmap0 & 16 == 16:
 *             self._user_sid = other_msg._user_sid
 *             self.__field_bitmap0 |= 16             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 32 == 32:
 *             self._visible = other_msg._visible
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 16);

    /* "pyrosm_proto.pyx":4509
 *             self._uid = other_msg._uid
 *             self.__field_bitmap0 |= 8
 *         if other_msg.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             self._user_sid = other_msg._user_sid
 *             self.__field_bitmap0 |= 16
 */
  }

  /* "pyrosm_proto.pyx":4512
 *             self._user_sid = other_msg._user_sid
 *             self.__field_bitmap0 |= 16
 *         if other_msg.__field_bitmap0 & 32 == 32:             # <<<<<<<<<<<<<<
 *             self._visible = other_msg._visible
 *             self.__field_bitmap0 |= 32
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 32) == 32) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":4513
 *             self.__field_bitmap0 |= 16
 *         if other_msg.__field_bitmap0 & 32 == 32:
 *             self._visible = other_msg._visible             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 32
 * 
 */
    __pyx_t_9 = __pyx_v_other_msg->_visible;
    __pyx_v_self->_visible = __pyx_t_9;

    /* "pyrosm_proto.pyx":4514
 *         if other_msg.__field_bitmap0 & 32 == 32:
 *             self._visible = other_msg._visible
 *             self.__field_bitmap0 |= 32             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 32);

    /* "pyrosm_proto.pyx":4512
 *             self._user_sid = other_msg._user_sid
 *             self.__field_bitmap0 |= 16
 *         if other_msg.__field_bitmap0 & 32 == 32:             # <<<<<<<<<<<<<<
 *             self._visible = other_msg._visible
 *             self.__field_bitmap0 |= 32
 */
  }

  /* "pyrosm_proto.pyx":4516
 *             self.__field_bitmap0 |= 32
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4485
 *         return True
 * 
 *     cpdef void MergeFrom(self, Info other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Info.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_19MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_18MergeFrom[] = "\n        Merges the contents of the specified message into the current message.\n\n        Params:\n            other_msg: Message to merge into the current message.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_19MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_Info, 1, "other_msg", 0))) __PYX_ERR(0, 4485, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_18MergeFrom(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_18MergeFrom(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Info_MergeFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4485, __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("pyrosm_proto.Info.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4518
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Info_21MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_4Info_MergeFromString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Info_MergeFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  unsigned char const *__pyx_t_10;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Info_21MergeFromString)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4518, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4518, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4518, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4518, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4518, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4532
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, False)
 */
  __pyx_t_7 = (__pyx_v_size != Py_None);
  if ((__pyx_t_7 != 0)) {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4532, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_8;
  } else {
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4532, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_9;
  }
  __pyx_v_length = __pyx_t_5;

  /* "pyrosm_proto.pyx":4534
 *         length = size if size is not None else len(data)
 * 
 *         buf = self._protobuf_deserialize(data, length, False)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_10 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 4534, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_10, __pyx_v_length, 0);

  /* "pyrosm_proto.pyx":4536
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  __pyx_t_7 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "pyrosm_proto.pyx":4537
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_GIVEREF(__pyx_v_size);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_size);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Truncated_message_got_s_expected, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4537, __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, 4537, __pyx_L1_error)

    /* "pyrosm_proto.pyx":4536
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  }

  /* "pyrosm_proto.pyx":4539
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4541
 *         self._Modified()
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4518
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.Info.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_21MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_20MergeFromString[] = "\n        Merges serialized protocol buffer data into this message.\n\n        Params:\n            data (bytes): a string of binary data.\n            size (int): optional - the length of the data string\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_21MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "MergeFromString") < 0)) __PYX_ERR(0, 4518, __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_data = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MergeFromString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4518, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_20MergeFromString(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), __pyx_v_data, __pyx_v_size);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_20MergeFromString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_4Info_MergeFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_Info->MergeFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4518, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Info.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4543
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Info_23ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_4Info_ParseFromString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Info_ParseFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_reset = ((int)1);
  int __pyx_v_cache = ((int)0);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  unsigned char const *__pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_reset = __pyx_optional_args->reset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cache = __pyx_optional_args->cache;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Info_23ParseFromString)) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4543, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4543, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4543, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4543, __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(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4543, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_size);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 3+__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, 4543, __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, 4543, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4559
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         if reset:
 */
  __pyx_t_9 = (__pyx_v_size != Py_None);
  if ((__pyx_t_9 != 0)) {
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4559, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4559, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_11;
  }
  __pyx_v_length = __pyx_t_7;

  /* "pyrosm_proto.pyx":4561
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_9 = (__pyx_v_reset != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":4562
 * 
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":4561
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":4564
 *             self.reset()
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_12 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 4564, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_12, __pyx_v_length, __pyx_v_cache);

  /* "pyrosm_proto.pyx":4566
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  __pyx_t_9 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "pyrosm_proto.pyx":4567
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message")             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s_Truncated_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Truncated_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4567, __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, 4567, __pyx_L1_error)

    /* "pyrosm_proto.pyx":4566
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  }

  /* "pyrosm_proto.pyx":4569
 *             raise DecodeError("Truncated message")
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4571
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  __pyx_t_9 = (__pyx_v_cache != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":4572
 * 
 *         if cache:
 *             self._cached_serialization = data             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) __PYX_ERR(0, 4572, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":4571
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  }

  /* "pyrosm_proto.pyx":4574
 *             self._cached_serialization = data
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4543
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.Info.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_23ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_22ParseFromString[] = "\n        Populate the message class from a string of protobuf encoded binary data.\n\n        Params:\n            data (bytes): a string of binary data\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n            cache (bool): optional - whether to cache serialized data\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_23ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_v_reset;
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,&__pyx_n_s_cache,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromString") < 0)) __PYX_ERR(0, 4543, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    if (values[2]) {
      __pyx_v_reset = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4543, __pyx_L3_error)
    } else {
      __pyx_v_reset = ((int)1);
    }
    if (values[3]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4543, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromString", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4543, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_22ParseFromString(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset, __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_22ParseFromString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_4Info_ParseFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.reset = __pyx_v_reset;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_Info->ParseFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4543, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Info.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4577
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_25FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Info_25FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FromString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_24FromString(((PyTypeObject*)__pyx_v_cls), ((PyObject *)__pyx_v_s));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_24FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("FromString", 0);

  /* "pyrosm_proto.pyx":4578
 *     @classmethod
 *     def FromString(cls, s):
 *         message = cls()             # <<<<<<<<<<<<<<
 *         message.MergeFromString(s)
 *         return message
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4579
 *     def FromString(cls, s):
 *         message = cls()
 *         message.MergeFromString(s)             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4579, __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;

  /* "pyrosm_proto.pyx":4580
 *         message = cls()
 *         message.MergeFromString(s)
 *         return message             # <<<<<<<<<<<<<<
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4577
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Info.FromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4582
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         # version
 *         if self.__field_bitmap0 & 1 == 1:
 */

static void __pyx_f_12pyrosm_proto_4Info__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_buf, CYTHON_UNUSED int __pyx_v_cache) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("_protobuf_serialize", 0);

  /* "pyrosm_proto.pyx":4584
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 *         # version
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(8, buf)
 *             set_varint32(self._version, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":4585
 *         # version
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(8, buf)             # <<<<<<<<<<<<<<
 *             set_varint32(self._version, buf)
 *         # timestamp
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(8, __pyx_v_buf));

    /* "pyrosm_proto.pyx":4586
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(8, buf)
 *             set_varint32(self._version, buf)             # <<<<<<<<<<<<<<
 *         # timestamp
 *         if self.__field_bitmap0 & 2 == 2:
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_self->_version, __pyx_v_buf));

    /* "pyrosm_proto.pyx":4584
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 *         # version
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(8, buf)
 *             set_varint32(self._version, buf)
 */
  }

  /* "pyrosm_proto.pyx":4588
 *             set_varint32(self._version, buf)
 *         # timestamp
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             set_varint64(16, buf)
 *             set_varint64(self._timestamp, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":4589
 *         # timestamp
 *         if self.__field_bitmap0 & 2 == 2:
 *             set_varint64(16, buf)             # <<<<<<<<<<<<<<
 *             set_varint64(self._timestamp, buf)
 *         # changeset
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(16, __pyx_v_buf));

    /* "pyrosm_proto.pyx":4590
 *         if self.__field_bitmap0 & 2 == 2:
 *             set_varint64(16, buf)
 *             set_varint64(self._timestamp, buf)             # <<<<<<<<<<<<<<
 *         # changeset
 *         if self.__field_bitmap0 & 4 == 4:
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_v_self->_timestamp, __pyx_v_buf));

    /* "pyrosm_proto.pyx":4588
 *             set_varint32(self._version, buf)
 *         # timestamp
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             set_varint64(16, buf)
 *             set_varint64(self._timestamp, buf)
 */
  }

  /* "pyrosm_proto.pyx":4592
 *             set_varint64(self._timestamp, buf)
 *         # changeset
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             set_varint64(24, buf)
 *             set_varint64(self._changeset, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":4593
 *         # changeset
 *         if self.__field_bitmap0 & 4 == 4:
 *             set_varint64(24, buf)             # <<<<<<<<<<<<<<
 *             set_varint64(self._changeset, buf)
 *         # uid
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(24, __pyx_v_buf));

    /* "pyrosm_proto.pyx":4594
 *         if self.__field_bitmap0 & 4 == 4:
 *             set_varint64(24, buf)
 *             set_varint64(self._changeset, buf)             # <<<<<<<<<<<<<<
 *         # uid
 *         if self.__field_bitmap0 & 8 == 8:
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_v_self->_changeset, __pyx_v_buf));

    /* "pyrosm_proto.pyx":4592
 *             set_varint64(self._timestamp, buf)
 *         # changeset
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             set_varint64(24, buf)
 *             set_varint64(self._changeset, buf)
 */
  }

  /* "pyrosm_proto.pyx":4596
 *             set_varint64(self._changeset, buf)
 *         # uid
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             set_varint64(32, buf)
 *             set_varint32(self._uid, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 8) == 8) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":4597
 *         # uid
 *         if self.__field_bitmap0 & 8 == 8:
 *             set_varint64(32, buf)             # <<<<<<<<<<<<<<
 *             set_varint32(self._uid, buf)
 *         # user_sid
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(32, __pyx_v_buf));

    /* "pyrosm_proto.pyx":4598
 *         if self.__field_bitmap0 & 8 == 8:
 *             set_varint64(32, buf)
 *             set_varint32(self._uid, buf)             # <<<<<<<<<<<<<<
 *         # user_sid
 *         if self.__field_bitmap0 & 16 == 16:
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_self->_uid, __pyx_v_buf));

    /* "pyrosm_proto.pyx":4596
 *             set_varint64(self._changeset, buf)
 *         # uid
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             set_varint64(32, buf)
 *             set_varint32(self._uid, buf)
 */
  }

  /* "pyrosm_proto.pyx":4600
 *             set_varint32(self._uid, buf)
 *         # user_sid
 *         if self.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             set_varint64(40, buf)
 *             set_varint32(self._user_sid, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 16) == 16) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":4601
 *         # user_sid
 *         if self.__field_bitmap0 & 16 == 16:
 *             set_varint64(40, buf)             # <<<<<<<<<<<<<<
 *             set_varint32(self._user_sid, buf)
 *         # visible
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(40, __pyx_v_buf));

    /* "pyrosm_proto.pyx":4602
 *         if self.__field_bitmap0 & 16 == 16:
 *             set_varint64(40, buf)
 *             set_varint32(self._user_sid, buf)             # <<<<<<<<<<<<<<
 *         # visible
 *         if self.__field_bitmap0 & 32 == 32:
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_self->_user_sid, __pyx_v_buf));

    /* "pyrosm_proto.pyx":4600
 *             set_varint32(self._uid, buf)
 *         # user_sid
 *         if self.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             set_varint64(40, buf)
 *             set_varint32(self._user_sid, buf)
 */
  }

  /* "pyrosm_proto.pyx":4604
 *             set_varint32(self._user_sid, buf)
 *         # visible
 *         if self.__field_bitmap0 & 32 == 32:             # <<<<<<<<<<<<<<
 *             set_varint64(48, buf)
 *             set_varint32(self._visible, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 32) == 32) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":4605
 *         # visible
 *         if self.__field_bitmap0 & 32 == 32:
 *             set_varint64(48, buf)             # <<<<<<<<<<<<<<
 *             set_varint32(self._visible, buf)
 * 
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(48, __pyx_v_buf));

    /* "pyrosm_proto.pyx":4606
 *         if self.__field_bitmap0 & 32 == 32:
 *             set_varint64(48, buf)
 *             set_varint32(self._visible, buf)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void _Modified(self):
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_self->_visible, __pyx_v_buf));

    /* "pyrosm_proto.pyx":4604
 *             set_varint32(self._user_sid, buf)
 *         # visible
 *         if self.__field_bitmap0 & 32 == 32:             # <<<<<<<<<<<<<<
 *             set_varint64(48, buf)
 *             set_varint32(self._visible, buf)
 */
  }

  /* "pyrosm_proto.pyx":4582
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         # version
 *         if self.__field_bitmap0 & 1 == 1:
 */

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

/* "pyrosm_proto.pyx":4608
 *             set_varint32(self._visible, buf)
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Info_27_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_4Info__Modified(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Modified); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Info_27_Modified)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4608, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4609
 * 
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":4610
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()             # <<<<<<<<<<<<<<
 *         self._cached_serialization = None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_listener), __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4610, __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;

  /* "pyrosm_proto.pyx":4611
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
  __Pyx_DECREF(__pyx_v_self->_cached_serialization);
  __pyx_v_self->_cached_serialization = ((PyObject*)Py_None);

  /* "pyrosm_proto.pyx":4608
 *             set_varint32(self._visible, buf)
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Info._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_27_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Info_27_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_Modified (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_26_Modified(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_26_Modified(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Info__Modified(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4608, __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("pyrosm_proto.Info._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4613
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Info_29SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_4Info_SerializeToString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Info_SerializeToString *__pyx_optional_args) {
  int __pyx_v_cache = ((int)0);
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_out = 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;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cache = __pyx_optional_args->cache;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Info_29SerializeToString)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4613, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4613, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 4613, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4623
 * 
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_6 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":4624
 * 
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4623
 * 
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":4626
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4627
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)             # <<<<<<<<<<<<<<
 *         cdef bytes out = bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, __pyx_v_cache);

  /* "pyrosm_proto.pyx":4628
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4630
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  __pyx_t_7 = (__pyx_v_cache != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":4631
 * 
 *         if cache:
 *             self._cached_serialization = out             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = __pyx_v_out;

    /* "pyrosm_proto.pyx":4630
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  }

  /* "pyrosm_proto.pyx":4633
 *             self._cached_serialization = out
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializePartialToString(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4613
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.Info.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_29SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_28SerializeToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_29SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cache,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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SerializeToString") < 0)) __PYX_ERR(0, 4613, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4613, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("SerializeToString", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4613, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_28SerializeToString(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_28SerializeToString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_12pyrosm_proto_4Info_SerializeToString __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_Info->SerializeToString(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4613, __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("pyrosm_proto.Info.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4635
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Info_31SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_4Info_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_buf = 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;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4635, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Info_31SerializePartialToString)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4635, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 4635, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4642
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_5 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":4643
 *         """
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4642
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":4645
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4646
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)             # <<<<<<<<<<<<<<
 *         return bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, 0);

  /* "pyrosm_proto.pyx":4647
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *     def SetInParent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4635
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.Info.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_31SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_30SerializePartialToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_31SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_30SerializePartialToString(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_30SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_4Info_SerializePartialToString(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4635, __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("pyrosm_proto.Info.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4649
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_33SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_32SetInParent[] = "\n        Mark this an present in the parent.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_33SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_32SetInParent(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_32SetInParent(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent", 0);

  /* "pyrosm_proto.pyx":4653
 *         Mark this an present in the parent.
 *         """
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4649
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4655
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_35ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_34ParseFromJson[] = "\n        Populate the message class from a json string.\n\n        Params:\n            data (str): a json string\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_35ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromJson (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromJson") < 0)) __PYX_ERR(0, 4655, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    __pyx_v_reset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromJson", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4655, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_34ParseFromJson(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_34ParseFromJson(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("ParseFromJson", 0);
  __Pyx_INCREF(__pyx_v_size);

  /* "pyrosm_proto.pyx":4664
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4665
 *         """
 *         if size is None:
 *             size = len(data)             # <<<<<<<<<<<<<<
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4665, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":4664
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  }

  /* "pyrosm_proto.pyx":4666
 *         if size is None:
 *             size = len(data)
 *         d = json.loads(data[:size])             # <<<<<<<<<<<<<<
 *         self.ParseFromDict(d, reset)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_json); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_d = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":4667
 *             size = len(data)
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToJson(self, **kwargs):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4667, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4667, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4667, __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_d);
    __Pyx_GIVEREF(__pyx_v_d);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_d);
    __Pyx_INCREF(__pyx_v_reset);
    __Pyx_GIVEREF(__pyx_v_reset);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_reset);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":4655
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrosm_proto.Info.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4669
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_37SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_36SerializeToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_37SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializeToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializeToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_36SerializeToJson(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_36SerializeToJson(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializeToJson", 0);

  /* "pyrosm_proto.pyx":4676
 *             str: a json formatted string
 *         """
 *         d = self.SerializeToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4677
 *         """
 *         d = self.SerializeToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToJson(self, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4669
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Info.SerializeToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4679
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_39SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_38SerializePartialToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_39SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializePartialToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializePartialToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_38SerializePartialToJson(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_38SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToJson", 0);

  /* "pyrosm_proto.pyx":4686
 *             str: a json formatted string
 *         """
 *         d = self.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4687
 *         """
 *         d = self.SerializePartialToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromDict(self, d, reset=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4679
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Info.SerializePartialToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4689
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_41ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_40ParseFromDict[] = "\n        Populate the message class from a Python dictionary.\n\n        Params:\n            d (dict): a Python dictionary representing the message\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_41ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,&__pyx_n_s_reset,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 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_reset);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromDict") < 0)) __PYX_ERR(0, 4689, __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_d = values[0];
    __pyx_v_reset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromDict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4689, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_40ParseFromDict(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), __pyx_v_d, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_40ParseFromDict(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset) {
  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;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("ParseFromDict", 0);

  /* "pyrosm_proto.pyx":4697
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reset); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4697, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":4698
 *         """
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         assert type(d) == dict
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":4697
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":4700
 *             self.reset()
 * 
 *         assert type(d) == dict             # <<<<<<<<<<<<<<
 *         try:
 *             self.version = d["version"]
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_d)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4700, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4700, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 4700, __pyx_L1_error)
    }
  }
  #endif

  /* "pyrosm_proto.pyx":4701
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.version = d["version"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":4702
 *         assert type(d) == dict
 *         try:
 *             self.version = d["version"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4702, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_version, __pyx_t_2) < 0) __PYX_ERR(0, 4702, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":4701
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.version = d["version"]
 *         except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":4703
 *         try:
 *             self.version = d["version"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":4701
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.version = d["version"]
 *         except KeyError:
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":4705
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.timestamp = d["timestamp"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":4706
 *             pass
 *         try:
 *             self.timestamp = d["timestamp"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4706, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_timestamp, __pyx_t_2) < 0) __PYX_ERR(0, 4706, __pyx_L10_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":4705
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.timestamp = d["timestamp"]
 *         except KeyError:
 */
    }
    __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_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":4707
 *         try:
 *             self.timestamp = d["timestamp"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    goto __pyx_L12_except_error;
    __pyx_L12_except_error:;

    /* "pyrosm_proto.pyx":4705
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.timestamp = d["timestamp"]
 *         except KeyError:
 */
    __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:;
  }

  /* "pyrosm_proto.pyx":4709
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.changeset = d["changeset"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":4710
 *             pass
 *         try:
 *             self.changeset = d["changeset"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_changeset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4710, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_changeset, __pyx_t_2) < 0) __PYX_ERR(0, 4710, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":4709
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.changeset = d["changeset"]
 *         except KeyError:
 */
    }
    __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_L21_try_end;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":4711
 *         try:
 *             self.changeset = d["changeset"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L17_exception_handled;
    }
    goto __pyx_L18_except_error;
    __pyx_L18_except_error:;

    /* "pyrosm_proto.pyx":4709
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.changeset = d["changeset"]
 *         except KeyError:
 */
    __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_L17_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_L21_try_end:;
  }

  /* "pyrosm_proto.pyx":4713
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.uid = d["uid"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":4714
 *             pass
 *         try:
 *             self.uid = d["uid"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_uid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4714, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_uid, __pyx_t_2) < 0) __PYX_ERR(0, 4714, __pyx_L22_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":4713
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.uid = d["uid"]
 *         except KeyError:
 */
    }
    __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_L27_try_end;
    __pyx_L22_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":4715
 *         try:
 *             self.uid = d["uid"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L23_exception_handled;
    }
    goto __pyx_L24_except_error;
    __pyx_L24_except_error:;

    /* "pyrosm_proto.pyx":4713
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.uid = d["uid"]
 *         except KeyError:
 */
    __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_L23_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_L27_try_end:;
  }

  /* "pyrosm_proto.pyx":4717
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.user_sid = d["user_sid"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":4718
 *             pass
 *         try:
 *             self.user_sid = d["user_sid"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_user_sid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4718, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_user_sid, __pyx_t_2) < 0) __PYX_ERR(0, 4718, __pyx_L28_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":4717
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.user_sid = d["user_sid"]
 *         except KeyError:
 */
    }
    __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_L33_try_end;
    __pyx_L28_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":4719
 *         try:
 *             self.user_sid = d["user_sid"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L29_exception_handled;
    }
    goto __pyx_L30_except_error;
    __pyx_L30_except_error:;

    /* "pyrosm_proto.pyx":4717
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.user_sid = d["user_sid"]
 *         except KeyError:
 */
    __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_L29_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_L33_try_end:;
  }

  /* "pyrosm_proto.pyx":4721
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.visible = d["visible"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":4722
 *             pass
 *         try:
 *             self.visible = d["visible"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_visible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4722, __pyx_L34_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_visible, __pyx_t_2) < 0) __PYX_ERR(0, 4722, __pyx_L34_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":4721
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.visible = d["visible"]
 *         except KeyError:
 */
    }
    __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_L39_try_end;
    __pyx_L34_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":4723
 *         try:
 *             self.visible = d["visible"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L35_exception_handled;
    }
    goto __pyx_L36_except_error;
    __pyx_L36_except_error:;

    /* "pyrosm_proto.pyx":4721
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.visible = d["visible"]
 *         except KeyError:
 */
    __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_L35_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_L39_try_end:;
  }

  /* "pyrosm_proto.pyx":4726
 *             pass
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4728
 *         self._Modified()
 * 
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4689
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.Info.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4730
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_43SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_42SerializeToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_43SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_42SerializeToDict(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_42SerializeToDict(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToDict", 0);

  /* "pyrosm_proto.pyx":4737
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["version"] = self.version
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4738
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["version"] = self.version
 *         if self.__field_bitmap0 & 2 == 2:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4739
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["version"] = self.version             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["timestamp"] = self.timestamp
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_version, __pyx_t_1) < 0)) __PYX_ERR(0, 4739, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":4738
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["version"] = self.version
 *         if self.__field_bitmap0 & 2 == 2:
 */
  }

  /* "pyrosm_proto.pyx":4740
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["version"] = self.version
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["timestamp"] = self.timestamp
 *         if self.__field_bitmap0 & 4 == 4:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4741
 *             out["version"] = self.version
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["timestamp"] = self.timestamp             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["changeset"] = self.changeset
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_timestamp, __pyx_t_1) < 0)) __PYX_ERR(0, 4741, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":4740
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["version"] = self.version
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["timestamp"] = self.timestamp
 *         if self.__field_bitmap0 & 4 == 4:
 */
  }

  /* "pyrosm_proto.pyx":4742
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["timestamp"] = self.timestamp
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["changeset"] = self.changeset
 *         if self.__field_bitmap0 & 8 == 8:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4743
 *             out["timestamp"] = self.timestamp
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["changeset"] = self.changeset             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["uid"] = self.uid
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_changeset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_changeset, __pyx_t_1) < 0)) __PYX_ERR(0, 4743, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":4742
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["timestamp"] = self.timestamp
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["changeset"] = self.changeset
 *         if self.__field_bitmap0 & 8 == 8:
 */
  }

  /* "pyrosm_proto.pyx":4744
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["changeset"] = self.changeset
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             out["uid"] = self.uid
 *         if self.__field_bitmap0 & 16 == 16:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 8) == 8) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4745
 *             out["changeset"] = self.changeset
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["uid"] = self.uid             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 16 == 16:
 *             out["user_sid"] = self.user_sid
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_uid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_uid, __pyx_t_1) < 0)) __PYX_ERR(0, 4745, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":4744
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["changeset"] = self.changeset
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             out["uid"] = self.uid
 *         if self.__field_bitmap0 & 16 == 16:
 */
  }

  /* "pyrosm_proto.pyx":4746
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["uid"] = self.uid
 *         if self.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             out["user_sid"] = self.user_sid
 *         if self.__field_bitmap0 & 32 == 32:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 16) == 16) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4747
 *             out["uid"] = self.uid
 *         if self.__field_bitmap0 & 16 == 16:
 *             out["user_sid"] = self.user_sid             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 32 == 32:
 *             out["visible"] = self.visible
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_user_sid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_user_sid, __pyx_t_1) < 0)) __PYX_ERR(0, 4747, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":4746
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["uid"] = self.uid
 *         if self.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             out["user_sid"] = self.user_sid
 *         if self.__field_bitmap0 & 32 == 32:
 */
  }

  /* "pyrosm_proto.pyx":4748
 *         if self.__field_bitmap0 & 16 == 16:
 *             out["user_sid"] = self.user_sid
 *         if self.__field_bitmap0 & 32 == 32:             # <<<<<<<<<<<<<<
 *             out["visible"] = self.visible
 * 
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 32) == 32) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4749
 *             out["user_sid"] = self.user_sid
 *         if self.__field_bitmap0 & 32 == 32:
 *             out["visible"] = self.visible             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_visible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_visible, __pyx_t_1) < 0)) __PYX_ERR(0, 4749, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":4748
 *         if self.__field_bitmap0 & 16 == 16:
 *             out["user_sid"] = self.user_sid
 *         if self.__field_bitmap0 & 32 == 32:             # <<<<<<<<<<<<<<
 *             out["visible"] = self.visible
 * 
 */
  }

  /* "pyrosm_proto.pyx":4751
 *             out["visible"] = self.visible
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4730
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Info.SerializeToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4753
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_45SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_44SerializePartialToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_45SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_44SerializePartialToDict(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_44SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializePartialToDict", 0);

  /* "pyrosm_proto.pyx":4760
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["version"] = self.version
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4761
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["version"] = self.version
 *         if self.__field_bitmap0 & 2 == 2:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4762
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["version"] = self.version             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["timestamp"] = self.timestamp
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_version, __pyx_t_1) < 0)) __PYX_ERR(0, 4762, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":4761
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["version"] = self.version
 *         if self.__field_bitmap0 & 2 == 2:
 */
  }

  /* "pyrosm_proto.pyx":4763
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["version"] = self.version
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["timestamp"] = self.timestamp
 *         if self.__field_bitmap0 & 4 == 4:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 2) == 2) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4764
 *             out["version"] = self.version
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["timestamp"] = self.timestamp             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["changeset"] = self.changeset
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_timestamp, __pyx_t_1) < 0)) __PYX_ERR(0, 4764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":4763
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["version"] = self.version
 *         if self.__field_bitmap0 & 2 == 2:             # <<<<<<<<<<<<<<
 *             out["timestamp"] = self.timestamp
 *         if self.__field_bitmap0 & 4 == 4:
 */
  }

  /* "pyrosm_proto.pyx":4765
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["timestamp"] = self.timestamp
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["changeset"] = self.changeset
 *         if self.__field_bitmap0 & 8 == 8:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 4) == 4) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4766
 *             out["timestamp"] = self.timestamp
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["changeset"] = self.changeset             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["uid"] = self.uid
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_changeset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_changeset, __pyx_t_1) < 0)) __PYX_ERR(0, 4766, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":4765
 *         if self.__field_bitmap0 & 2 == 2:
 *             out["timestamp"] = self.timestamp
 *         if self.__field_bitmap0 & 4 == 4:             # <<<<<<<<<<<<<<
 *             out["changeset"] = self.changeset
 *         if self.__field_bitmap0 & 8 == 8:
 */
  }

  /* "pyrosm_proto.pyx":4767
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["changeset"] = self.changeset
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             out["uid"] = self.uid
 *         if self.__field_bitmap0 & 16 == 16:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 8) == 8) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4768
 *             out["changeset"] = self.changeset
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["uid"] = self.uid             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 16 == 16:
 *             out["user_sid"] = self.user_sid
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_uid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_uid, __pyx_t_1) < 0)) __PYX_ERR(0, 4768, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":4767
 *         if self.__field_bitmap0 & 4 == 4:
 *             out["changeset"] = self.changeset
 *         if self.__field_bitmap0 & 8 == 8:             # <<<<<<<<<<<<<<
 *             out["uid"] = self.uid
 *         if self.__field_bitmap0 & 16 == 16:
 */
  }

  /* "pyrosm_proto.pyx":4769
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["uid"] = self.uid
 *         if self.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             out["user_sid"] = self.user_sid
 *         if self.__field_bitmap0 & 32 == 32:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 16) == 16) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4770
 *             out["uid"] = self.uid
 *         if self.__field_bitmap0 & 16 == 16:
 *             out["user_sid"] = self.user_sid             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 32 == 32:
 *             out["visible"] = self.visible
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_user_sid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_user_sid, __pyx_t_1) < 0)) __PYX_ERR(0, 4770, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":4769
 *         if self.__field_bitmap0 & 8 == 8:
 *             out["uid"] = self.uid
 *         if self.__field_bitmap0 & 16 == 16:             # <<<<<<<<<<<<<<
 *             out["user_sid"] = self.user_sid
 *         if self.__field_bitmap0 & 32 == 32:
 */
  }

  /* "pyrosm_proto.pyx":4771
 *         if self.__field_bitmap0 & 16 == 16:
 *             out["user_sid"] = self.user_sid
 *         if self.__field_bitmap0 & 32 == 32:             # <<<<<<<<<<<<<<
 *             out["visible"] = self.visible
 * 
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 32) == 32) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4772
 *             out["user_sid"] = self.user_sid
 *         if self.__field_bitmap0 & 32 == 32:
 *             out["visible"] = self.visible             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_visible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_visible, __pyx_t_1) < 0)) __PYX_ERR(0, 4772, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":4771
 *         if self.__field_bitmap0 & 16 == 16:
 *             out["user_sid"] = self.user_sid
 *         if self.__field_bitmap0 & 32 == 32:             # <<<<<<<<<<<<<<
 *             out["visible"] = self.visible
 * 
 */
  }

  /* "pyrosm_proto.pyx":4774
 *             out["visible"] = self.visible
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def Items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4753
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Info.SerializePartialToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_4Info_48generator28(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":4776
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_47Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_46Items[] = "\n        Iterator over the field names and values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_47Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_46Items(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_46Items(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_28_Items(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_28_Items, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 4776, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_4Info_48generator28, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Items, __pyx_n_s_Info_Items, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 4776, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_4Info_48generator28(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4776, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4783
 *             iterator
 *         """
 *         yield 'version', self.version             # <<<<<<<<<<<<<<
 *         yield 'timestamp', self.timestamp
 *         yield 'changeset', self.changeset
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_version);
  __Pyx_GIVEREF(__pyx_n_s_version);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_version);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4783, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4784
 *         """
 *         yield 'version', self.version
 *         yield 'timestamp', self.timestamp             # <<<<<<<<<<<<<<
 *         yield 'changeset', self.changeset
 *         yield 'uid', self.uid
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_timestamp);
  __Pyx_GIVEREF(__pyx_n_s_timestamp);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_timestamp);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4784, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4785
 *         yield 'version', self.version
 *         yield 'timestamp', self.timestamp
 *         yield 'changeset', self.changeset             # <<<<<<<<<<<<<<
 *         yield 'uid', self.uid
 *         yield 'user_sid', self.user_sid
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_changeset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_changeset);
  __Pyx_GIVEREF(__pyx_n_s_changeset);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_changeset);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4785, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4786
 *         yield 'timestamp', self.timestamp
 *         yield 'changeset', self.changeset
 *         yield 'uid', self.uid             # <<<<<<<<<<<<<<
 *         yield 'user_sid', self.user_sid
 *         yield 'visible', self.visible
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_uid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_uid);
  __Pyx_GIVEREF(__pyx_n_s_uid);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_uid);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4786, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4787
 *         yield 'changeset', self.changeset
 *         yield 'uid', self.uid
 *         yield 'user_sid', self.user_sid             # <<<<<<<<<<<<<<
 *         yield 'visible', self.visible
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_user_sid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_user_sid);
  __Pyx_GIVEREF(__pyx_n_s_user_sid);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_user_sid);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4787, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4788
 *         yield 'uid', self.uid
 *         yield 'user_sid', self.user_sid
 *         yield 'visible', self.visible             # <<<<<<<<<<<<<<
 * 
 *     def Fields(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_visible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_visible);
  __Pyx_GIVEREF(__pyx_n_s_visible);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_visible);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4788, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":4776
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_4Info_51generator29(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":4790
 *         yield 'visible', self.visible
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_50Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_49Fields[] = "\n        Iterator over the field names of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_50Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_49Fields(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_49Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_29_Fields(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_29_Fields, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 4790, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_4Info_51generator29, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Fields, __pyx_n_s_Info_Fields, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 4790, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_4Info_51generator29(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4790, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4797
 *             iterator
 *         """
 *         yield 'version'             # <<<<<<<<<<<<<<
 *         yield 'timestamp'
 *         yield 'changeset'
 */
  __Pyx_INCREF(__pyx_n_s_version);
  __pyx_r = __pyx_n_s_version;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4797, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4798
 *         """
 *         yield 'version'
 *         yield 'timestamp'             # <<<<<<<<<<<<<<
 *         yield 'changeset'
 *         yield 'uid'
 */
  __Pyx_INCREF(__pyx_n_s_timestamp);
  __pyx_r = __pyx_n_s_timestamp;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4798, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4799
 *         yield 'version'
 *         yield 'timestamp'
 *         yield 'changeset'             # <<<<<<<<<<<<<<
 *         yield 'uid'
 *         yield 'user_sid'
 */
  __Pyx_INCREF(__pyx_n_s_changeset);
  __pyx_r = __pyx_n_s_changeset;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4799, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4800
 *         yield 'timestamp'
 *         yield 'changeset'
 *         yield 'uid'             # <<<<<<<<<<<<<<
 *         yield 'user_sid'
 *         yield 'visible'
 */
  __Pyx_INCREF(__pyx_n_s_uid);
  __pyx_r = __pyx_n_s_uid;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4800, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4801
 *         yield 'changeset'
 *         yield 'uid'
 *         yield 'user_sid'             # <<<<<<<<<<<<<<
 *         yield 'visible'
 * 
 */
  __Pyx_INCREF(__pyx_n_s_user_sid);
  __pyx_r = __pyx_n_s_user_sid;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4801, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4802
 *         yield 'uid'
 *         yield 'user_sid'
 *         yield 'visible'             # <<<<<<<<<<<<<<
 * 
 *     def Values(self):
 */
  __Pyx_INCREF(__pyx_n_s_visible);
  __pyx_r = __pyx_n_s_visible;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4802, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":4790
 *         yield 'visible', self.visible
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_4Info_54generator30(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":4804
 *         yield 'visible'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_53Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_52Values[] = "\n        Iterator over the values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_53Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_52Values(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_52Values(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_30_Values(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_30_Values, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 4804, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_4Info_54generator30, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Values, __pyx_n_s_Info_Values, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 4804, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_4Info_54generator30(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4804, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4811
 *             iterator
 *         """
 *         yield self.version             # <<<<<<<<<<<<<<
 *         yield self.timestamp
 *         yield self.changeset
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4811, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4812
 *         """
 *         yield self.version
 *         yield self.timestamp             # <<<<<<<<<<<<<<
 *         yield self.changeset
 *         yield self.uid
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4812, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4813
 *         yield self.version
 *         yield self.timestamp
 *         yield self.changeset             # <<<<<<<<<<<<<<
 *         yield self.uid
 *         yield self.user_sid
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_changeset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4813, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4814
 *         yield self.timestamp
 *         yield self.changeset
 *         yield self.uid             # <<<<<<<<<<<<<<
 *         yield self.user_sid
 *         yield self.visible
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_uid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4814, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4815
 *         yield self.changeset
 *         yield self.uid
 *         yield self.user_sid             # <<<<<<<<<<<<<<
 *         yield self.visible
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_user_sid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4815, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4816
 *         yield self.uid
 *         yield self.user_sid
 *         yield self.visible             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_visible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4816, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":4804
 *         yield 'visible'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_4Info_57generator31(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":4820
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_56Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Info_55Setters[] = "\n        Iterator over functions to set the fields in a message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Info_56Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_55Setters(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_55Setters(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_31_Setters(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_31_Setters, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 4820, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_4Info_57generator31, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Setters, __pyx_n_s_Info_Setters, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 4820, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.Setters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4827
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.version = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Info_7Setters_1setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_7Setters_1setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_7Setters_setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":4828
 *         """
 *         def setter(value):
 *             self.version = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 4828, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_version, __pyx_v_value) < 0) __PYX_ERR(0, 4828, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4827
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.version = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4830
 *             self.version = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.timestamp = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Info_7Setters_3setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_7Setters_3setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_7Setters_2setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":4831
 *         yield setter
 *         def setter(value):
 *             self.timestamp = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 4831, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_timestamp, __pyx_v_value) < 0) __PYX_ERR(0, 4831, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4830
 *             self.version = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.timestamp = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4833
 *             self.timestamp = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.changeset = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Info_7Setters_5setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_7Setters_5setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_7Setters_4setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":4834
 *         yield setter
 *         def setter(value):
 *             self.changeset = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 4834, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_changeset, __pyx_v_value) < 0) __PYX_ERR(0, 4834, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4833
 *             self.timestamp = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.changeset = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4836
 *             self.changeset = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.uid = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Info_7Setters_7setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_7Setters_7setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_7Setters_6setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":4837
 *         yield setter
 *         def setter(value):
 *             self.uid = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 4837, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_uid, __pyx_v_value) < 0) __PYX_ERR(0, 4837, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4836
 *             self.changeset = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.uid = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4839
 *             self.uid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.user_sid = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Info_7Setters_9setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_7Setters_9setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_7Setters_8setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":4840
 *         yield setter
 *         def setter(value):
 *             self.user_sid = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 4840, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_user_sid, __pyx_v_value) < 0) __PYX_ERR(0, 4840, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4839
 *             self.uid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.user_sid = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4842
 *             self.user_sid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.visible = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7Setters_11setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Info_7Setters_11setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_7Setters_11setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Info_7Setters_11setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_7Setters_10setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_7Setters_10setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":4843
 *         yield setter
 *         def setter(value):
 *             self.visible = value             # <<<<<<<<<<<<<<
 *         yield setter
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 4843, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_visible, __pyx_v_value) < 0) __PYX_ERR(0, 4843, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4842
 *             self.user_sid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.visible = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4820
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

static PyObject *__pyx_gb_12pyrosm_proto_4Info_57generator31(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4820, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4827
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.version = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Info_7Setters_1setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_setter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4829
 *         def setter(value):
 *             self.version = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.timestamp = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4829, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4830
 *             self.version = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.timestamp = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Info_7Setters_3setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4832
 *         def setter(value):
 *             self.timestamp = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.changeset = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4832, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4833
 *             self.timestamp = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.changeset = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Info_7Setters_5setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4835
 *         def setter(value):
 *             self.changeset = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.uid = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4835, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4836
 *             self.changeset = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.uid = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Info_7Setters_7setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4838
 *         def setter(value):
 *             self.uid = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.user_sid = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4838, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4839
 *             self.uid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.user_sid = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Info_7Setters_9setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4841
 *         def setter(value):
 *             self.user_sid = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.visible = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4841, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4842
 *             self.user_sid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.visible = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Info_7Setters_11setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4844
 *         def setter(value):
 *             self.visible = value
 *         yield setter             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4844, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":4820
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

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

/* "pyrosm_proto.pxd":272
 *     cdef uint64_t __field_bitmap0
 * 
 *     cdef public bint _is_present_in_parent             # <<<<<<<<<<<<<<
 *     cdef bytes _cached_serialization
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Info_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_21_is_present_in_parent___get__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_present_in_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Info._is_present_in_parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Info_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Info_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Info_21_is_present_in_parent_2__set__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Info_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 272, __pyx_L1_error)
  __pyx_v_self->_is_present_in_parent = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Info._is_present_in_parent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_59__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Info_59__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_12pyrosm_proto_4Info_58__reduce_cython__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_58__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Info.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Info_61__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Info_61__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_12pyrosm_proto_4Info_60__setstate_cython__(((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Info_60__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Info *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Info.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4851
 * cdef class DenseInfo:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_9DenseInfo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_9DenseInfo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo___cinit__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static int __pyx_pf_12pyrosm_proto_9DenseInfo___cinit__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrosm_proto.pyx":4852
 * 
 *     def __cinit__(self):
 *         self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

  /* "pyrosm_proto.pyx":4851
 * cdef class DenseInfo:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

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

/* "pyrosm_proto.pyx":4854
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._version is not None:
 */

/* Python wrapper */
static void __pyx_pw_12pyrosm_proto_9DenseInfo_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrosm_proto_9DenseInfo_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrosm_proto_9DenseInfo_2__dealloc__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static void __pyx_pf_12pyrosm_proto_9DenseInfo_2__dealloc__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrosm_proto.pyx":4856
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._version is not None:             # <<<<<<<<<<<<<<
 *             self._version._listener = <PyObject *>null_listener
 *         if self._timestamp is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_version) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4857
 *         # Remove any references to self from child messages or repeated fields
 *         if self._version is not None:
 *             self._version._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._timestamp is not None:
 *             self._timestamp._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_version->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":4856
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._version is not None:             # <<<<<<<<<<<<<<
 *             self._version._listener = <PyObject *>null_listener
 *         if self._timestamp is not None:
 */
  }

  /* "pyrosm_proto.pyx":4858
 *         if self._version is not None:
 *             self._version._listener = <PyObject *>null_listener
 *         if self._timestamp is not None:             # <<<<<<<<<<<<<<
 *             self._timestamp._listener = <PyObject *>null_listener
 *         if self._changeset is not None:
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_timestamp) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":4859
 *             self._version._listener = <PyObject *>null_listener
 *         if self._timestamp is not None:
 *             self._timestamp._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._changeset is not None:
 *             self._changeset._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_timestamp->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":4858
 *         if self._version is not None:
 *             self._version._listener = <PyObject *>null_listener
 *         if self._timestamp is not None:             # <<<<<<<<<<<<<<
 *             self._timestamp._listener = <PyObject *>null_listener
 *         if self._changeset is not None:
 */
  }

  /* "pyrosm_proto.pyx":4860
 *         if self._timestamp is not None:
 *             self._timestamp._listener = <PyObject *>null_listener
 *         if self._changeset is not None:             # <<<<<<<<<<<<<<
 *             self._changeset._listener = <PyObject *>null_listener
 *         if self._uid is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_changeset) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4861
 *             self._timestamp._listener = <PyObject *>null_listener
 *         if self._changeset is not None:
 *             self._changeset._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._uid is not None:
 *             self._uid._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_changeset->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":4860
 *         if self._timestamp is not None:
 *             self._timestamp._listener = <PyObject *>null_listener
 *         if self._changeset is not None:             # <<<<<<<<<<<<<<
 *             self._changeset._listener = <PyObject *>null_listener
 *         if self._uid is not None:
 */
  }

  /* "pyrosm_proto.pyx":4862
 *         if self._changeset is not None:
 *             self._changeset._listener = <PyObject *>null_listener
 *         if self._uid is not None:             # <<<<<<<<<<<<<<
 *             self._uid._listener = <PyObject *>null_listener
 *         if self._user_sid is not None:
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_uid) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":4863
 *             self._changeset._listener = <PyObject *>null_listener
 *         if self._uid is not None:
 *             self._uid._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._user_sid is not None:
 *             self._user_sid._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_uid->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":4862
 *         if self._changeset is not None:
 *             self._changeset._listener = <PyObject *>null_listener
 *         if self._uid is not None:             # <<<<<<<<<<<<<<
 *             self._uid._listener = <PyObject *>null_listener
 *         if self._user_sid is not None:
 */
  }

  /* "pyrosm_proto.pyx":4864
 *         if self._uid is not None:
 *             self._uid._listener = <PyObject *>null_listener
 *         if self._user_sid is not None:             # <<<<<<<<<<<<<<
 *             self._user_sid._listener = <PyObject *>null_listener
 *         if self._visible is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_user_sid) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4865
 *             self._uid._listener = <PyObject *>null_listener
 *         if self._user_sid is not None:
 *             self._user_sid._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._visible is not None:
 *             self._visible._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_user_sid->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":4864
 *         if self._uid is not None:
 *             self._uid._listener = <PyObject *>null_listener
 *         if self._user_sid is not None:             # <<<<<<<<<<<<<<
 *             self._user_sid._listener = <PyObject *>null_listener
 *         if self._visible is not None:
 */
  }

  /* "pyrosm_proto.pyx":4866
 *         if self._user_sid is not None:
 *             self._user_sid._listener = <PyObject *>null_listener
 *         if self._visible is not None:             # <<<<<<<<<<<<<<
 *             self._visible._listener = <PyObject *>null_listener
 * 
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_visible) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":4867
 *             self._user_sid._listener = <PyObject *>null_listener
 *         if self._visible is not None:
 *             self._visible._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, **kwargs):
 */
    __pyx_v_self->_visible->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":4866
 *         if self._user_sid is not None:
 *             self._user_sid._listener = <PyObject *>null_listener
 *         if self._visible is not None:             # <<<<<<<<<<<<<<
 *             self._visible._listener = <PyObject *>null_listener
 * 
 */
  }

  /* "pyrosm_proto.pyx":4854
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._version is not None:
 */

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

/* "pyrosm_proto.pyx":4869
 *             self._visible._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_9DenseInfo_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_9DenseInfo_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_4__init__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), __pyx_v_kwargs);

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

static int __pyx_pf_12pyrosm_proto_9DenseInfo_4__init__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_field_name = NULL;
  PyObject *__pyx_v_field_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrosm_proto.pyx":4870
 * 
 *     def __init__(self, **kwargs):
 *         self.reset()             # <<<<<<<<<<<<<<
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4871
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4871, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":4872
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('version','timestamp','changeset','uid','user_sid','visible',):
 */
    __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4872, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 4872, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4872, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 4872, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4872, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 4872, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 4872, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4872, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4872, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4872, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 4872, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 4872, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":4873
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('version','timestamp','changeset','uid','user_sid','visible',):
 *                         getattr(self, field_name).extend(field_value)
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "pyrosm_proto.pyx":4874
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('version','timestamp','changeset','uid','user_sid','visible',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_version, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4874, __pyx_L8_error)
          if (!__pyx_t_13) {
          } else {
            __pyx_t_1 = __pyx_t_13;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_timestamp, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4874, __pyx_L8_error)
          if (!__pyx_t_13) {
          } else {
            __pyx_t_1 = __pyx_t_13;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_changeset, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4874, __pyx_L8_error)
          if (!__pyx_t_13) {
          } else {
            __pyx_t_1 = __pyx_t_13;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_uid, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4874, __pyx_L8_error)
          if (!__pyx_t_13) {
          } else {
            __pyx_t_1 = __pyx_t_13;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_user_sid, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4874, __pyx_L8_error)
          if (!__pyx_t_13) {
          } else {
            __pyx_t_1 = __pyx_t_13;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_visible, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4874, __pyx_L8_error)
          __pyx_t_1 = __pyx_t_13;
          __pyx_L17_bool_binop_done:;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_13 = (__pyx_t_1 != 0);
          if (__pyx_t_13) {

            /* "pyrosm_proto.pyx":4875
 *                 try:
 *                     if field_name in ('version','timestamp','changeset','uid','user_sid','visible',):
 *                         getattr(self, field_name).extend(field_value)             # <<<<<<<<<<<<<<
 *                     else:
 *                         setattr(self, field_name, field_value)
 */
            __pyx_t_7 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4875, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_extend); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4875, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_7 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_7)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4875, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":4874
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('version','timestamp','changeset','uid','user_sid','visible',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":4877
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 *                         setattr(self, field_name, field_value)             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 */
          /*else*/ {
            __pyx_t_14 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name, __pyx_v_field_value); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 4877, __pyx_L8_error)
          }
          __pyx_L16:;

          /* "pyrosm_proto.pyx":4873
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('version','timestamp','changeset','uid','user_sid','visible',):
 *                         getattr(self, field_name).extend(field_value)
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L15_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrosm_proto.pyx":4878
 *                     else:
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return
 */
        __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_15) {
          __Pyx_AddTraceback("pyrosm_proto.DenseInfo.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 4878, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GOTREF(__pyx_t_7);

          /* "pyrosm_proto.pyx":4879
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))             # <<<<<<<<<<<<<<
 *         return
 * 
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4879, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_field_name);
          __Pyx_GIVEREF(__pyx_v_field_name);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_field_name);
          __pyx_t_16 = __Pyx_PyString_Format(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4879, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4879, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 4879, __pyx_L10_except_error)
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;

        /* "pyrosm_proto.pyx":4873
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('version','timestamp','changeset','uid','user_sid','visible',):
 *                         getattr(self, field_name).extend(field_value)
 */
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L15_try_end:;
      }

      /* "pyrosm_proto.pyx":4872
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('version','timestamp','changeset','uid','user_sid','visible',):
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":4871
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  }

  /* "pyrosm_proto.pyx":4880
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4869
 *             self._visible._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XDECREF(__pyx_v_field_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4882
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'version',
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_6__str__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_6__str__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_messages = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyrosm_proto.pyx":4883
 * 
 *     def __str__(self):
 *         fields = [             # <<<<<<<<<<<<<<
 *                           'version',
 *                           'timestamp',
 */
  __pyx_t_1 = PyList_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_version);
  __Pyx_GIVEREF(__pyx_n_s_version);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_version);
  __Pyx_INCREF(__pyx_n_s_timestamp);
  __Pyx_GIVEREF(__pyx_n_s_timestamp);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_timestamp);
  __Pyx_INCREF(__pyx_n_s_changeset);
  __Pyx_GIVEREF(__pyx_n_s_changeset);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_changeset);
  __Pyx_INCREF(__pyx_n_s_uid);
  __Pyx_GIVEREF(__pyx_n_s_uid);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_uid);
  __Pyx_INCREF(__pyx_n_s_user_sid);
  __Pyx_GIVEREF(__pyx_n_s_user_sid);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_user_sid);
  __Pyx_INCREF(__pyx_n_s_visible);
  __Pyx_GIVEREF(__pyx_n_s_visible);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_visible);
  __pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4890
 *                           'user_sid',
 *                           'visible',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]             # <<<<<<<<<<<<<<
 *         messages = []
 *         for message in messages:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 4890, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4890, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4890, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 4890, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4891
 *                           'visible',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []             # <<<<<<<<<<<<<<
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_messages = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4892
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  __pyx_t_1 = __pyx_v_messages; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 4892, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":4893
 *         messages = []
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))             # <<<<<<<<<<<<<<
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4893, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":4894
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    __pyx_t_4 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4894, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 4894, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4894, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 4894, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4894, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 4894, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":4895
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))             # <<<<<<<<<<<<<<
 *             components.append('}')
 *         return '\n'.join(components)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4895, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_line);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4895, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4895, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":4894
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":4896
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 *             components.append('}')             # <<<<<<<<<<<<<<
 *         return '\n'.join(components)
 * 
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_kp_s__2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4896, __pyx_L1_error)

    /* "pyrosm_proto.pyx":4892
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4897
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 *         return '\n'.join(components)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4882
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'version',
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_messages);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4899
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_9DenseInfo_reset(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("reset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4899, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9DenseInfo_9reset)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4899, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":4902
 *         # reset values and populate defaults
 * 
 *         self.__field_bitmap0 = 0             # <<<<<<<<<<<<<<
 * 
 *         if self._version is not None:
 */
  __pyx_v_self->__pyx___field_bitmap0 = 0;

  /* "pyrosm_proto.pyx":4904
 *         self.__field_bitmap0 = 0
 * 
 *         if self._version is not None:             # <<<<<<<<<<<<<<
 *             self._version._listener = <PyObject *>null_listener
 *         self._version = Int32List.__new__(Int32List)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_version) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":4905
 * 
 *         if self._version is not None:
 *             self._version._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._version = Int32List.__new__(Int32List)
 *         self._version._listener = <PyObject *>self
 */
    __pyx_v_self->_version->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":4904
 *         self.__field_bitmap0 = 0
 * 
 *         if self._version is not None:             # <<<<<<<<<<<<<<
 *             self._version._listener = <PyObject *>null_listener
 *         self._version = Int32List.__new__(Int32List)
 */
  }

  /* "pyrosm_proto.pyx":4906
 *         if self._version is not None:
 *             self._version._listener = <PyObject *>null_listener
 *         self._version = Int32List.__new__(Int32List)             # <<<<<<<<<<<<<<
 *         self._version._listener = <PyObject *>self
 *         if self._timestamp is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int32List)))) __PYX_ERR(0, 4906, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_version);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_version));
  __pyx_v_self->_version = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4907
 *             self._version._listener = <PyObject *>null_listener
 *         self._version = Int32List.__new__(Int32List)
 *         self._version._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._timestamp is not None:
 *             self._timestamp._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_version->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":4908
 *         self._version = Int32List.__new__(Int32List)
 *         self._version._listener = <PyObject *>self
 *         if self._timestamp is not None:             # <<<<<<<<<<<<<<
 *             self._timestamp._listener = <PyObject *>null_listener
 *         self._timestamp = Int64List.__new__(Int64List)
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_timestamp) != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":4909
 *         self._version._listener = <PyObject *>self
 *         if self._timestamp is not None:
 *             self._timestamp._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._timestamp = Int64List.__new__(Int64List)
 *         self._timestamp._listener = <PyObject *>self
 */
    __pyx_v_self->_timestamp->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":4908
 *         self._version = Int32List.__new__(Int32List)
 *         self._version._listener = <PyObject *>self
 *         if self._timestamp is not None:             # <<<<<<<<<<<<<<
 *             self._timestamp._listener = <PyObject *>null_listener
 *         self._timestamp = Int64List.__new__(Int64List)
 */
  }

  /* "pyrosm_proto.pyx":4910
 *         if self._timestamp is not None:
 *             self._timestamp._listener = <PyObject *>null_listener
 *         self._timestamp = Int64List.__new__(Int64List)             # <<<<<<<<<<<<<<
 *         self._timestamp._listener = <PyObject *>self
 *         if self._changeset is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int64List)))) __PYX_ERR(0, 4910, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_timestamp);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_timestamp));
  __pyx_v_self->_timestamp = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4911
 *             self._timestamp._listener = <PyObject *>null_listener
 *         self._timestamp = Int64List.__new__(Int64List)
 *         self._timestamp._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._changeset is not None:
 *             self._changeset._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_timestamp->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":4912
 *         self._timestamp = Int64List.__new__(Int64List)
 *         self._timestamp._listener = <PyObject *>self
 *         if self._changeset is not None:             # <<<<<<<<<<<<<<
 *             self._changeset._listener = <PyObject *>null_listener
 *         self._changeset = Int64List.__new__(Int64List)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_changeset) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":4913
 *         self._timestamp._listener = <PyObject *>self
 *         if self._changeset is not None:
 *             self._changeset._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._changeset = Int64List.__new__(Int64List)
 *         self._changeset._listener = <PyObject *>self
 */
    __pyx_v_self->_changeset->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":4912
 *         self._timestamp = Int64List.__new__(Int64List)
 *         self._timestamp._listener = <PyObject *>self
 *         if self._changeset is not None:             # <<<<<<<<<<<<<<
 *             self._changeset._listener = <PyObject *>null_listener
 *         self._changeset = Int64List.__new__(Int64List)
 */
  }

  /* "pyrosm_proto.pyx":4914
 *         if self._changeset is not None:
 *             self._changeset._listener = <PyObject *>null_listener
 *         self._changeset = Int64List.__new__(Int64List)             # <<<<<<<<<<<<<<
 *         self._changeset._listener = <PyObject *>self
 *         if self._uid is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int64List)))) __PYX_ERR(0, 4914, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_changeset);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_changeset));
  __pyx_v_self->_changeset = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4915
 *             self._changeset._listener = <PyObject *>null_listener
 *         self._changeset = Int64List.__new__(Int64List)
 *         self._changeset._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._uid is not None:
 *             self._uid._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_changeset->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":4916
 *         self._changeset = Int64List.__new__(Int64List)
 *         self._changeset._listener = <PyObject *>self
 *         if self._uid is not None:             # <<<<<<<<<<<<<<
 *             self._uid._listener = <PyObject *>null_listener
 *         self._uid = Int32List.__new__(Int32List)
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_uid) != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":4917
 *         self._changeset._listener = <PyObject *>self
 *         if self._uid is not None:
 *             self._uid._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._uid = Int32List.__new__(Int32List)
 *         self._uid._listener = <PyObject *>self
 */
    __pyx_v_self->_uid->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":4916
 *         self._changeset = Int64List.__new__(Int64List)
 *         self._changeset._listener = <PyObject *>self
 *         if self._uid is not None:             # <<<<<<<<<<<<<<
 *             self._uid._listener = <PyObject *>null_listener
 *         self._uid = Int32List.__new__(Int32List)
 */
  }

  /* "pyrosm_proto.pyx":4918
 *         if self._uid is not None:
 *             self._uid._listener = <PyObject *>null_listener
 *         self._uid = Int32List.__new__(Int32List)             # <<<<<<<<<<<<<<
 *         self._uid._listener = <PyObject *>self
 *         if self._user_sid is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int32List)))) __PYX_ERR(0, 4918, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_uid);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_uid));
  __pyx_v_self->_uid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4919
 *             self._uid._listener = <PyObject *>null_listener
 *         self._uid = Int32List.__new__(Int32List)
 *         self._uid._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._user_sid is not None:
 *             self._user_sid._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_uid->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":4920
 *         self._uid = Int32List.__new__(Int32List)
 *         self._uid._listener = <PyObject *>self
 *         if self._user_sid is not None:             # <<<<<<<<<<<<<<
 *             self._user_sid._listener = <PyObject *>null_listener
 *         self._user_sid = Int32List.__new__(Int32List)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_user_sid) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":4921
 *         self._uid._listener = <PyObject *>self
 *         if self._user_sid is not None:
 *             self._user_sid._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._user_sid = Int32List.__new__(Int32List)
 *         self._user_sid._listener = <PyObject *>self
 */
    __pyx_v_self->_user_sid->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":4920
 *         self._uid = Int32List.__new__(Int32List)
 *         self._uid._listener = <PyObject *>self
 *         if self._user_sid is not None:             # <<<<<<<<<<<<<<
 *             self._user_sid._listener = <PyObject *>null_listener
 *         self._user_sid = Int32List.__new__(Int32List)
 */
  }

  /* "pyrosm_proto.pyx":4922
 *         if self._user_sid is not None:
 *             self._user_sid._listener = <PyObject *>null_listener
 *         self._user_sid = Int32List.__new__(Int32List)             # <<<<<<<<<<<<<<
 *         self._user_sid._listener = <PyObject *>self
 *         if self._visible is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int32List)))) __PYX_ERR(0, 4922, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_user_sid);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_user_sid));
  __pyx_v_self->_user_sid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4923
 *             self._user_sid._listener = <PyObject *>null_listener
 *         self._user_sid = Int32List.__new__(Int32List)
 *         self._user_sid._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._visible is not None:
 *             self._visible._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_user_sid->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":4924
 *         self._user_sid = Int32List.__new__(Int32List)
 *         self._user_sid._listener = <PyObject *>self
 *         if self._visible is not None:             # <<<<<<<<<<<<<<
 *             self._visible._listener = <PyObject *>null_listener
 *         self._visible = Uint32List.__new__(Uint32List)
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_visible) != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":4925
 *         self._user_sid._listener = <PyObject *>self
 *         if self._visible is not None:
 *             self._visible._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._visible = Uint32List.__new__(Uint32List)
 *         self._visible._listener = <PyObject *>self
 */
    __pyx_v_self->_visible->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":4924
 *         self._user_sid = Int32List.__new__(Int32List)
 *         self._user_sid._listener = <PyObject *>self
 *         if self._visible is not None:             # <<<<<<<<<<<<<<
 *             self._visible._listener = <PyObject *>null_listener
 *         self._visible = Uint32List.__new__(Uint32List)
 */
  }

  /* "pyrosm_proto.pyx":4926
 *         if self._visible is not None:
 *             self._visible._listener = <PyObject *>null_listener
 *         self._visible = Uint32List.__new__(Uint32List)             # <<<<<<<<<<<<<<
 *         self._visible._listener = <PyObject *>self
 *         return
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Uint32List)))) __PYX_ERR(0, 4926, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_visible);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_visible));
  __pyx_v_self->_visible = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":4927
 *             self._visible._listener = <PyObject *>null_listener
 *         self._visible = Uint32List.__new__(Uint32List)
 *         self._visible._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_v_self->_visible->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":4928
 *         self._visible = Uint32List.__new__(Uint32List)
 *         self._visible._listener = <PyObject *>self
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4899
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

  /* 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_WriteUnraisable("pyrosm_proto.DenseInfo.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_8reset(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_8reset(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_9DenseInfo_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4899, __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("pyrosm_proto.DenseInfo.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4932
 * 
 *     @property
 *     def version(self):             # <<<<<<<<<<<<<<
 *         return self._version
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7version_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7version_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_7version___get__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7version___get__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":4933
 *     @property
 *     def version(self):
 *         return self._version             # <<<<<<<<<<<<<<
 * 
 *     @version.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_version));
  __pyx_r = ((PyObject *)__pyx_v_self->_version);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4932
 * 
 *     @property
 *     def version(self):             # <<<<<<<<<<<<<<
 *         return self._version
 * 
 */

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

/* "pyrosm_proto.pyx":4936
 * 
 *     @version.setter
 *     def version(self, value):             # <<<<<<<<<<<<<<
 *         if self._version is not None:
 *             self._version._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_9DenseInfo_7version_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_9DenseInfo_7version_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_7version_2__set__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_9DenseInfo_7version_2__set__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int32_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":4937
 *     @version.setter
 *     def version(self, value):
 *         if self._version is not None:             # <<<<<<<<<<<<<<
 *             self._version._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_version) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4938
 *     def version(self, value):
 *         if self._version is not None:
 *             self._version._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_version->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":4937
 *     @version.setter
 *     def version(self, value):
 *         if self._version is not None:             # <<<<<<<<<<<<<<
 *             self._version._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":4940
 *             self._version._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":4941
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":4942
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_int32_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 4942, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":4943
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":4941
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":4944
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":4941
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":4947
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._version = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4948
 *         cdef int i
 *         if memview_available == 1:
 *             self._version = Int32List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._version.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 4948, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int32_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 4948, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_version);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_version));
    __pyx_v_self->_version = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":4949
 *         if memview_available == 1:
 *             self._version = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._version.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 4949, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int32_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4949, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":4950
 *             self._version = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._version.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._version = Int32List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 4950, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 4950, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_version->__pyx_vtab)->append(__pyx_v_self->_version, (*((int32_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4950, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":4951
 *             for i in range(memview.size):
 *                 self._version.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._version = Int32List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4947
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._version = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":4952
 *                 self._version.append(memview[i])
 *             return
 *         self._version = Int32List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._version.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 4952, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_version);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_version));
  __pyx_v_self->_version = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":4953
 *             return
 *         self._version = Int32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._version.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4953, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 4953, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4953, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 4953, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4953, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 4953, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":4954
 *         self._version = Int32List(listener=self)
 *         for val in value:
 *             self._version.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_int32_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4954, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_version->__pyx_vtab)->append(__pyx_v_self->_version, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4954, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":4953
 *             return
 *         self._version = Int32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._version.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":4955
 *         for val in value:
 *             self._version.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4936
 * 
 *     @version.setter
 *     def version(self, value):             # <<<<<<<<<<<<<<
 *         if self._version is not None:
 *             self._version._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.version.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4958
 * 
 *     @property
 *     def timestamp(self):             # <<<<<<<<<<<<<<
 *         return self._timestamp
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_9timestamp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_9timestamp_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_9timestamp___get__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_9timestamp___get__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":4959
 *     @property
 *     def timestamp(self):
 *         return self._timestamp             # <<<<<<<<<<<<<<
 * 
 *     @timestamp.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_timestamp));
  __pyx_r = ((PyObject *)__pyx_v_self->_timestamp);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4958
 * 
 *     @property
 *     def timestamp(self):             # <<<<<<<<<<<<<<
 *         return self._timestamp
 * 
 */

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

/* "pyrosm_proto.pyx":4962
 * 
 *     @timestamp.setter
 *     def timestamp(self, value):             # <<<<<<<<<<<<<<
 *         if self._timestamp is not None:
 *             self._timestamp._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_9DenseInfo_9timestamp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_9DenseInfo_9timestamp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_9timestamp_2__set__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_9DenseInfo_9timestamp_2__set__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int64_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":4963
 *     @timestamp.setter
 *     def timestamp(self, value):
 *         if self._timestamp is not None:             # <<<<<<<<<<<<<<
 *             self._timestamp._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_timestamp) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4964
 *     def timestamp(self, value):
 *         if self._timestamp is not None:
 *             self._timestamp._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_timestamp->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":4963
 *     @timestamp.setter
 *     def timestamp(self, value):
 *         if self._timestamp is not None:             # <<<<<<<<<<<<<<
 *             self._timestamp._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":4966
 *             self._timestamp._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":4967
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":4968
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_int64_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 4968, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":4969
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":4967
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":4970
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":4967
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":4973
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._timestamp = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4974
 *         cdef int i
 *         if memview_available == 1:
 *             self._timestamp = Int64List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._timestamp.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 4974, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int64_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 4974, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_timestamp);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_timestamp));
    __pyx_v_self->_timestamp = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":4975
 *         if memview_available == 1:
 *             self._timestamp = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._timestamp.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 4975, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int64_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4975, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":4976
 *             self._timestamp = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._timestamp.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._timestamp = Int64List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 4976, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 4976, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_timestamp->__pyx_vtab)->append(__pyx_v_self->_timestamp, (*((int64_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4976, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":4977
 *             for i in range(memview.size):
 *                 self._timestamp.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._timestamp = Int64List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4973
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._timestamp = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":4978
 *                 self._timestamp.append(memview[i])
 *             return
 *         self._timestamp = Int64List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._timestamp.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 4978, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_timestamp);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_timestamp));
  __pyx_v_self->_timestamp = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":4979
 *             return
 *         self._timestamp = Int64List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._timestamp.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4979, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 4979, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4979, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 4979, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4979, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 4979, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":4980
 *         self._timestamp = Int64List(listener=self)
 *         for val in value:
 *             self._timestamp.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_int64_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4980, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_timestamp->__pyx_vtab)->append(__pyx_v_self->_timestamp, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":4979
 *             return
 *         self._timestamp = Int64List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._timestamp.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":4981
 *         for val in value:
 *             self._timestamp.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4962
 * 
 *     @timestamp.setter
 *     def timestamp(self, value):             # <<<<<<<<<<<<<<
 *         if self._timestamp is not None:
 *             self._timestamp._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.timestamp.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":4984
 * 
 *     @property
 *     def changeset(self):             # <<<<<<<<<<<<<<
 *         return self._changeset
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_9changeset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_9changeset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_9changeset___get__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_9changeset___get__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":4985
 *     @property
 *     def changeset(self):
 *         return self._changeset             # <<<<<<<<<<<<<<
 * 
 *     @changeset.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_changeset));
  __pyx_r = ((PyObject *)__pyx_v_self->_changeset);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":4984
 * 
 *     @property
 *     def changeset(self):             # <<<<<<<<<<<<<<
 *         return self._changeset
 * 
 */

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

/* "pyrosm_proto.pyx":4988
 * 
 *     @changeset.setter
 *     def changeset(self, value):             # <<<<<<<<<<<<<<
 *         if self._changeset is not None:
 *             self._changeset._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_9DenseInfo_9changeset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_9DenseInfo_9changeset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_9changeset_2__set__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_9DenseInfo_9changeset_2__set__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int64_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":4989
 *     @changeset.setter
 *     def changeset(self, value):
 *         if self._changeset is not None:             # <<<<<<<<<<<<<<
 *             self._changeset._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_changeset) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":4990
 *     def changeset(self, value):
 *         if self._changeset is not None:
 *             self._changeset._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_changeset->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":4989
 *     @changeset.setter
 *     def changeset(self, value):
 *         if self._changeset is not None:             # <<<<<<<<<<<<<<
 *             self._changeset._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":4992
 *             self._changeset._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":4993
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":4994
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_int64_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 4994, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":4995
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":4993
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":4996
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":4993
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":4999
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._changeset = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":5000
 *         cdef int i
 *         if memview_available == 1:
 *             self._changeset = Int64List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._changeset.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 5000, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int64_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 5000, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_changeset);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_changeset));
    __pyx_v_self->_changeset = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":5001
 *         if memview_available == 1:
 *             self._changeset = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._changeset.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 5001, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int64_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5001, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":5002
 *             self._changeset = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._changeset.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._changeset = Int64List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 5002, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 5002, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_changeset->__pyx_vtab)->append(__pyx_v_self->_changeset, (*((int64_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":5003
 *             for i in range(memview.size):
 *                 self._changeset.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._changeset = Int64List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":4999
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._changeset = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":5004
 *                 self._changeset.append(memview[i])
 *             return
 *         self._changeset = Int64List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._changeset.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 5004, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_changeset);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_changeset));
  __pyx_v_self->_changeset = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":5005
 *             return
 *         self._changeset = Int64List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._changeset.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 5005, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 5005, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 5005, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 5005, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":5006
 *         self._changeset = Int64List(listener=self)
 *         for val in value:
 *             self._changeset.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_int64_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5006, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_changeset->__pyx_vtab)->append(__pyx_v_self->_changeset, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":5005
 *             return
 *         self._changeset = Int64List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._changeset.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":5007
 *         for val in value:
 *             self._changeset.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":4988
 * 
 *     @changeset.setter
 *     def changeset(self, value):             # <<<<<<<<<<<<<<
 *         if self._changeset is not None:
 *             self._changeset._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.changeset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5010
 * 
 *     @property
 *     def uid(self):             # <<<<<<<<<<<<<<
 *         return self._uid
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_3uid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_3uid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_3uid___get__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_3uid___get__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":5011
 *     @property
 *     def uid(self):
 *         return self._uid             # <<<<<<<<<<<<<<
 * 
 *     @uid.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_uid));
  __pyx_r = ((PyObject *)__pyx_v_self->_uid);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5010
 * 
 *     @property
 *     def uid(self):             # <<<<<<<<<<<<<<
 *         return self._uid
 * 
 */

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

/* "pyrosm_proto.pyx":5014
 * 
 *     @uid.setter
 *     def uid(self, value):             # <<<<<<<<<<<<<<
 *         if self._uid is not None:
 *             self._uid._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_9DenseInfo_3uid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_9DenseInfo_3uid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_3uid_2__set__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_9DenseInfo_3uid_2__set__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int32_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":5015
 *     @uid.setter
 *     def uid(self, value):
 *         if self._uid is not None:             # <<<<<<<<<<<<<<
 *             self._uid._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_uid) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":5016
 *     def uid(self, value):
 *         if self._uid is not None:
 *             self._uid._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_uid->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":5015
 *     @uid.setter
 *     def uid(self, value):
 *         if self._uid is not None:             # <<<<<<<<<<<<<<
 *             self._uid._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":5018
 *             self._uid._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":5019
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":5020
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_int32_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 5020, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":5021
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":5019
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":5022
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":5019
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":5025
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._uid = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":5026
 *         cdef int i
 *         if memview_available == 1:
 *             self._uid = Int32List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._uid.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 5026, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int32_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 5026, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_uid);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_uid));
    __pyx_v_self->_uid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":5027
 *         if memview_available == 1:
 *             self._uid = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._uid.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 5027, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int32_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5027, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":5028
 *             self._uid = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._uid.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._uid = Int32List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 5028, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 5028, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_uid->__pyx_vtab)->append(__pyx_v_self->_uid, (*((int32_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":5029
 *             for i in range(memview.size):
 *                 self._uid.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._uid = Int32List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":5025
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._uid = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":5030
 *                 self._uid.append(memview[i])
 *             return
 *         self._uid = Int32List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._uid.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 5030, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_uid);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_uid));
  __pyx_v_self->_uid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":5031
 *             return
 *         self._uid = Int32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._uid.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5031, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 5031, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 5031, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5031, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 5031, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5031, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 5031, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":5032
 *         self._uid = Int32List(listener=self)
 *         for val in value:
 *             self._uid.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_int32_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5032, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_uid->__pyx_vtab)->append(__pyx_v_self->_uid, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":5031
 *             return
 *         self._uid = Int32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._uid.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":5033
 *         for val in value:
 *             self._uid.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5014
 * 
 *     @uid.setter
 *     def uid(self, value):             # <<<<<<<<<<<<<<
 *         if self._uid is not None:
 *             self._uid._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.uid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5036
 * 
 *     @property
 *     def user_sid(self):             # <<<<<<<<<<<<<<
 *         return self._user_sid
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_8user_sid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_8user_sid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_8user_sid___get__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_8user_sid___get__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":5037
 *     @property
 *     def user_sid(self):
 *         return self._user_sid             # <<<<<<<<<<<<<<
 * 
 *     @user_sid.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_user_sid));
  __pyx_r = ((PyObject *)__pyx_v_self->_user_sid);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5036
 * 
 *     @property
 *     def user_sid(self):             # <<<<<<<<<<<<<<
 *         return self._user_sid
 * 
 */

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

/* "pyrosm_proto.pyx":5040
 * 
 *     @user_sid.setter
 *     def user_sid(self, value):             # <<<<<<<<<<<<<<
 *         if self._user_sid is not None:
 *             self._user_sid._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_9DenseInfo_8user_sid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_9DenseInfo_8user_sid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_8user_sid_2__set__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_9DenseInfo_8user_sid_2__set__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int32_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":5041
 *     @user_sid.setter
 *     def user_sid(self, value):
 *         if self._user_sid is not None:             # <<<<<<<<<<<<<<
 *             self._user_sid._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_user_sid) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":5042
 *     def user_sid(self, value):
 *         if self._user_sid is not None:
 *             self._user_sid._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_user_sid->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":5041
 *     @user_sid.setter
 *     def user_sid(self, value):
 *         if self._user_sid is not None:             # <<<<<<<<<<<<<<
 *             self._user_sid._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":5044
 *             self._user_sid._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":5045
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":5046
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_int32_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 5046, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":5047
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":5045
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":5048
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":5045
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":5051
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._user_sid = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":5052
 *         cdef int i
 *         if memview_available == 1:
 *             self._user_sid = Int32List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._user_sid.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 5052, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int32_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 5052, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_user_sid);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_user_sid));
    __pyx_v_self->_user_sid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":5053
 *         if memview_available == 1:
 *             self._user_sid = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._user_sid.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 5053, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int32_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5053, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":5054
 *             self._user_sid = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._user_sid.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._user_sid = Int32List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 5054, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 5054, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_user_sid->__pyx_vtab)->append(__pyx_v_self->_user_sid, (*((int32_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5054, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":5055
 *             for i in range(memview.size):
 *                 self._user_sid.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._user_sid = Int32List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":5051
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._user_sid = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":5056
 *                 self._user_sid.append(memview[i])
 *             return
 *         self._user_sid = Int32List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._user_sid.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 5056, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_user_sid);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_user_sid));
  __pyx_v_self->_user_sid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":5057
 *             return
 *         self._user_sid = Int32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._user_sid.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 5057, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 5057, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5057, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 5057, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5057, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 5057, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":5058
 *         self._user_sid = Int32List(listener=self)
 *         for val in value:
 *             self._user_sid.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_int32_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5058, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_user_sid->__pyx_vtab)->append(__pyx_v_self->_user_sid, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":5057
 *             return
 *         self._user_sid = Int32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._user_sid.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":5059
 *         for val in value:
 *             self._user_sid.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5040
 * 
 *     @user_sid.setter
 *     def user_sid(self, value):             # <<<<<<<<<<<<<<
 *         if self._user_sid is not None:
 *             self._user_sid._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.user_sid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5062
 * 
 *     @property
 *     def visible(self):             # <<<<<<<<<<<<<<
 *         return self._visible
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7visible_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7visible_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_7visible___get__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7visible___get__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":5063
 *     @property
 *     def visible(self):
 *         return self._visible             # <<<<<<<<<<<<<<
 * 
 *     @visible.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_visible));
  __pyx_r = ((PyObject *)__pyx_v_self->_visible);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5062
 * 
 *     @property
 *     def visible(self):             # <<<<<<<<<<<<<<
 *         return self._visible
 * 
 */

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

/* "pyrosm_proto.pyx":5066
 * 
 *     @visible.setter
 *     def visible(self, value):             # <<<<<<<<<<<<<<
 *         if self._visible is not None:
 *             self._visible._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_9DenseInfo_7visible_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_9DenseInfo_7visible_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_7visible_2__set__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_9DenseInfo_7visible_2__set__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  uint32_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":5067
 *     @visible.setter
 *     def visible(self, value):
 *         if self._visible is not None:             # <<<<<<<<<<<<<<
 *             self._visible._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_visible) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":5068
 *     def visible(self, value):
 *         if self._visible is not None:
 *             self._visible._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_visible->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":5067
 *     @visible.setter
 *     def visible(self, value):
 *         if self._visible is not None:             # <<<<<<<<<<<<<<
 *             self._visible._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":5070
 *             self._visible._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":5071
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":5072
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint32_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 5072, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":5073
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":5071
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":5074
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":5071
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":5077
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._visible = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":5078
 *         cdef int i
 *         if memview_available == 1:
 *             self._visible = Uint32List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._visible.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 5078, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 5078, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_visible);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_visible));
    __pyx_v_self->_visible = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":5079
 *         if memview_available == 1:
 *             self._visible = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._visible.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 5079, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5079, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":5080
 *             self._visible = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._visible.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._visible = Uint32List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 5080, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 5080, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_visible->__pyx_vtab)->append(__pyx_v_self->_visible, (*((uint32_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5080, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":5081
 *             for i in range(memview.size):
 *                 self._visible.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._visible = Uint32List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":5077
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._visible = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":5082
 *                 self._visible.append(memview[i])
 *             return
 *         self._visible = Uint32List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._visible.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 5082, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_visible);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_visible));
  __pyx_v_self->_visible = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":5083
 *             return
 *         self._visible = Uint32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._visible.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 5083, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 5083, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5083, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 5083, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5083, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 5083, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":5084
 *         self._visible = Uint32List(listener=self)
 *         for val in value:
 *             self._visible.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_uint32_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5084, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_visible->__pyx_vtab)->append(__pyx_v_self->_visible, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":5083
 *             return
 *         self._visible = Uint32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._visible.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":5085
 *         for val in value:
 *             self._visible.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5066
 * 
 *     @visible.setter
 *     def visible(self, value):             # <<<<<<<<<<<<<<
 *         if self._visible is not None:
 *             self._visible._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.visible.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5088
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

static int __pyx_f_12pyrosm_proto_9DenseInfo__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, CYTHON_UNUSED int __pyx_v_cache) {
  int __pyx_v_current_offset;
  int64_t __pyx_v_key;
  int64_t __pyx_v_version_marker;
  int32_t __pyx_v_version_elt;
  int64_t __pyx_v_timestamp_marker;
  int64_t __pyx_v_timestamp_elt;
  int64_t __pyx_v_changeset_marker;
  int64_t __pyx_v_changeset_elt;
  int64_t __pyx_v_uid_marker;
  int32_t __pyx_v_uid_elt;
  int64_t __pyx_v_user_sid_marker;
  int32_t __pyx_v_user_sid_elt;
  int64_t __pyx_v_visible_marker;
  uint32_t __pyx_v_visible_elt;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("_protobuf_deserialize", 0);

  /* "pyrosm_proto.pyx":5089
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):
 *         cdef int current_offset = 0             # <<<<<<<<<<<<<<
 *         cdef int64_t key
 *         cdef int64_t version_marker
 */
  __pyx_v_current_offset = 0;

  /* "pyrosm_proto.pyx":5103
 *         cdef int64_t visible_marker
 *         cdef uint32_t visible_elt
 *         while current_offset < size:             # <<<<<<<<<<<<<<
 *             key = get_varint64(memory, &current_offset)
 *             # version
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_current_offset < __pyx_v_size) != 0);
    if (!__pyx_t_1) break;

    /* "pyrosm_proto.pyx":5104
 *         cdef uint32_t visible_elt
 *         while current_offset < size:
 *             key = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # version
 *             if key == 10:
 */
    __pyx_v_key = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

    /* "pyrosm_proto.pyx":5106
 *             key = get_varint64(memory, &current_offset)
 *             # version
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 version_marker = get_varint64(memory, &current_offset)
 *                 version_marker += current_offset
 */
    switch (__pyx_v_key) {
      case 10:

      /* "pyrosm_proto.pyx":5107
 *             # version
 *             if key == 10:
 *                 version_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 version_marker += current_offset
 * 
 */
      __pyx_v_version_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":5108
 *             if key == 10:
 *                 version_marker = get_varint64(memory, &current_offset)
 *                 version_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>version_marker:
 */
      __pyx_v_version_marker = (__pyx_v_version_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":5110
 *                 version_marker += current_offset
 * 
 *                 while current_offset < <int>version_marker:             # <<<<<<<<<<<<<<
 *                     version_elt = get_varint32(memory, &current_offset)
 *                     self._version._append(version_elt)
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_current_offset < ((int)__pyx_v_version_marker)) != 0);
        if (!__pyx_t_1) break;

        /* "pyrosm_proto.pyx":5111
 * 
 *                 while current_offset < <int>version_marker:
 *                     version_elt = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._version._append(version_elt)
 *             # timestamp
 */
        __pyx_v_version_elt = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":5112
 *                 while current_offset < <int>version_marker:
 *                     version_elt = get_varint32(memory, &current_offset)
 *                     self._version._append(version_elt)             # <<<<<<<<<<<<<<
 *             # timestamp
 *             elif key == 18:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_version->__pyx_vtab)->_append(__pyx_v_self->_version, __pyx_v_version_elt);
      }

      /* "pyrosm_proto.pyx":5106
 *             key = get_varint64(memory, &current_offset)
 *             # version
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 version_marker = get_varint64(memory, &current_offset)
 *                 version_marker += current_offset
 */
      break;
      case 18:

      /* "pyrosm_proto.pyx":5115
 *             # timestamp
 *             elif key == 18:
 *                 timestamp_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 timestamp_marker += current_offset
 * 
 */
      __pyx_v_timestamp_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":5116
 *             elif key == 18:
 *                 timestamp_marker = get_varint64(memory, &current_offset)
 *                 timestamp_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>timestamp_marker:
 */
      __pyx_v_timestamp_marker = (__pyx_v_timestamp_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":5118
 *                 timestamp_marker += current_offset
 * 
 *                 while current_offset < <int>timestamp_marker:             # <<<<<<<<<<<<<<
 *                     timestamp_elt = get_signed_varint64(memory, &current_offset)
 *                     self._timestamp._append(timestamp_elt)
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_current_offset < ((int)__pyx_v_timestamp_marker)) != 0);
        if (!__pyx_t_1) break;

        /* "pyrosm_proto.pyx":5119
 * 
 *                 while current_offset < <int>timestamp_marker:
 *                     timestamp_elt = get_signed_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._timestamp._append(timestamp_elt)
 *             # changeset
 */
        __pyx_v_timestamp_elt = __pyx_f_12pyrobuf_util_get_signed_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":5120
 *                 while current_offset < <int>timestamp_marker:
 *                     timestamp_elt = get_signed_varint64(memory, &current_offset)
 *                     self._timestamp._append(timestamp_elt)             # <<<<<<<<<<<<<<
 *             # changeset
 *             elif key == 26:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_timestamp->__pyx_vtab)->_append(__pyx_v_self->_timestamp, __pyx_v_timestamp_elt);
      }

      /* "pyrosm_proto.pyx":5114
 *                     self._version._append(version_elt)
 *             # timestamp
 *             elif key == 18:             # <<<<<<<<<<<<<<
 *                 timestamp_marker = get_varint64(memory, &current_offset)
 *                 timestamp_marker += current_offset
 */
      break;
      case 26:

      /* "pyrosm_proto.pyx":5123
 *             # changeset
 *             elif key == 26:
 *                 changeset_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 changeset_marker += current_offset
 * 
 */
      __pyx_v_changeset_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":5124
 *             elif key == 26:
 *                 changeset_marker = get_varint64(memory, &current_offset)
 *                 changeset_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>changeset_marker:
 */
      __pyx_v_changeset_marker = (__pyx_v_changeset_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":5126
 *                 changeset_marker += current_offset
 * 
 *                 while current_offset < <int>changeset_marker:             # <<<<<<<<<<<<<<
 *                     changeset_elt = get_signed_varint64(memory, &current_offset)
 *                     self._changeset._append(changeset_elt)
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_current_offset < ((int)__pyx_v_changeset_marker)) != 0);
        if (!__pyx_t_1) break;

        /* "pyrosm_proto.pyx":5127
 * 
 *                 while current_offset < <int>changeset_marker:
 *                     changeset_elt = get_signed_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._changeset._append(changeset_elt)
 *             # uid
 */
        __pyx_v_changeset_elt = __pyx_f_12pyrobuf_util_get_signed_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":5128
 *                 while current_offset < <int>changeset_marker:
 *                     changeset_elt = get_signed_varint64(memory, &current_offset)
 *                     self._changeset._append(changeset_elt)             # <<<<<<<<<<<<<<
 *             # uid
 *             elif key == 34:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_changeset->__pyx_vtab)->_append(__pyx_v_self->_changeset, __pyx_v_changeset_elt);
      }

      /* "pyrosm_proto.pyx":5122
 *                     self._timestamp._append(timestamp_elt)
 *             # changeset
 *             elif key == 26:             # <<<<<<<<<<<<<<
 *                 changeset_marker = get_varint64(memory, &current_offset)
 *                 changeset_marker += current_offset
 */
      break;
      case 34:

      /* "pyrosm_proto.pyx":5131
 *             # uid
 *             elif key == 34:
 *                 uid_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 uid_marker += current_offset
 * 
 */
      __pyx_v_uid_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":5132
 *             elif key == 34:
 *                 uid_marker = get_varint64(memory, &current_offset)
 *                 uid_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>uid_marker:
 */
      __pyx_v_uid_marker = (__pyx_v_uid_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":5134
 *                 uid_marker += current_offset
 * 
 *                 while current_offset < <int>uid_marker:             # <<<<<<<<<<<<<<
 *                     uid_elt = get_signed_varint32(memory, &current_offset)
 *                     self._uid._append(uid_elt)
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_current_offset < ((int)__pyx_v_uid_marker)) != 0);
        if (!__pyx_t_1) break;

        /* "pyrosm_proto.pyx":5135
 * 
 *                 while current_offset < <int>uid_marker:
 *                     uid_elt = get_signed_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._uid._append(uid_elt)
 *             # user_sid
 */
        __pyx_v_uid_elt = __pyx_f_12pyrobuf_util_get_signed_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":5136
 *                 while current_offset < <int>uid_marker:
 *                     uid_elt = get_signed_varint32(memory, &current_offset)
 *                     self._uid._append(uid_elt)             # <<<<<<<<<<<<<<
 *             # user_sid
 *             elif key == 42:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_uid->__pyx_vtab)->_append(__pyx_v_self->_uid, __pyx_v_uid_elt);
      }

      /* "pyrosm_proto.pyx":5130
 *                     self._changeset._append(changeset_elt)
 *             # uid
 *             elif key == 34:             # <<<<<<<<<<<<<<
 *                 uid_marker = get_varint64(memory, &current_offset)
 *                 uid_marker += current_offset
 */
      break;
      case 42:

      /* "pyrosm_proto.pyx":5139
 *             # user_sid
 *             elif key == 42:
 *                 user_sid_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 user_sid_marker += current_offset
 * 
 */
      __pyx_v_user_sid_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":5140
 *             elif key == 42:
 *                 user_sid_marker = get_varint64(memory, &current_offset)
 *                 user_sid_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>user_sid_marker:
 */
      __pyx_v_user_sid_marker = (__pyx_v_user_sid_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":5142
 *                 user_sid_marker += current_offset
 * 
 *                 while current_offset < <int>user_sid_marker:             # <<<<<<<<<<<<<<
 *                     user_sid_elt = get_signed_varint32(memory, &current_offset)
 *                     self._user_sid._append(user_sid_elt)
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_current_offset < ((int)__pyx_v_user_sid_marker)) != 0);
        if (!__pyx_t_1) break;

        /* "pyrosm_proto.pyx":5143
 * 
 *                 while current_offset < <int>user_sid_marker:
 *                     user_sid_elt = get_signed_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._user_sid._append(user_sid_elt)
 *             # visible
 */
        __pyx_v_user_sid_elt = __pyx_f_12pyrobuf_util_get_signed_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":5144
 *                 while current_offset < <int>user_sid_marker:
 *                     user_sid_elt = get_signed_varint32(memory, &current_offset)
 *                     self._user_sid._append(user_sid_elt)             # <<<<<<<<<<<<<<
 *             # visible
 *             elif key == 50:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_user_sid->__pyx_vtab)->_append(__pyx_v_self->_user_sid, __pyx_v_user_sid_elt);
      }

      /* "pyrosm_proto.pyx":5138
 *                     self._uid._append(uid_elt)
 *             # user_sid
 *             elif key == 42:             # <<<<<<<<<<<<<<
 *                 user_sid_marker = get_varint64(memory, &current_offset)
 *                 user_sid_marker += current_offset
 */
      break;
      case 50:

      /* "pyrosm_proto.pyx":5147
 *             # visible
 *             elif key == 50:
 *                 visible_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 visible_marker += current_offset
 * 
 */
      __pyx_v_visible_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":5148
 *             elif key == 50:
 *                 visible_marker = get_varint64(memory, &current_offset)
 *                 visible_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>visible_marker:
 */
      __pyx_v_visible_marker = (__pyx_v_visible_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":5150
 *                 visible_marker += current_offset
 * 
 *                 while current_offset < <int>visible_marker:             # <<<<<<<<<<<<<<
 *                     visible_elt = get_varint32(memory, &current_offset)
 *                     self._visible._append(visible_elt)
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_current_offset < ((int)__pyx_v_visible_marker)) != 0);
        if (!__pyx_t_1) break;

        /* "pyrosm_proto.pyx":5151
 * 
 *                 while current_offset < <int>visible_marker:
 *                     visible_elt = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._visible._append(visible_elt)
 *             # Unknown field - need to skip proper number of bytes
 */
        __pyx_v_visible_elt = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":5152
 *                 while current_offset < <int>visible_marker:
 *                     visible_elt = get_varint32(memory, &current_offset)
 *                     self._visible._append(visible_elt)             # <<<<<<<<<<<<<<
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_visible->__pyx_vtab)->_append(__pyx_v_self->_visible, __pyx_v_visible_elt);
      }

      /* "pyrosm_proto.pyx":5146
 *                     self._user_sid._append(user_sid_elt)
 *             # visible
 *             elif key == 50:             # <<<<<<<<<<<<<<
 *                 visible_marker = get_varint64(memory, &current_offset)
 *                 visible_marker += current_offset
 */
      break;
      default:

      /* "pyrosm_proto.pyx":5155
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)             # <<<<<<<<<<<<<<
 * 
 *         self._is_present_in_parent = True
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        if (unlikely(!(__pyx_f_12pyrobuf_util_skip_generic(__pyx_v_memory, (&__pyx_v_current_offset), __pyx_v_size, (__pyx_v_key & 0x7)) != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 5155, __pyx_L1_error)
        }
      }
      #endif
      break;
    }
  }

  /* "pyrosm_proto.pyx":5157
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)
 * 
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 * 
 *         return current_offset
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":5159
 *         self._is_present_in_parent = True
 * 
 *         return current_offset             # <<<<<<<<<<<<<<
 * 
 *     cpdef void Clear(self):
 */
  __pyx_r = __pyx_v_current_offset;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5088
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pyrosm_proto.DenseInfo._protobuf_deserialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5161
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_9DenseInfo_Clear(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9DenseInfo_11Clear)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5163
 *     cpdef void Clear(self):
 *         """Clears all data that was set in the message."""
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5164
 *         """Clears all data that was set in the message."""
 *         self.reset()
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void ClearField(self, field_name):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5161
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.DenseInfo.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_10Clear[] = "Clears all data that was set in the message.";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Clear (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_10Clear(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_10Clear(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_9DenseInfo_Clear(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5161, __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("pyrosm_proto.DenseInfo.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5166
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'version':
 */

static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static void __pyx_f_12pyrosm_proto_9DenseInfo_ClearField(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("ClearField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ClearField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5166, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9DenseInfo_13ClearField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5166, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5168
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'version':             # <<<<<<<<<<<<<<
 *             self._version._listener = <PyObject *>null_listener
 *             self._version = Int32List.__new__(Int32List)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_version, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5168, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":5169
 *         """Clears the contents of a given field."""
 *         if field_name == 'version':
 *             self._version._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._version = Int32List.__new__(Int32List)
 *             self._version._listener = <PyObject *>self
 */
    __pyx_v_self->_version->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":5170
 *         if field_name == 'version':
 *             self._version._listener = <PyObject *>null_listener
 *             self._version = Int32List.__new__(Int32List)             # <<<<<<<<<<<<<<
 *             self._version._listener = <PyObject *>self
 *         elif field_name == 'timestamp':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int32List)))) __PYX_ERR(0, 5170, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_version);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_version));
    __pyx_v_self->_version = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5171
 *             self._version._listener = <PyObject *>null_listener
 *             self._version = Int32List.__new__(Int32List)
 *             self._version._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'timestamp':
 *             self._timestamp._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_version->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":5168
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'version':             # <<<<<<<<<<<<<<
 *             self._version._listener = <PyObject *>null_listener
 *             self._version = Int32List.__new__(Int32List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":5172
 *             self._version = Int32List.__new__(Int32List)
 *             self._version._listener = <PyObject *>self
 *         elif field_name == 'timestamp':             # <<<<<<<<<<<<<<
 *             self._timestamp._listener = <PyObject *>null_listener
 *             self._timestamp = Int64List.__new__(Int64List)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_timestamp, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5172, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":5173
 *             self._version._listener = <PyObject *>self
 *         elif field_name == 'timestamp':
 *             self._timestamp._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._timestamp = Int64List.__new__(Int64List)
 *             self._timestamp._listener = <PyObject *>self
 */
    __pyx_v_self->_timestamp->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":5174
 *         elif field_name == 'timestamp':
 *             self._timestamp._listener = <PyObject *>null_listener
 *             self._timestamp = Int64List.__new__(Int64List)             # <<<<<<<<<<<<<<
 *             self._timestamp._listener = <PyObject *>self
 *         elif field_name == 'changeset':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int64List)))) __PYX_ERR(0, 5174, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_timestamp);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_timestamp));
    __pyx_v_self->_timestamp = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5175
 *             self._timestamp._listener = <PyObject *>null_listener
 *             self._timestamp = Int64List.__new__(Int64List)
 *             self._timestamp._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'changeset':
 *             self._changeset._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_timestamp->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":5172
 *             self._version = Int32List.__new__(Int32List)
 *             self._version._listener = <PyObject *>self
 *         elif field_name == 'timestamp':             # <<<<<<<<<<<<<<
 *             self._timestamp._listener = <PyObject *>null_listener
 *             self._timestamp = Int64List.__new__(Int64List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":5176
 *             self._timestamp = Int64List.__new__(Int64List)
 *             self._timestamp._listener = <PyObject *>self
 *         elif field_name == 'changeset':             # <<<<<<<<<<<<<<
 *             self._changeset._listener = <PyObject *>null_listener
 *             self._changeset = Int64List.__new__(Int64List)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_changeset, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5176, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":5177
 *             self._timestamp._listener = <PyObject *>self
 *         elif field_name == 'changeset':
 *             self._changeset._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._changeset = Int64List.__new__(Int64List)
 *             self._changeset._listener = <PyObject *>self
 */
    __pyx_v_self->_changeset->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":5178
 *         elif field_name == 'changeset':
 *             self._changeset._listener = <PyObject *>null_listener
 *             self._changeset = Int64List.__new__(Int64List)             # <<<<<<<<<<<<<<
 *             self._changeset._listener = <PyObject *>self
 *         elif field_name == 'uid':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int64List)))) __PYX_ERR(0, 5178, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_changeset);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_changeset));
    __pyx_v_self->_changeset = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5179
 *             self._changeset._listener = <PyObject *>null_listener
 *             self._changeset = Int64List.__new__(Int64List)
 *             self._changeset._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'uid':
 *             self._uid._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_changeset->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":5176
 *             self._timestamp = Int64List.__new__(Int64List)
 *             self._timestamp._listener = <PyObject *>self
 *         elif field_name == 'changeset':             # <<<<<<<<<<<<<<
 *             self._changeset._listener = <PyObject *>null_listener
 *             self._changeset = Int64List.__new__(Int64List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":5180
 *             self._changeset = Int64List.__new__(Int64List)
 *             self._changeset._listener = <PyObject *>self
 *         elif field_name == 'uid':             # <<<<<<<<<<<<<<
 *             self._uid._listener = <PyObject *>null_listener
 *             self._uid = Int32List.__new__(Int32List)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_uid, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5180, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":5181
 *             self._changeset._listener = <PyObject *>self
 *         elif field_name == 'uid':
 *             self._uid._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._uid = Int32List.__new__(Int32List)
 *             self._uid._listener = <PyObject *>self
 */
    __pyx_v_self->_uid->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":5182
 *         elif field_name == 'uid':
 *             self._uid._listener = <PyObject *>null_listener
 *             self._uid = Int32List.__new__(Int32List)             # <<<<<<<<<<<<<<
 *             self._uid._listener = <PyObject *>self
 *         elif field_name == 'user_sid':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int32List)))) __PYX_ERR(0, 5182, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_uid);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_uid));
    __pyx_v_self->_uid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5183
 *             self._uid._listener = <PyObject *>null_listener
 *             self._uid = Int32List.__new__(Int32List)
 *             self._uid._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'user_sid':
 *             self._user_sid._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_uid->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":5180
 *             self._changeset = Int64List.__new__(Int64List)
 *             self._changeset._listener = <PyObject *>self
 *         elif field_name == 'uid':             # <<<<<<<<<<<<<<
 *             self._uid._listener = <PyObject *>null_listener
 *             self._uid = Int32List.__new__(Int32List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":5184
 *             self._uid = Int32List.__new__(Int32List)
 *             self._uid._listener = <PyObject *>self
 *         elif field_name == 'user_sid':             # <<<<<<<<<<<<<<
 *             self._user_sid._listener = <PyObject *>null_listener
 *             self._user_sid = Int32List.__new__(Int32List)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_user_sid, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5184, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":5185
 *             self._uid._listener = <PyObject *>self
 *         elif field_name == 'user_sid':
 *             self._user_sid._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._user_sid = Int32List.__new__(Int32List)
 *             self._user_sid._listener = <PyObject *>self
 */
    __pyx_v_self->_user_sid->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":5186
 *         elif field_name == 'user_sid':
 *             self._user_sid._listener = <PyObject *>null_listener
 *             self._user_sid = Int32List.__new__(Int32List)             # <<<<<<<<<<<<<<
 *             self._user_sid._listener = <PyObject *>self
 *         elif field_name == 'visible':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int32List)))) __PYX_ERR(0, 5186, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_user_sid);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_user_sid));
    __pyx_v_self->_user_sid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5187
 *             self._user_sid._listener = <PyObject *>null_listener
 *             self._user_sid = Int32List.__new__(Int32List)
 *             self._user_sid._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'visible':
 *             self._visible._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_user_sid->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":5184
 *             self._uid = Int32List.__new__(Int32List)
 *             self._uid._listener = <PyObject *>self
 *         elif field_name == 'user_sid':             # <<<<<<<<<<<<<<
 *             self._user_sid._listener = <PyObject *>null_listener
 *             self._user_sid = Int32List.__new__(Int32List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":5188
 *             self._user_sid = Int32List.__new__(Int32List)
 *             self._user_sid._listener = <PyObject *>self
 *         elif field_name == 'visible':             # <<<<<<<<<<<<<<
 *             self._visible._listener = <PyObject *>null_listener
 *             self._visible = Uint32List.__new__(Uint32List)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_visible, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5188, __pyx_L1_error)
  if (likely(__pyx_t_5)) {

    /* "pyrosm_proto.pyx":5189
 *             self._user_sid._listener = <PyObject *>self
 *         elif field_name == 'visible':
 *             self._visible._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._visible = Uint32List.__new__(Uint32List)
 *             self._visible._listener = <PyObject *>self
 */
    __pyx_v_self->_visible->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":5190
 *         elif field_name == 'visible':
 *             self._visible._listener = <PyObject *>null_listener
 *             self._visible = Uint32List.__new__(Uint32List)             # <<<<<<<<<<<<<<
 *             self._visible._listener = <PyObject *>self
 *         else:
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Uint32List)))) __PYX_ERR(0, 5190, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_visible);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_visible));
    __pyx_v_self->_visible = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5191
 *             self._visible._listener = <PyObject *>null_listener
 *             self._visible = Uint32List.__new__(Uint32List)
 *             self._visible._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 */
    __pyx_v_self->_visible->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":5188
 *             self._user_sid = Int32List.__new__(Int32List)
 *             self._user_sid._listener = <PyObject *>self
 *         elif field_name == 'visible':             # <<<<<<<<<<<<<<
 *             self._visible._listener = <PyObject *>null_listener
 *             self._visible = Uint32List.__new__(Uint32List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":5193
 *             self._visible._listener = <PyObject *>self
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 5193, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":5195
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void CopyFrom(self, DenseInfo other_msg):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5166
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'version':
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.DenseInfo.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_12ClearField[] = "Clears the contents of a given field.";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ClearField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_12ClearField(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_12ClearField(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ClearField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_9DenseInfo_ClearField(__pyx_v_self, __pyx_v_field_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5166, __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("pyrosm_proto.DenseInfo.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5197
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, DenseInfo other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_9DenseInfo_CopyFrom(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CopyFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9DenseInfo_15CopyFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5197, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5204
 *             other_msg (DenseInfo): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":5205
 *         """
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 *         self.reset()
 *         self.MergeFrom(other_msg)
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":5204
 *             other_msg (DenseInfo): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  }

  /* "pyrosm_proto.pyx":5206
 *         if self is other_msg:
 *             return
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self.MergeFrom(other_msg)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5207
 *             return
 *         self.reset()
 *         self.MergeFrom(other_msg)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint HasField(self, field_name) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->MergeFrom(__pyx_v_self, __pyx_v_other_msg, 0);

  /* "pyrosm_proto.pyx":5197
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, DenseInfo other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.DenseInfo.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_14CopyFrom[] = "\n        Copies the content of the specified message into the current message.\n\n        Params:\n            other_msg (DenseInfo): Message to copy into the current one.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CopyFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_DenseInfo, 1, "other_msg", 0))) __PYX_ERR(0, 5197, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_14CopyFrom(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_14CopyFrom(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_9DenseInfo_CopyFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5197, __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("pyrosm_proto.DenseInfo.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5209
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static int __pyx_f_12pyrosm_proto_9DenseInfo_HasField(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("HasField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_HasField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5209, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9DenseInfo_17HasField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5209, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5209, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5216
 *             field_name (str): The name of the field to check.
 *         """
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint IsInitialized(self):
 */
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_singular, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 5216, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5209
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

  /* 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("pyrosm_proto.DenseInfo.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_16HasField[] = "\n        Checks if a certain field is set for the message.\n\n        Params:\n            field_name (str): The name of the field to check.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_16HasField(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_16HasField(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("HasField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_9DenseInfo_HasField(__pyx_v_self, __pyx_v_field_name, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5209, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5218
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_12pyrosm_proto_9DenseInfo_IsInitialized(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_IsInitialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9DenseInfo_19IsInitialized)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5218, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5218, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5229
 * 
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef void MergeFrom(self, DenseInfo other_msg):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5218
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

  /* 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_WriteUnraisable("pyrosm_proto.DenseInfo.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_18IsInitialized[] = "\n        Checks if the message is initialized.\n\n        Returns:\n            bool: True if the message is initialized (i.e. all of its required\n                fields are set).\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsInitialized (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_18IsInitialized(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_18IsInitialized(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_12pyrosm_proto_9DenseInfo_IsInitialized(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5218, __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("pyrosm_proto.DenseInfo.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5231
 *         return True
 * 
 *     cpdef void MergeFrom(self, DenseInfo other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_9DenseInfo_MergeFrom(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5231, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9DenseInfo_21MergeFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5231, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5240
 *         cdef int i
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":5241
 * 
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":5240
 *         cdef int i
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "pyrosm_proto.pyx":5244
 * 
 * 
 *         self._version.extend(other_msg._version)             # <<<<<<<<<<<<<<
 *         self._timestamp.extend(other_msg._timestamp)
 *         self._changeset.extend(other_msg._changeset)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_version);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_version->__pyx_vtab)->extend(__pyx_v_self->_version, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5244, __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;

  /* "pyrosm_proto.pyx":5245
 * 
 *         self._version.extend(other_msg._version)
 *         self._timestamp.extend(other_msg._timestamp)             # <<<<<<<<<<<<<<
 *         self._changeset.extend(other_msg._changeset)
 *         self._uid.extend(other_msg._uid)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_other_msg->_timestamp);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_timestamp->__pyx_vtab)->extend(__pyx_v_self->_timestamp, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5245, __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;

  /* "pyrosm_proto.pyx":5246
 *         self._version.extend(other_msg._version)
 *         self._timestamp.extend(other_msg._timestamp)
 *         self._changeset.extend(other_msg._changeset)             # <<<<<<<<<<<<<<
 *         self._uid.extend(other_msg._uid)
 *         self._user_sid.extend(other_msg._user_sid)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_changeset);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_changeset->__pyx_vtab)->extend(__pyx_v_self->_changeset, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5246, __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;

  /* "pyrosm_proto.pyx":5247
 *         self._timestamp.extend(other_msg._timestamp)
 *         self._changeset.extend(other_msg._changeset)
 *         self._uid.extend(other_msg._uid)             # <<<<<<<<<<<<<<
 *         self._user_sid.extend(other_msg._user_sid)
 *         self._visible.extend(other_msg._visible)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_other_msg->_uid);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_uid->__pyx_vtab)->extend(__pyx_v_self->_uid, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5247, __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;

  /* "pyrosm_proto.pyx":5248
 *         self._changeset.extend(other_msg._changeset)
 *         self._uid.extend(other_msg._uid)
 *         self._user_sid.extend(other_msg._user_sid)             # <<<<<<<<<<<<<<
 *         self._visible.extend(other_msg._visible)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_user_sid);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_user_sid->__pyx_vtab)->extend(__pyx_v_self->_user_sid, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5248, __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;

  /* "pyrosm_proto.pyx":5249
 *         self._uid.extend(other_msg._uid)
 *         self._user_sid.extend(other_msg._user_sid)
 *         self._visible.extend(other_msg._visible)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_other_msg->_visible);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_visible->__pyx_vtab)->extend(__pyx_v_self->_visible, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5249, __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;

  /* "pyrosm_proto.pyx":5251
 *         self._visible.extend(other_msg._visible)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5231
 *         return True
 * 
 *     cpdef void MergeFrom(self, DenseInfo other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.DenseInfo.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_20MergeFrom[] = "\n        Merges the contents of the specified message into the current message.\n\n        Params:\n            other_msg: Message to merge into the current message.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_DenseInfo, 1, "other_msg", 0))) __PYX_ERR(0, 5231, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_20MergeFrom(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_20MergeFrom(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_9DenseInfo_MergeFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5231, __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("pyrosm_proto.DenseInfo.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5253
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_9DenseInfo_MergeFromString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_MergeFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  unsigned char const *__pyx_t_10;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9DenseInfo_23MergeFromString)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5253, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5253, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5253, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5253, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5253, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5267
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, False)
 */
  __pyx_t_7 = (__pyx_v_size != Py_None);
  if ((__pyx_t_7 != 0)) {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5267, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_8;
  } else {
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5267, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_9;
  }
  __pyx_v_length = __pyx_t_5;

  /* "pyrosm_proto.pyx":5269
 *         length = size if size is not None else len(data)
 * 
 *         buf = self._protobuf_deserialize(data, length, False)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_10 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 5269, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_10, __pyx_v_length, 0);

  /* "pyrosm_proto.pyx":5271
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  __pyx_t_7 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "pyrosm_proto.pyx":5272
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_GIVEREF(__pyx_v_size);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_size);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Truncated_message_got_s_expected, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5272, __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, 5272, __pyx_L1_error)

    /* "pyrosm_proto.pyx":5271
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  }

  /* "pyrosm_proto.pyx":5274
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5276
 *         self._Modified()
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5253
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_22MergeFromString[] = "\n        Merges serialized protocol buffer data into this message.\n\n        Params:\n            data (bytes): a string of binary data.\n            size (int): optional - the length of the data string\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "MergeFromString") < 0)) __PYX_ERR(0, 5253, __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_data = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MergeFromString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5253, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_22MergeFromString(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), __pyx_v_data, __pyx_v_size);

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_22MergeFromString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_MergeFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_DenseInfo->MergeFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5253, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5278
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_9DenseInfo_ParseFromString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_ParseFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_reset = ((int)1);
  int __pyx_v_cache = ((int)0);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  unsigned char const *__pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_reset = __pyx_optional_args->reset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cache = __pyx_optional_args->cache;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9DenseInfo_25ParseFromString)) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5278, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5278, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5278, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5278, __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(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5278, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_size);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 3+__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, 5278, __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, 5278, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5294
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         if reset:
 */
  __pyx_t_9 = (__pyx_v_size != Py_None);
  if ((__pyx_t_9 != 0)) {
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5294, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5294, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_11;
  }
  __pyx_v_length = __pyx_t_7;

  /* "pyrosm_proto.pyx":5296
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_9 = (__pyx_v_reset != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":5297
 * 
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":5296
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":5299
 *             self.reset()
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_12 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 5299, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_12, __pyx_v_length, __pyx_v_cache);

  /* "pyrosm_proto.pyx":5301
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  __pyx_t_9 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "pyrosm_proto.pyx":5302
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message")             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s_Truncated_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Truncated_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5302, __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, 5302, __pyx_L1_error)

    /* "pyrosm_proto.pyx":5301
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  }

  /* "pyrosm_proto.pyx":5304
 *             raise DecodeError("Truncated message")
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5306
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  __pyx_t_9 = (__pyx_v_cache != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":5307
 * 
 *         if cache:
 *             self._cached_serialization = data             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) __PYX_ERR(0, 5307, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5306
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  }

  /* "pyrosm_proto.pyx":5309
 *             self._cached_serialization = data
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5278
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_24ParseFromString[] = "\n        Populate the message class from a string of protobuf encoded binary data.\n\n        Params:\n            data (bytes): a string of binary data\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n            cache (bool): optional - whether to cache serialized data\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_v_reset;
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,&__pyx_n_s_cache,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromString") < 0)) __PYX_ERR(0, 5278, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    if (values[2]) {
      __pyx_v_reset = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5278, __pyx_L3_error)
    } else {
      __pyx_v_reset = ((int)1);
    }
    if (values[3]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5278, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromString", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5278, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_24ParseFromString(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset, __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_24ParseFromString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_ParseFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.reset = __pyx_v_reset;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_DenseInfo->ParseFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5278, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5312
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FromString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_26FromString(((PyTypeObject*)__pyx_v_cls), ((PyObject *)__pyx_v_s));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("FromString", 0);

  /* "pyrosm_proto.pyx":5313
 *     @classmethod
 *     def FromString(cls, s):
 *         message = cls()             # <<<<<<<<<<<<<<
 *         message.MergeFromString(s)
 *         return message
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5314
 *     def FromString(cls, s):
 *         message = cls()
 *         message.MergeFromString(s)             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5314, __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;

  /* "pyrosm_proto.pyx":5315
 *         message = cls()
 *         message.MergeFromString(s)
 *         return message             # <<<<<<<<<<<<<<
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5312
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.FromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5317
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # version
 */

static void __pyx_f_12pyrosm_proto_9DenseInfo__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_buf, CYTHON_UNUSED int __pyx_v_cache) {
  Py_ssize_t __pyx_v_length;
  int32_t __pyx_v_version_elt;
  PyObject *__pyx_v_version_buf = 0;
  int64_t __pyx_v_timestamp_elt;
  PyObject *__pyx_v_timestamp_buf = 0;
  int64_t __pyx_v_changeset_elt;
  PyObject *__pyx_v_changeset_buf = 0;
  int32_t __pyx_v_uid_elt;
  PyObject *__pyx_v_uid_buf = 0;
  int32_t __pyx_v_user_sid_elt;
  PyObject *__pyx_v_user_sid_buf = 0;
  uint32_t __pyx_v_visible_elt;
  PyObject *__pyx_v_visible_buf = 0;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int32_t __pyx_t_6;
  int64_t __pyx_t_7;
  uint32_t __pyx_t_8;
  __Pyx_RefNannySetupContext("_protobuf_serialize", 0);
  __Pyx_INCREF(__pyx_v_buf);

  /* "pyrosm_proto.pyx":5321
 *         # version
 *         cdef int32_t version_elt
 *         cdef bytearray version_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._version)
 *         if length > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_version_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5322
 *         cdef int32_t version_elt
 *         cdef bytearray version_buf = bytearray()
 *         length = len(self._version)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(10, buf)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_version);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "pyrosm_proto.pyx":5323
 *         cdef bytearray version_buf = bytearray()
 *         length = len(self._version)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             for version_elt in self._version:
 */
  __pyx_t_3 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5324
 *         length = len(self._version)
 *         if length > 0:
 *             set_varint64(10, buf)             # <<<<<<<<<<<<<<
 *             for version_elt in self._version:
 *                 set_varint32(version_elt, version_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(10, __pyx_v_buf));

    /* "pyrosm_proto.pyx":5325
 *         if length > 0:
 *             set_varint64(10, buf)
 *             for version_elt in self._version:             # <<<<<<<<<<<<<<
 *                 set_varint32(version_elt, version_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_version))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_version))) {
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_version); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->_version)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5325, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        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_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 5325, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5325, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 5325, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5325, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 5325, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_6 = __Pyx_PyInt_As_int32_t(__pyx_t_5); if (unlikely((__pyx_t_6 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5325, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_version_elt = __pyx_t_6;

      /* "pyrosm_proto.pyx":5326
 *             set_varint64(10, buf)
 *             for version_elt in self._version:
 *                 set_varint32(version_elt, version_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(version_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_version_elt, __pyx_v_version_buf));

      /* "pyrosm_proto.pyx":5325
 *         if length > 0:
 *             set_varint64(10, buf)
 *             for version_elt in self._version:             # <<<<<<<<<<<<<<
 *                 set_varint32(version_elt, version_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5328
 *                 set_varint32(version_elt, version_buf)
 * 
 *             set_varint64(len(version_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += version_buf
 *         # timestamp
 */
    __pyx_t_2 = PyByteArray_GET_SIZE(__pyx_v_version_buf); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5328, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_2, __pyx_v_buf));

    /* "pyrosm_proto.pyx":5329
 * 
 *             set_varint64(len(version_buf), buf)
 *             buf += version_buf             # <<<<<<<<<<<<<<
 *         # timestamp
 *         cdef int64_t timestamp_elt
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_version_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5323
 *         cdef bytearray version_buf = bytearray()
 *         length = len(self._version)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             for version_elt in self._version:
 */
  }

  /* "pyrosm_proto.pyx":5332
 *         # timestamp
 *         cdef int64_t timestamp_elt
 *         cdef bytearray timestamp_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._timestamp)
 *         if length > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_timestamp_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5333
 *         cdef int64_t timestamp_elt
 *         cdef bytearray timestamp_buf = bytearray()
 *         length = len(self._timestamp)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(18, buf)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_timestamp);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "pyrosm_proto.pyx":5334
 *         cdef bytearray timestamp_buf = bytearray()
 *         length = len(self._timestamp)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(18, buf)
 *             for timestamp_elt in self._timestamp:
 */
  __pyx_t_3 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5335
 *         length = len(self._timestamp)
 *         if length > 0:
 *             set_varint64(18, buf)             # <<<<<<<<<<<<<<
 *             for timestamp_elt in self._timestamp:
 *                 set_signed_varint64(timestamp_elt, timestamp_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(18, __pyx_v_buf));

    /* "pyrosm_proto.pyx":5336
 *         if length > 0:
 *             set_varint64(18, buf)
 *             for timestamp_elt in self._timestamp:             # <<<<<<<<<<<<<<
 *                 set_signed_varint64(timestamp_elt, timestamp_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_timestamp))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_timestamp))) {
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_timestamp); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->_timestamp)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5336, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5336, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        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_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 5336, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5336, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 5336, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5336, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 5336, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_7 = __Pyx_PyInt_As_int64_t(__pyx_t_5); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5336, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_timestamp_elt = __pyx_t_7;

      /* "pyrosm_proto.pyx":5337
 *             set_varint64(18, buf)
 *             for timestamp_elt in self._timestamp:
 *                 set_signed_varint64(timestamp_elt, timestamp_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(timestamp_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_signed_varint64(__pyx_v_timestamp_elt, __pyx_v_timestamp_buf));

      /* "pyrosm_proto.pyx":5336
 *         if length > 0:
 *             set_varint64(18, buf)
 *             for timestamp_elt in self._timestamp:             # <<<<<<<<<<<<<<
 *                 set_signed_varint64(timestamp_elt, timestamp_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5339
 *                 set_signed_varint64(timestamp_elt, timestamp_buf)
 * 
 *             set_varint64(len(timestamp_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += timestamp_buf
 *         # changeset
 */
    __pyx_t_2 = PyByteArray_GET_SIZE(__pyx_v_timestamp_buf); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5339, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_2, __pyx_v_buf));

    /* "pyrosm_proto.pyx":5340
 * 
 *             set_varint64(len(timestamp_buf), buf)
 *             buf += timestamp_buf             # <<<<<<<<<<<<<<
 *         # changeset
 *         cdef int64_t changeset_elt
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_timestamp_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5334
 *         cdef bytearray timestamp_buf = bytearray()
 *         length = len(self._timestamp)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(18, buf)
 *             for timestamp_elt in self._timestamp:
 */
  }

  /* "pyrosm_proto.pyx":5343
 *         # changeset
 *         cdef int64_t changeset_elt
 *         cdef bytearray changeset_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._changeset)
 *         if length > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_changeset_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5344
 *         cdef int64_t changeset_elt
 *         cdef bytearray changeset_buf = bytearray()
 *         length = len(self._changeset)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(26, buf)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_changeset);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5344, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "pyrosm_proto.pyx":5345
 *         cdef bytearray changeset_buf = bytearray()
 *         length = len(self._changeset)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(26, buf)
 *             for changeset_elt in self._changeset:
 */
  __pyx_t_3 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5346
 *         length = len(self._changeset)
 *         if length > 0:
 *             set_varint64(26, buf)             # <<<<<<<<<<<<<<
 *             for changeset_elt in self._changeset:
 *                 set_signed_varint64(changeset_elt, changeset_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(26, __pyx_v_buf));

    /* "pyrosm_proto.pyx":5347
 *         if length > 0:
 *             set_varint64(26, buf)
 *             for changeset_elt in self._changeset:             # <<<<<<<<<<<<<<
 *                 set_signed_varint64(changeset_elt, changeset_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_changeset))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_changeset))) {
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_changeset); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->_changeset)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5347, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5347, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        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_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 5347, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5347, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 5347, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5347, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 5347, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_7 = __Pyx_PyInt_As_int64_t(__pyx_t_5); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5347, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_changeset_elt = __pyx_t_7;

      /* "pyrosm_proto.pyx":5348
 *             set_varint64(26, buf)
 *             for changeset_elt in self._changeset:
 *                 set_signed_varint64(changeset_elt, changeset_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(changeset_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_signed_varint64(__pyx_v_changeset_elt, __pyx_v_changeset_buf));

      /* "pyrosm_proto.pyx":5347
 *         if length > 0:
 *             set_varint64(26, buf)
 *             for changeset_elt in self._changeset:             # <<<<<<<<<<<<<<
 *                 set_signed_varint64(changeset_elt, changeset_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5350
 *                 set_signed_varint64(changeset_elt, changeset_buf)
 * 
 *             set_varint64(len(changeset_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += changeset_buf
 *         # uid
 */
    __pyx_t_2 = PyByteArray_GET_SIZE(__pyx_v_changeset_buf); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5350, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_2, __pyx_v_buf));

    /* "pyrosm_proto.pyx":5351
 * 
 *             set_varint64(len(changeset_buf), buf)
 *             buf += changeset_buf             # <<<<<<<<<<<<<<
 *         # uid
 *         cdef int32_t uid_elt
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_changeset_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5345
 *         cdef bytearray changeset_buf = bytearray()
 *         length = len(self._changeset)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(26, buf)
 *             for changeset_elt in self._changeset:
 */
  }

  /* "pyrosm_proto.pyx":5354
 *         # uid
 *         cdef int32_t uid_elt
 *         cdef bytearray uid_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._uid)
 *         if length > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_uid_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5355
 *         cdef int32_t uid_elt
 *         cdef bytearray uid_buf = bytearray()
 *         length = len(self._uid)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(34, buf)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_uid);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5355, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "pyrosm_proto.pyx":5356
 *         cdef bytearray uid_buf = bytearray()
 *         length = len(self._uid)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(34, buf)
 *             for uid_elt in self._uid:
 */
  __pyx_t_3 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5357
 *         length = len(self._uid)
 *         if length > 0:
 *             set_varint64(34, buf)             # <<<<<<<<<<<<<<
 *             for uid_elt in self._uid:
 *                 set_signed_varint32(uid_elt, uid_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(34, __pyx_v_buf));

    /* "pyrosm_proto.pyx":5358
 *         if length > 0:
 *             set_varint64(34, buf)
 *             for uid_elt in self._uid:             # <<<<<<<<<<<<<<
 *                 set_signed_varint32(uid_elt, uid_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_uid))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_uid))) {
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_uid); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->_uid)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5358, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        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_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 5358, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5358, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 5358, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5358, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 5358, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_6 = __Pyx_PyInt_As_int32_t(__pyx_t_5); if (unlikely((__pyx_t_6 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5358, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_uid_elt = __pyx_t_6;

      /* "pyrosm_proto.pyx":5359
 *             set_varint64(34, buf)
 *             for uid_elt in self._uid:
 *                 set_signed_varint32(uid_elt, uid_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(uid_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_signed_varint32(__pyx_v_uid_elt, __pyx_v_uid_buf));

      /* "pyrosm_proto.pyx":5358
 *         if length > 0:
 *             set_varint64(34, buf)
 *             for uid_elt in self._uid:             # <<<<<<<<<<<<<<
 *                 set_signed_varint32(uid_elt, uid_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5361
 *                 set_signed_varint32(uid_elt, uid_buf)
 * 
 *             set_varint64(len(uid_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += uid_buf
 *         # user_sid
 */
    __pyx_t_2 = PyByteArray_GET_SIZE(__pyx_v_uid_buf); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5361, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_2, __pyx_v_buf));

    /* "pyrosm_proto.pyx":5362
 * 
 *             set_varint64(len(uid_buf), buf)
 *             buf += uid_buf             # <<<<<<<<<<<<<<
 *         # user_sid
 *         cdef int32_t user_sid_elt
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_uid_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5356
 *         cdef bytearray uid_buf = bytearray()
 *         length = len(self._uid)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(34, buf)
 *             for uid_elt in self._uid:
 */
  }

  /* "pyrosm_proto.pyx":5365
 *         # user_sid
 *         cdef int32_t user_sid_elt
 *         cdef bytearray user_sid_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._user_sid)
 *         if length > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_user_sid_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5366
 *         cdef int32_t user_sid_elt
 *         cdef bytearray user_sid_buf = bytearray()
 *         length = len(self._user_sid)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(42, buf)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_user_sid);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "pyrosm_proto.pyx":5367
 *         cdef bytearray user_sid_buf = bytearray()
 *         length = len(self._user_sid)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(42, buf)
 *             for user_sid_elt in self._user_sid:
 */
  __pyx_t_3 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5368
 *         length = len(self._user_sid)
 *         if length > 0:
 *             set_varint64(42, buf)             # <<<<<<<<<<<<<<
 *             for user_sid_elt in self._user_sid:
 *                 set_signed_varint32(user_sid_elt, user_sid_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(42, __pyx_v_buf));

    /* "pyrosm_proto.pyx":5369
 *         if length > 0:
 *             set_varint64(42, buf)
 *             for user_sid_elt in self._user_sid:             # <<<<<<<<<<<<<<
 *                 set_signed_varint32(user_sid_elt, user_sid_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_user_sid))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_user_sid))) {
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_user_sid); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->_user_sid)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5369, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5369, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        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_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 5369, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5369, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 5369, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5369, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 5369, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_6 = __Pyx_PyInt_As_int32_t(__pyx_t_5); if (unlikely((__pyx_t_6 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5369, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_user_sid_elt = __pyx_t_6;

      /* "pyrosm_proto.pyx":5370
 *             set_varint64(42, buf)
 *             for user_sid_elt in self._user_sid:
 *                 set_signed_varint32(user_sid_elt, user_sid_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(user_sid_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_signed_varint32(__pyx_v_user_sid_elt, __pyx_v_user_sid_buf));

      /* "pyrosm_proto.pyx":5369
 *         if length > 0:
 *             set_varint64(42, buf)
 *             for user_sid_elt in self._user_sid:             # <<<<<<<<<<<<<<
 *                 set_signed_varint32(user_sid_elt, user_sid_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5372
 *                 set_signed_varint32(user_sid_elt, user_sid_buf)
 * 
 *             set_varint64(len(user_sid_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += user_sid_buf
 *         # visible
 */
    __pyx_t_2 = PyByteArray_GET_SIZE(__pyx_v_user_sid_buf); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5372, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_2, __pyx_v_buf));

    /* "pyrosm_proto.pyx":5373
 * 
 *             set_varint64(len(user_sid_buf), buf)
 *             buf += user_sid_buf             # <<<<<<<<<<<<<<
 *         # visible
 *         cdef uint32_t visible_elt
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_user_sid_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5367
 *         cdef bytearray user_sid_buf = bytearray()
 *         length = len(self._user_sid)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(42, buf)
 *             for user_sid_elt in self._user_sid:
 */
  }

  /* "pyrosm_proto.pyx":5376
 *         # visible
 *         cdef uint32_t visible_elt
 *         cdef bytearray visible_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._visible)
 *         if length > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_visible_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5377
 *         cdef uint32_t visible_elt
 *         cdef bytearray visible_buf = bytearray()
 *         length = len(self._visible)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(50, buf)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_visible);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5377, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "pyrosm_proto.pyx":5378
 *         cdef bytearray visible_buf = bytearray()
 *         length = len(self._visible)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(50, buf)
 *             for visible_elt in self._visible:
 */
  __pyx_t_3 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5379
 *         length = len(self._visible)
 *         if length > 0:
 *             set_varint64(50, buf)             # <<<<<<<<<<<<<<
 *             for visible_elt in self._visible:
 *                 set_varint32(visible_elt, visible_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(50, __pyx_v_buf));

    /* "pyrosm_proto.pyx":5380
 *         if length > 0:
 *             set_varint64(50, buf)
 *             for visible_elt in self._visible:             # <<<<<<<<<<<<<<
 *                 set_varint32(visible_elt, visible_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_visible))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_visible))) {
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_visible); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->_visible)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5380, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5380, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        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_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 5380, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5380, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 5380, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5380, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 5380, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_8 = __Pyx_PyInt_As_uint32_t(__pyx_t_5); if (unlikely((__pyx_t_8 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5380, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_visible_elt = __pyx_t_8;

      /* "pyrosm_proto.pyx":5381
 *             set_varint64(50, buf)
 *             for visible_elt in self._visible:
 *                 set_varint32(visible_elt, visible_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(visible_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_visible_elt, __pyx_v_visible_buf));

      /* "pyrosm_proto.pyx":5380
 *         if length > 0:
 *             set_varint64(50, buf)
 *             for visible_elt in self._visible:             # <<<<<<<<<<<<<<
 *                 set_varint32(visible_elt, visible_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5383
 *                 set_varint32(visible_elt, visible_buf)
 * 
 *             set_varint64(len(visible_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += visible_buf
 * 
 */
    __pyx_t_2 = PyByteArray_GET_SIZE(__pyx_v_visible_buf); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5383, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_2, __pyx_v_buf));

    /* "pyrosm_proto.pyx":5384
 * 
 *             set_varint64(len(visible_buf), buf)
 *             buf += visible_buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef void _Modified(self):
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_visible_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5378
 *         cdef bytearray visible_buf = bytearray()
 *         length = len(self._visible)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(50, buf)
 *             for visible_elt in self._visible:
 */
  }

  /* "pyrosm_proto.pyx":5317
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # version
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("pyrosm_proto.DenseInfo._protobuf_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_version_buf);
  __Pyx_XDECREF(__pyx_v_timestamp_buf);
  __Pyx_XDECREF(__pyx_v_changeset_buf);
  __Pyx_XDECREF(__pyx_v_uid_buf);
  __Pyx_XDECREF(__pyx_v_user_sid_buf);
  __Pyx_XDECREF(__pyx_v_visible_buf);
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_RefNannyFinishContext();
}

/* "pyrosm_proto.pyx":5386
 *             buf += visible_buf
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_9DenseInfo__Modified(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Modified); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9DenseInfo_29_Modified)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5386, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5387
 * 
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":5388
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()             # <<<<<<<<<<<<<<
 *         self._cached_serialization = None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_listener), __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5388, __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;

  /* "pyrosm_proto.pyx":5389
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
  __Pyx_DECREF(__pyx_v_self->_cached_serialization);
  __pyx_v_self->_cached_serialization = ((PyObject*)Py_None);

  /* "pyrosm_proto.pyx":5386
 *             buf += visible_buf
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.DenseInfo._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_Modified (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_28_Modified(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_28_Modified(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_9DenseInfo__Modified(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5386, __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("pyrosm_proto.DenseInfo._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5391
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_9DenseInfo_SerializeToString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_SerializeToString *__pyx_optional_args) {
  int __pyx_v_cache = ((int)0);
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_out = 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;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cache = __pyx_optional_args->cache;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5391, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9DenseInfo_31SerializeToString)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5391, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5391, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 5391, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5401
 * 
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_6 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":5402
 * 
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":5401
 * 
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":5404
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5405
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)             # <<<<<<<<<<<<<<
 *         cdef bytes out = bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, __pyx_v_cache);

  /* "pyrosm_proto.pyx":5406
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5408
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  __pyx_t_7 = (__pyx_v_cache != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":5409
 * 
 *         if cache:
 *             self._cached_serialization = out             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = __pyx_v_out;

    /* "pyrosm_proto.pyx":5408
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  }

  /* "pyrosm_proto.pyx":5411
 *             self._cached_serialization = out
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializePartialToString(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5391
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.DenseInfo.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_30SerializeToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cache,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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SerializeToString") < 0)) __PYX_ERR(0, 5391, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5391, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("SerializeToString", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5391, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_30SerializeToString(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_30SerializeToString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_SerializeToString __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_DenseInfo->SerializeToString(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5391, __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("pyrosm_proto.DenseInfo.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5413
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_9DenseInfo_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_buf = 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;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5413, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9DenseInfo_33SerializePartialToString)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5413, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 5413, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5420
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_5 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":5421
 *         """
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":5420
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":5423
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5424
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)             # <<<<<<<<<<<<<<
 *         return bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, 0);

  /* "pyrosm_proto.pyx":5425
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *     def SetInParent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5413
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.DenseInfo.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_32SerializePartialToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_32SerializePartialToString(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_9DenseInfo_SerializePartialToString(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5413, __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("pyrosm_proto.DenseInfo.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5427
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_34SetInParent[] = "\n        Mark this an present in the parent.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_34SetInParent(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_34SetInParent(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent", 0);

  /* "pyrosm_proto.pyx":5431
 *         Mark this an present in the parent.
 *         """
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5427
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5433
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_36ParseFromJson[] = "\n        Populate the message class from a json string.\n\n        Params:\n            data (str): a json string\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromJson (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromJson") < 0)) __PYX_ERR(0, 5433, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    __pyx_v_reset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromJson", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5433, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_36ParseFromJson(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("ParseFromJson", 0);
  __Pyx_INCREF(__pyx_v_size);

  /* "pyrosm_proto.pyx":5442
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":5443
 *         """
 *         if size is None:
 *             size = len(data)             # <<<<<<<<<<<<<<
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5443, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":5442
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  }

  /* "pyrosm_proto.pyx":5444
 *         if size is None:
 *             size = len(data)
 *         d = json.loads(data[:size])             # <<<<<<<<<<<<<<
 *         self.ParseFromDict(d, reset)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_json); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_d = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":5445
 *             size = len(data)
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToJson(self, **kwargs):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5445, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5445, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5445, __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_d);
    __Pyx_GIVEREF(__pyx_v_d);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_d);
    __Pyx_INCREF(__pyx_v_reset);
    __Pyx_GIVEREF(__pyx_v_reset);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_reset);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":5433
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5447
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_38SerializeToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializeToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializeToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_38SerializeToJson(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializeToJson", 0);

  /* "pyrosm_proto.pyx":5454
 *             str: a json formatted string
 *         """
 *         d = self.SerializeToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5455
 *         """
 *         d = self.SerializeToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToJson(self, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5447
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.SerializeToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5457
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_40SerializePartialToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializePartialToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializePartialToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_40SerializePartialToJson(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToJson", 0);

  /* "pyrosm_proto.pyx":5464
 *             str: a json formatted string
 *         """
 *         d = self.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5465
 *         """
 *         d = self.SerializePartialToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromDict(self, d, reset=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5457
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.SerializePartialToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5467
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_42ParseFromDict[] = "\n        Populate the message class from a Python dictionary.\n\n        Params:\n            d (dict): a Python dictionary representing the message\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,&__pyx_n_s_reset,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 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_reset);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromDict") < 0)) __PYX_ERR(0, 5467, __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_d = values[0];
    __pyx_v_reset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromDict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5467, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_42ParseFromDict(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), __pyx_v_d, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset) {
  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;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("ParseFromDict", 0);

  /* "pyrosm_proto.pyx":5475
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reset); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5475, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":5476
 *         """
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         assert type(d) == dict
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":5475
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":5478
 *             self.reset()
 * 
 *         assert type(d) == dict             # <<<<<<<<<<<<<<
 *         try:
 *             self.version = d["version"]
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_d)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5478, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5478, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 5478, __pyx_L1_error)
    }
  }
  #endif

  /* "pyrosm_proto.pyx":5479
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.version = d["version"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":5480
 *         assert type(d) == dict
 *         try:
 *             self.version = d["version"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5480, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_version, __pyx_t_2) < 0) __PYX_ERR(0, 5480, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":5479
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.version = d["version"]
 *         except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":5481
 *         try:
 *             self.version = d["version"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":5479
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.version = d["version"]
 *         except KeyError:
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":5483
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.timestamp = d["timestamp"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":5484
 *             pass
 *         try:
 *             self.timestamp = d["timestamp"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5484, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_timestamp, __pyx_t_2) < 0) __PYX_ERR(0, 5484, __pyx_L10_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":5483
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.timestamp = d["timestamp"]
 *         except KeyError:
 */
    }
    __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_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":5485
 *         try:
 *             self.timestamp = d["timestamp"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    goto __pyx_L12_except_error;
    __pyx_L12_except_error:;

    /* "pyrosm_proto.pyx":5483
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.timestamp = d["timestamp"]
 *         except KeyError:
 */
    __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:;
  }

  /* "pyrosm_proto.pyx":5487
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.changeset = d["changeset"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":5488
 *             pass
 *         try:
 *             self.changeset = d["changeset"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_changeset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5488, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_changeset, __pyx_t_2) < 0) __PYX_ERR(0, 5488, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":5487
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.changeset = d["changeset"]
 *         except KeyError:
 */
    }
    __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_L21_try_end;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":5489
 *         try:
 *             self.changeset = d["changeset"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L17_exception_handled;
    }
    goto __pyx_L18_except_error;
    __pyx_L18_except_error:;

    /* "pyrosm_proto.pyx":5487
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.changeset = d["changeset"]
 *         except KeyError:
 */
    __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_L17_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_L21_try_end:;
  }

  /* "pyrosm_proto.pyx":5491
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.uid = d["uid"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":5492
 *             pass
 *         try:
 *             self.uid = d["uid"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_uid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5492, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_uid, __pyx_t_2) < 0) __PYX_ERR(0, 5492, __pyx_L22_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":5491
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.uid = d["uid"]
 *         except KeyError:
 */
    }
    __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_L27_try_end;
    __pyx_L22_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":5493
 *         try:
 *             self.uid = d["uid"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L23_exception_handled;
    }
    goto __pyx_L24_except_error;
    __pyx_L24_except_error:;

    /* "pyrosm_proto.pyx":5491
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.uid = d["uid"]
 *         except KeyError:
 */
    __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_L23_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_L27_try_end:;
  }

  /* "pyrosm_proto.pyx":5495
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.user_sid = d["user_sid"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":5496
 *             pass
 *         try:
 *             self.user_sid = d["user_sid"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_user_sid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5496, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_user_sid, __pyx_t_2) < 0) __PYX_ERR(0, 5496, __pyx_L28_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":5495
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.user_sid = d["user_sid"]
 *         except KeyError:
 */
    }
    __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_L33_try_end;
    __pyx_L28_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":5497
 *         try:
 *             self.user_sid = d["user_sid"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L29_exception_handled;
    }
    goto __pyx_L30_except_error;
    __pyx_L30_except_error:;

    /* "pyrosm_proto.pyx":5495
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.user_sid = d["user_sid"]
 *         except KeyError:
 */
    __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_L29_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_L33_try_end:;
  }

  /* "pyrosm_proto.pyx":5499
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.visible = d["visible"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":5500
 *             pass
 *         try:
 *             self.visible = d["visible"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_visible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5500, __pyx_L34_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_visible, __pyx_t_2) < 0) __PYX_ERR(0, 5500, __pyx_L34_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":5499
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.visible = d["visible"]
 *         except KeyError:
 */
    }
    __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_L39_try_end;
    __pyx_L34_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":5501
 *         try:
 *             self.visible = d["visible"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L35_exception_handled;
    }
    goto __pyx_L36_except_error;
    __pyx_L36_except_error:;

    /* "pyrosm_proto.pyx":5499
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.visible = d["visible"]
 *         except KeyError:
 */
    __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_L35_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_L39_try_end:;
  }

  /* "pyrosm_proto.pyx":5504
 *             pass
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5506
 *         self._Modified()
 * 
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5467
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5508
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_44SerializeToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_44SerializeToDict(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("SerializeToDict", 0);

  /* "pyrosm_proto.pyx":5515
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if len(self.version) > 0:
 *             out["version"] = list(self.version)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5516
 *         """
 *         out = {}
 *         if len(self.version) > 0:             # <<<<<<<<<<<<<<
 *             out["version"] = list(self.version)
 *         if len(self.timestamp) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5516, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5517
 *         out = {}
 *         if len(self.version) > 0:
 *             out["version"] = list(self.version)             # <<<<<<<<<<<<<<
 *         if len(self.timestamp) > 0:
 *             out["timestamp"] = list(self.timestamp)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_version, __pyx_t_4) < 0)) __PYX_ERR(0, 5517, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":5516
 *         """
 *         out = {}
 *         if len(self.version) > 0:             # <<<<<<<<<<<<<<
 *             out["version"] = list(self.version)
 *         if len(self.timestamp) > 0:
 */
  }

  /* "pyrosm_proto.pyx":5518
 *         if len(self.version) > 0:
 *             out["version"] = list(self.version)
 *         if len(self.timestamp) > 0:             # <<<<<<<<<<<<<<
 *             out["timestamp"] = list(self.timestamp)
 *         if len(self.changeset) > 0:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5519
 *             out["version"] = list(self.version)
 *         if len(self.timestamp) > 0:
 *             out["timestamp"] = list(self.timestamp)             # <<<<<<<<<<<<<<
 *         if len(self.changeset) > 0:
 *             out["changeset"] = list(self.changeset)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_timestamp, __pyx_t_1) < 0)) __PYX_ERR(0, 5519, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5518
 *         if len(self.version) > 0:
 *             out["version"] = list(self.version)
 *         if len(self.timestamp) > 0:             # <<<<<<<<<<<<<<
 *             out["timestamp"] = list(self.timestamp)
 *         if len(self.changeset) > 0:
 */
  }

  /* "pyrosm_proto.pyx":5520
 *         if len(self.timestamp) > 0:
 *             out["timestamp"] = list(self.timestamp)
 *         if len(self.changeset) > 0:             # <<<<<<<<<<<<<<
 *             out["changeset"] = list(self.changeset)
 *         if len(self.uid) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_changeset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5521
 *             out["timestamp"] = list(self.timestamp)
 *         if len(self.changeset) > 0:
 *             out["changeset"] = list(self.changeset)             # <<<<<<<<<<<<<<
 *         if len(self.uid) > 0:
 *             out["uid"] = list(self.uid)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_changeset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_changeset, __pyx_t_4) < 0)) __PYX_ERR(0, 5521, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":5520
 *         if len(self.timestamp) > 0:
 *             out["timestamp"] = list(self.timestamp)
 *         if len(self.changeset) > 0:             # <<<<<<<<<<<<<<
 *             out["changeset"] = list(self.changeset)
 *         if len(self.uid) > 0:
 */
  }

  /* "pyrosm_proto.pyx":5522
 *         if len(self.changeset) > 0:
 *             out["changeset"] = list(self.changeset)
 *         if len(self.uid) > 0:             # <<<<<<<<<<<<<<
 *             out["uid"] = list(self.uid)
 *         if len(self.user_sid) > 0:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_uid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5523
 *             out["changeset"] = list(self.changeset)
 *         if len(self.uid) > 0:
 *             out["uid"] = list(self.uid)             # <<<<<<<<<<<<<<
 *         if len(self.user_sid) > 0:
 *             out["user_sid"] = list(self.user_sid)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_uid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_uid, __pyx_t_1) < 0)) __PYX_ERR(0, 5523, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5522
 *         if len(self.changeset) > 0:
 *             out["changeset"] = list(self.changeset)
 *         if len(self.uid) > 0:             # <<<<<<<<<<<<<<
 *             out["uid"] = list(self.uid)
 *         if len(self.user_sid) > 0:
 */
  }

  /* "pyrosm_proto.pyx":5524
 *         if len(self.uid) > 0:
 *             out["uid"] = list(self.uid)
 *         if len(self.user_sid) > 0:             # <<<<<<<<<<<<<<
 *             out["user_sid"] = list(self.user_sid)
 *         if len(self.visible) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_user_sid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5525
 *             out["uid"] = list(self.uid)
 *         if len(self.user_sid) > 0:
 *             out["user_sid"] = list(self.user_sid)             # <<<<<<<<<<<<<<
 *         if len(self.visible) > 0:
 *             out["visible"] = list(self.visible)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_user_sid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_user_sid, __pyx_t_4) < 0)) __PYX_ERR(0, 5525, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":5524
 *         if len(self.uid) > 0:
 *             out["uid"] = list(self.uid)
 *         if len(self.user_sid) > 0:             # <<<<<<<<<<<<<<
 *             out["user_sid"] = list(self.user_sid)
 *         if len(self.visible) > 0:
 */
  }

  /* "pyrosm_proto.pyx":5526
 *         if len(self.user_sid) > 0:
 *             out["user_sid"] = list(self.user_sid)
 *         if len(self.visible) > 0:             # <<<<<<<<<<<<<<
 *             out["visible"] = list(self.visible)
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_visible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5527
 *             out["user_sid"] = list(self.user_sid)
 *         if len(self.visible) > 0:
 *             out["visible"] = list(self.visible)             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_visible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_visible, __pyx_t_1) < 0)) __PYX_ERR(0, 5527, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5526
 *         if len(self.user_sid) > 0:
 *             out["user_sid"] = list(self.user_sid)
 *         if len(self.visible) > 0:             # <<<<<<<<<<<<<<
 *             out["visible"] = list(self.visible)
 * 
 */
  }

  /* "pyrosm_proto.pyx":5529
 *             out["visible"] = list(self.visible)
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5508
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.SerializeToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5531
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_46SerializePartialToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_46SerializePartialToDict(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToDict", 0);

  /* "pyrosm_proto.pyx":5538
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if len(self.version) > 0:
 *             out["version"] = list(self.version)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5539
 *         """
 *         out = {}
 *         if len(self.version) > 0:             # <<<<<<<<<<<<<<
 *             out["version"] = list(self.version)
 *         if len(self.timestamp) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5540
 *         out = {}
 *         if len(self.version) > 0:
 *             out["version"] = list(self.version)             # <<<<<<<<<<<<<<
 *         if len(self.timestamp) > 0:
 *             out["timestamp"] = list(self.timestamp)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_version, __pyx_t_4) < 0)) __PYX_ERR(0, 5540, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":5539
 *         """
 *         out = {}
 *         if len(self.version) > 0:             # <<<<<<<<<<<<<<
 *             out["version"] = list(self.version)
 *         if len(self.timestamp) > 0:
 */
  }

  /* "pyrosm_proto.pyx":5541
 *         if len(self.version) > 0:
 *             out["version"] = list(self.version)
 *         if len(self.timestamp) > 0:             # <<<<<<<<<<<<<<
 *             out["timestamp"] = list(self.timestamp)
 *         if len(self.changeset) > 0:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5542
 *             out["version"] = list(self.version)
 *         if len(self.timestamp) > 0:
 *             out["timestamp"] = list(self.timestamp)             # <<<<<<<<<<<<<<
 *         if len(self.changeset) > 0:
 *             out["changeset"] = list(self.changeset)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_timestamp, __pyx_t_1) < 0)) __PYX_ERR(0, 5542, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5541
 *         if len(self.version) > 0:
 *             out["version"] = list(self.version)
 *         if len(self.timestamp) > 0:             # <<<<<<<<<<<<<<
 *             out["timestamp"] = list(self.timestamp)
 *         if len(self.changeset) > 0:
 */
  }

  /* "pyrosm_proto.pyx":5543
 *         if len(self.timestamp) > 0:
 *             out["timestamp"] = list(self.timestamp)
 *         if len(self.changeset) > 0:             # <<<<<<<<<<<<<<
 *             out["changeset"] = list(self.changeset)
 *         if len(self.uid) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_changeset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5544
 *             out["timestamp"] = list(self.timestamp)
 *         if len(self.changeset) > 0:
 *             out["changeset"] = list(self.changeset)             # <<<<<<<<<<<<<<
 *         if len(self.uid) > 0:
 *             out["uid"] = list(self.uid)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_changeset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_changeset, __pyx_t_4) < 0)) __PYX_ERR(0, 5544, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":5543
 *         if len(self.timestamp) > 0:
 *             out["timestamp"] = list(self.timestamp)
 *         if len(self.changeset) > 0:             # <<<<<<<<<<<<<<
 *             out["changeset"] = list(self.changeset)
 *         if len(self.uid) > 0:
 */
  }

  /* "pyrosm_proto.pyx":5545
 *         if len(self.changeset) > 0:
 *             out["changeset"] = list(self.changeset)
 *         if len(self.uid) > 0:             # <<<<<<<<<<<<<<
 *             out["uid"] = list(self.uid)
 *         if len(self.user_sid) > 0:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_uid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5545, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5546
 *             out["changeset"] = list(self.changeset)
 *         if len(self.uid) > 0:
 *             out["uid"] = list(self.uid)             # <<<<<<<<<<<<<<
 *         if len(self.user_sid) > 0:
 *             out["user_sid"] = list(self.user_sid)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_uid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_uid, __pyx_t_1) < 0)) __PYX_ERR(0, 5546, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5545
 *         if len(self.changeset) > 0:
 *             out["changeset"] = list(self.changeset)
 *         if len(self.uid) > 0:             # <<<<<<<<<<<<<<
 *             out["uid"] = list(self.uid)
 *         if len(self.user_sid) > 0:
 */
  }

  /* "pyrosm_proto.pyx":5547
 *         if len(self.uid) > 0:
 *             out["uid"] = list(self.uid)
 *         if len(self.user_sid) > 0:             # <<<<<<<<<<<<<<
 *             out["user_sid"] = list(self.user_sid)
 *         if len(self.visible) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_user_sid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5548
 *             out["uid"] = list(self.uid)
 *         if len(self.user_sid) > 0:
 *             out["user_sid"] = list(self.user_sid)             # <<<<<<<<<<<<<<
 *         if len(self.visible) > 0:
 *             out["visible"] = list(self.visible)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_user_sid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_user_sid, __pyx_t_4) < 0)) __PYX_ERR(0, 5548, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":5547
 *         if len(self.uid) > 0:
 *             out["uid"] = list(self.uid)
 *         if len(self.user_sid) > 0:             # <<<<<<<<<<<<<<
 *             out["user_sid"] = list(self.user_sid)
 *         if len(self.visible) > 0:
 */
  }

  /* "pyrosm_proto.pyx":5549
 *         if len(self.user_sid) > 0:
 *             out["user_sid"] = list(self.user_sid)
 *         if len(self.visible) > 0:             # <<<<<<<<<<<<<<
 *             out["visible"] = list(self.visible)
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_visible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5549, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":5550
 *             out["user_sid"] = list(self.user_sid)
 *         if len(self.visible) > 0:
 *             out["visible"] = list(self.visible)             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_visible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_visible, __pyx_t_1) < 0)) __PYX_ERR(0, 5550, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5549
 *         if len(self.user_sid) > 0:
 *             out["user_sid"] = list(self.user_sid)
 *         if len(self.visible) > 0:             # <<<<<<<<<<<<<<
 *             out["visible"] = list(self.visible)
 * 
 */
  }

  /* "pyrosm_proto.pyx":5552
 *             out["visible"] = list(self.visible)
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def Items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5531
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.SerializePartialToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_9DenseInfo_50generator32(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":5554
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_48Items[] = "\n        Iterator over the field names and values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_48Items(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_48Items(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_32_Items(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_32_Items, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 5554, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_9DenseInfo_50generator32, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Items, __pyx_n_s_DenseInfo_Items, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 5554, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_9DenseInfo_50generator32(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5554, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5561
 *             iterator
 *         """
 *         yield 'version', self.version             # <<<<<<<<<<<<<<
 *         yield 'timestamp', self.timestamp
 *         yield 'changeset', self.changeset
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_version);
  __Pyx_GIVEREF(__pyx_n_s_version);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_version);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5561, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5562
 *         """
 *         yield 'version', self.version
 *         yield 'timestamp', self.timestamp             # <<<<<<<<<<<<<<
 *         yield 'changeset', self.changeset
 *         yield 'uid', self.uid
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_timestamp);
  __Pyx_GIVEREF(__pyx_n_s_timestamp);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_timestamp);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5562, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5563
 *         yield 'version', self.version
 *         yield 'timestamp', self.timestamp
 *         yield 'changeset', self.changeset             # <<<<<<<<<<<<<<
 *         yield 'uid', self.uid
 *         yield 'user_sid', self.user_sid
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_changeset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_changeset);
  __Pyx_GIVEREF(__pyx_n_s_changeset);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_changeset);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5563, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5564
 *         yield 'timestamp', self.timestamp
 *         yield 'changeset', self.changeset
 *         yield 'uid', self.uid             # <<<<<<<<<<<<<<
 *         yield 'user_sid', self.user_sid
 *         yield 'visible', self.visible
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_uid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_uid);
  __Pyx_GIVEREF(__pyx_n_s_uid);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_uid);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5564, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5565
 *         yield 'changeset', self.changeset
 *         yield 'uid', self.uid
 *         yield 'user_sid', self.user_sid             # <<<<<<<<<<<<<<
 *         yield 'visible', self.visible
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_user_sid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_user_sid);
  __Pyx_GIVEREF(__pyx_n_s_user_sid);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_user_sid);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5565, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5566
 *         yield 'uid', self.uid
 *         yield 'user_sid', self.user_sid
 *         yield 'visible', self.visible             # <<<<<<<<<<<<<<
 * 
 *     def Fields(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_visible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_visible);
  __Pyx_GIVEREF(__pyx_n_s_visible);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_visible);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5566, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":5554
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_9DenseInfo_53generator33(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":5568
 *         yield 'visible', self.visible
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_51Fields[] = "\n        Iterator over the field names of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_51Fields(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_33_Fields(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_33_Fields, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 5568, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_9DenseInfo_53generator33, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Fields, __pyx_n_s_DenseInfo_Fields, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 5568, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_9DenseInfo_53generator33(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5568, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5575
 *             iterator
 *         """
 *         yield 'version'             # <<<<<<<<<<<<<<
 *         yield 'timestamp'
 *         yield 'changeset'
 */
  __Pyx_INCREF(__pyx_n_s_version);
  __pyx_r = __pyx_n_s_version;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5575, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5576
 *         """
 *         yield 'version'
 *         yield 'timestamp'             # <<<<<<<<<<<<<<
 *         yield 'changeset'
 *         yield 'uid'
 */
  __Pyx_INCREF(__pyx_n_s_timestamp);
  __pyx_r = __pyx_n_s_timestamp;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5576, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5577
 *         yield 'version'
 *         yield 'timestamp'
 *         yield 'changeset'             # <<<<<<<<<<<<<<
 *         yield 'uid'
 *         yield 'user_sid'
 */
  __Pyx_INCREF(__pyx_n_s_changeset);
  __pyx_r = __pyx_n_s_changeset;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5577, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5578
 *         yield 'timestamp'
 *         yield 'changeset'
 *         yield 'uid'             # <<<<<<<<<<<<<<
 *         yield 'user_sid'
 *         yield 'visible'
 */
  __Pyx_INCREF(__pyx_n_s_uid);
  __pyx_r = __pyx_n_s_uid;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5578, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5579
 *         yield 'changeset'
 *         yield 'uid'
 *         yield 'user_sid'             # <<<<<<<<<<<<<<
 *         yield 'visible'
 * 
 */
  __Pyx_INCREF(__pyx_n_s_user_sid);
  __pyx_r = __pyx_n_s_user_sid;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5579, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5580
 *         yield 'uid'
 *         yield 'user_sid'
 *         yield 'visible'             # <<<<<<<<<<<<<<
 * 
 *     def Values(self):
 */
  __Pyx_INCREF(__pyx_n_s_visible);
  __pyx_r = __pyx_n_s_visible;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5580, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":5568
 *         yield 'visible', self.visible
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_9DenseInfo_56generator34(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":5582
 *         yield 'visible'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_54Values[] = "\n        Iterator over the values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_54Values(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_54Values(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_34_Values(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_34_Values, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 5582, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_9DenseInfo_56generator34, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Values, __pyx_n_s_DenseInfo_Values, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 5582, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_9DenseInfo_56generator34(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5582, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5589
 *             iterator
 *         """
 *         yield self.version             # <<<<<<<<<<<<<<
 *         yield self.timestamp
 *         yield self.changeset
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5589, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5590
 *         """
 *         yield self.version
 *         yield self.timestamp             # <<<<<<<<<<<<<<
 *         yield self.changeset
 *         yield self.uid
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5590, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5591
 *         yield self.version
 *         yield self.timestamp
 *         yield self.changeset             # <<<<<<<<<<<<<<
 *         yield self.uid
 *         yield self.user_sid
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_changeset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5591, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5592
 *         yield self.timestamp
 *         yield self.changeset
 *         yield self.uid             # <<<<<<<<<<<<<<
 *         yield self.user_sid
 *         yield self.visible
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_uid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5592, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5593
 *         yield self.changeset
 *         yield self.uid
 *         yield self.user_sid             # <<<<<<<<<<<<<<
 *         yield self.visible
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_user_sid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5593, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5594
 *         yield self.uid
 *         yield self.user_sid
 *         yield self.visible             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_visible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5594, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":5582
 *         yield 'visible'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_9DenseInfo_59generator35(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":5598
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9DenseInfo_57Setters[] = "\n        Iterator over functions to set the fields in a message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_57Setters(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_57Setters(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_35_Setters(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_35_Setters, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 5598, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_9DenseInfo_59generator35, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Setters, __pyx_n_s_DenseInfo_Setters, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 5598, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.Setters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5605
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.version = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_9DenseInfo_7Setters_1setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_1setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":5606
 *         """
 *         def setter(value):
 *             self.version = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 5606, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_version, __pyx_v_value) < 0) __PYX_ERR(0, 5606, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5605
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.version = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5608
 *             self.version = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.timestamp = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_9DenseInfo_7Setters_3setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_3setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_2setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":5609
 *         yield setter
 *         def setter(value):
 *             self.timestamp = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 5609, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_timestamp, __pyx_v_value) < 0) __PYX_ERR(0, 5609, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5608
 *             self.version = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.timestamp = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5611
 *             self.timestamp = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.changeset = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_9DenseInfo_7Setters_5setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_5setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_4setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":5612
 *         yield setter
 *         def setter(value):
 *             self.changeset = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 5612, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_changeset, __pyx_v_value) < 0) __PYX_ERR(0, 5612, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5611
 *             self.timestamp = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.changeset = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5614
 *             self.changeset = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.uid = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_9DenseInfo_7Setters_7setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_7setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_6setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":5615
 *         yield setter
 *         def setter(value):
 *             self.uid = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 5615, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_uid, __pyx_v_value) < 0) __PYX_ERR(0, 5615, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5614
 *             self.changeset = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.uid = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5617
 *             self.uid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.user_sid = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_9DenseInfo_7Setters_9setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_9setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_8setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":5618
 *         yield setter
 *         def setter(value):
 *             self.user_sid = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 5618, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_user_sid, __pyx_v_value) < 0) __PYX_ERR(0, 5618, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5617
 *             self.uid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.user_sid = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5620
 *             self.user_sid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.visible = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_11setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_9DenseInfo_7Setters_11setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_11setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_7Setters_11setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_10setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_7Setters_10setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":5621
 *         yield setter
 *         def setter(value):
 *             self.visible = value             # <<<<<<<<<<<<<<
 *         yield setter
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 5621, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_visible, __pyx_v_value) < 0) __PYX_ERR(0, 5621, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5620
 *             self.user_sid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.visible = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5598
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

static PyObject *__pyx_gb_12pyrosm_proto_9DenseInfo_59generator35(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5598, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5605
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.version = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_9DenseInfo_7Setters_1setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_setter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5607
 *         def setter(value):
 *             self.version = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.timestamp = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5607, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5608
 *             self.version = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.timestamp = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_9DenseInfo_7Setters_3setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5610
 *         def setter(value):
 *             self.timestamp = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.changeset = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5610, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5611
 *             self.timestamp = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.changeset = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_9DenseInfo_7Setters_5setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5613
 *         def setter(value):
 *             self.changeset = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.uid = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5613, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5614
 *             self.changeset = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.uid = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_9DenseInfo_7Setters_7setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5616
 *         def setter(value):
 *             self.uid = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.user_sid = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5616, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5617
 *             self.uid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.user_sid = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_9DenseInfo_7Setters_9setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5619
 *         def setter(value):
 *             self.user_sid = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.visible = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5619, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5620
 *             self.user_sid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.visible = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_9DenseInfo_7Setters_11setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5622
 *         def setter(value):
 *             self.visible = value
 *         yield setter             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5622, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":5598
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

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

/* "pyrosm_proto.pxd":309
 *     cdef uint64_t __field_bitmap0
 * 
 *     cdef public bint _is_present_in_parent             # <<<<<<<<<<<<<<
 *     cdef bytes _cached_serialization
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_21_is_present_in_parent___get__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_present_in_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 309, __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("pyrosm_proto.DenseInfo._is_present_in_parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_9DenseInfo_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_9DenseInfo_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9DenseInfo_21_is_present_in_parent_2__set__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_9DenseInfo_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 309, __pyx_L1_error)
  __pyx_v_self->_is_present_in_parent = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo._is_present_in_parent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_61__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_61__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_12pyrosm_proto_9DenseInfo_60__reduce_cython__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__119, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_63__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9DenseInfo_63__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_12pyrosm_proto_9DenseInfo_62__setstate_cython__(((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_12pyrosm_proto_9DenseInfo_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__120, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.DenseInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5629
 * cdef class ChangeSet:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_9ChangeSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_9ChangeSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet___cinit__(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static int __pyx_pf_12pyrosm_proto_9ChangeSet___cinit__(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrosm_proto.pyx":5630
 * 
 *     def __cinit__(self):
 *         self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

  /* "pyrosm_proto.pyx":5629
 * cdef class ChangeSet:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

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

/* "pyrosm_proto.pyx":5634
 * 
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_9ChangeSet_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_9ChangeSet_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_2__init__(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self), __pyx_v_kwargs);

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

static int __pyx_pf_12pyrosm_proto_9ChangeSet_2__init__(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_field_name = NULL;
  PyObject *__pyx_v_field_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrosm_proto.pyx":5635
 * 
 *     def __init__(self, **kwargs):
 *         self.reset()             # <<<<<<<<<<<<<<
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5636
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5636, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":5637
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     setattr(self, field_name, field_value)
 */
    __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5637, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5637, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5637, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5637, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5637, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5637, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 5637, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 5637, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 5637, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 5637, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":5638
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "pyrosm_proto.pyx":5639
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     setattr(self, field_name, field_value)             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 */
          __pyx_t_13 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name, __pyx_v_field_value); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 5639, __pyx_L8_error)

          /* "pyrosm_proto.pyx":5638
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L15_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrosm_proto.pyx":5640
 *                 try:
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return
 */
        __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_14) {
          __Pyx_AddTraceback("pyrosm_proto.ChangeSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 5640, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_6);

          /* "pyrosm_proto.pyx":5641
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))             # <<<<<<<<<<<<<<
 *         return
 * 
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5641, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_field_name);
          __Pyx_GIVEREF(__pyx_v_field_name);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_field_name);
          __pyx_t_15 = __Pyx_PyString_Format(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5641, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5641, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 5641, __pyx_L10_except_error)
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;

        /* "pyrosm_proto.pyx":5638
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     setattr(self, field_name, field_value)
 *                 except AttributeError:
 */
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L15_try_end:;
      }

      /* "pyrosm_proto.pyx":5637
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     setattr(self, field_name, field_value)
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":5636
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  }

  /* "pyrosm_proto.pyx":5642
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5634
 * 
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XDECREF(__pyx_v_field_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5644
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'id',]
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_4__str__(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_4__str__(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_messages = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyrosm_proto.pyx":5645
 * 
 *     def __str__(self):
 *         fields = [             # <<<<<<<<<<<<<<
 *                           'id',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_id);
  __pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5647
 *         fields = [
 *                           'id',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]             # <<<<<<<<<<<<<<
 *         messages = []
 *         for message in messages:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5647, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5647, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5647, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 5647, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5648
 *                           'id',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []             # <<<<<<<<<<<<<<
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_messages = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5649
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  __pyx_t_1 = __pyx_v_messages; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5649, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":5650
 *         messages = []
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))             # <<<<<<<<<<<<<<
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 5650, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":5651
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    __pyx_t_4 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5651, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5651, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 5651, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5651, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 5651, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5651, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 5651, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":5652
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))             # <<<<<<<<<<<<<<
 *             components.append('}')
 *         return '\n'.join(components)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_line);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 5652, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":5651
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":5653
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 *             components.append('}')             # <<<<<<<<<<<<<<
 *         return '\n'.join(components)
 * 
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_kp_s__2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 5653, __pyx_L1_error)

    /* "pyrosm_proto.pyx":5649
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = []
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5654
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 *         return '\n'.join(components)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5644
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'id',]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_messages);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5656
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_9ChangeSet_reset(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9ChangeSet_7reset)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5656, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5659
 *         # reset values and populate defaults
 * 
 *         self.__field_bitmap0 = 0             # <<<<<<<<<<<<<<
 * 
 *         self._id = 0
 */
  __pyx_v_self->__pyx___field_bitmap0 = 0;

  /* "pyrosm_proto.pyx":5661
 *         self.__field_bitmap0 = 0
 * 
 *         self._id = 0             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_v_self->_id = 0;

  /* "pyrosm_proto.pyx":5662
 * 
 *         self._id = 0
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5656
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

  /* 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_WriteUnraisable("pyrosm_proto.ChangeSet.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_7reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_6reset(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_6reset(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_9ChangeSet_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5656, __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("pyrosm_proto.ChangeSet.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5666
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._id
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_2id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_2id___get__(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_2id___get__(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":5667
 *     @property
 *     def id(self):
 *         return self._id             # <<<<<<<<<<<<<<
 * 
 *     @id.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5666
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._id
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5670
 * 
 *     @id.setter
 *     def id(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         self._id = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_9ChangeSet_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_9ChangeSet_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_2id_2__set__(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_9ChangeSet_2id_2__set__(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":5671
 *     @id.setter
 *     def id(self, value):
 *         self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *         self._id = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

  /* "pyrosm_proto.pyx":5672
 *     def id(self, value):
 *         self.__field_bitmap0 |= 1
 *         self._id = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5672, __pyx_L1_error)
  __pyx_v_self->_id = __pyx_t_1;

  /* "pyrosm_proto.pyx":5673
 *         self.__field_bitmap0 |= 1
 *         self._id = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5670
 * 
 *     @id.setter
 *     def id(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         self._id = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5676
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

static int __pyx_f_12pyrosm_proto_9ChangeSet__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, CYTHON_UNUSED int __pyx_v_cache) {
  int __pyx_v_current_offset;
  int64_t __pyx_v_key;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("_protobuf_deserialize", 0);

  /* "pyrosm_proto.pyx":5677
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):
 *         cdef int current_offset = 0             # <<<<<<<<<<<<<<
 *         cdef int64_t key
 *         while current_offset < size:
 */
  __pyx_v_current_offset = 0;

  /* "pyrosm_proto.pyx":5679
 *         cdef int current_offset = 0
 *         cdef int64_t key
 *         while current_offset < size:             # <<<<<<<<<<<<<<
 *             key = get_varint64(memory, &current_offset)
 *             # id
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_current_offset < __pyx_v_size) != 0);
    if (!__pyx_t_1) break;

    /* "pyrosm_proto.pyx":5680
 *         cdef int64_t key
 *         while current_offset < size:
 *             key = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # id
 *             if key == 8:
 */
    __pyx_v_key = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

    /* "pyrosm_proto.pyx":5682
 *             key = get_varint64(memory, &current_offset)
 *             # id
 *             if key == 8:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 self._id = get_varint64(memory, &current_offset)
 */
    __pyx_t_1 = ((__pyx_v_key == 8) != 0);
    if (__pyx_t_1) {

      /* "pyrosm_proto.pyx":5683
 *             # id
 *             if key == 8:
 *                 self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *                 self._id = get_varint64(memory, &current_offset)
 *             # Unknown field - need to skip proper number of bytes
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

      /* "pyrosm_proto.pyx":5684
 *             if key == 8:
 *                 self.__field_bitmap0 |= 1
 *                 self._id = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 */
      __pyx_v_self->_id = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":5682
 *             key = get_varint64(memory, &current_offset)
 *             # id
 *             if key == 8:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 self._id = get_varint64(memory, &current_offset)
 */
      goto __pyx_L5;
    }

    /* "pyrosm_proto.pyx":5687
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)             # <<<<<<<<<<<<<<
 * 
 *         self._is_present_in_parent = True
 */
    /*else*/ {
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        if (unlikely(!(__pyx_f_12pyrobuf_util_skip_generic(__pyx_v_memory, (&__pyx_v_current_offset), __pyx_v_size, (__pyx_v_key & 0x7)) != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 5687, __pyx_L1_error)
        }
      }
      #endif
    }
    __pyx_L5:;
  }

  /* "pyrosm_proto.pyx":5689
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)
 * 
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 * 
 *         return current_offset
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":5691
 *         self._is_present_in_parent = True
 * 
 *         return current_offset             # <<<<<<<<<<<<<<
 * 
 *     cpdef void Clear(self):
 */
  __pyx_r = __pyx_v_current_offset;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5676
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pyrosm_proto.ChangeSet._protobuf_deserialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5693
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_9Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_9ChangeSet_Clear(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5693, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9ChangeSet_9Clear)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5693, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5695
 *     cpdef void Clear(self):
 *         """Clears all data that was set in the message."""
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5696
 *         """Clears all data that was set in the message."""
 *         self.reset()
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void ClearField(self, field_name):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5693
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.ChangeSet.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_9Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_8Clear[] = "Clears all data that was set in the message.";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_9Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Clear (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_8Clear(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_8Clear(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_9ChangeSet_Clear(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5693, __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("pyrosm_proto.ChangeSet.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5698
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':
 */

static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_11ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static void __pyx_f_12pyrosm_proto_9ChangeSet_ClearField(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("ClearField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ClearField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9ChangeSet_11ClearField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5698, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5700
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_id, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5700, __pyx_L1_error)
  if (likely(__pyx_t_5)) {

    /* "pyrosm_proto.pyx":5701
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':
 *             self.__field_bitmap0 &= ~1             # <<<<<<<<<<<<<<
 *             self._id = 0
 *         else:
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~1));

    /* "pyrosm_proto.pyx":5702
 *         if field_name == 'id':
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 */
    __pyx_v_self->_id = 0;

    /* "pyrosm_proto.pyx":5700
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":5704
 *             self._id = 0
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 5704, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":5706
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void CopyFrom(self, ChangeSet other_msg):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5698
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.ChangeSet.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_11ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_10ClearField[] = "Clears the contents of a given field.";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_11ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ClearField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_10ClearField(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_10ClearField(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ClearField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_9ChangeSet_ClearField(__pyx_v_self, __pyx_v_field_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5698, __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("pyrosm_proto.ChangeSet.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5708
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, ChangeSet other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_13CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_9ChangeSet_CopyFrom(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CopyFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9ChangeSet_13CopyFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5708, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5715
 *             other_msg (ChangeSet): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":5716
 *         """
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 *         self.reset()
 *         self.MergeFrom(other_msg)
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":5715
 *             other_msg (ChangeSet): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  }

  /* "pyrosm_proto.pyx":5717
 *         if self is other_msg:
 *             return
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self.MergeFrom(other_msg)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5718
 *             return
 *         self.reset()
 *         self.MergeFrom(other_msg)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint HasField(self, field_name) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->MergeFrom(__pyx_v_self, __pyx_v_other_msg, 0);

  /* "pyrosm_proto.pyx":5708
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, ChangeSet other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.ChangeSet.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_13CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_12CopyFrom[] = "\n        Copies the content of the specified message into the current message.\n\n        Params:\n            other_msg (ChangeSet): Message to copy into the current one.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_13CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CopyFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_ChangeSet, 1, "other_msg", 0))) __PYX_ERR(0, 5708, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_12CopyFrom(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_12CopyFrom(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_9ChangeSet_CopyFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5708, __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("pyrosm_proto.ChangeSet.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5720
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_15HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static int __pyx_f_12pyrosm_proto_9ChangeSet_HasField(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("HasField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_HasField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9ChangeSet_15HasField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5720, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5720, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5727
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_id, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5727, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":5728
 *         """
 *         if field_name == 'id':
 *             return self.__field_bitmap0 & 1 == 1             # <<<<<<<<<<<<<<
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":5727
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  }

  /* "pyrosm_proto.pyx":5729
 *         if field_name == 'id':
 *             return self.__field_bitmap0 & 1 == 1
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint IsInitialized(self):
 */
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_singular, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 5729, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5720
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

  /* 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("pyrosm_proto.ChangeSet.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_15HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_14HasField[] = "\n        Checks if a certain field is set for the message.\n\n        Params:\n            field_name (str): The name of the field to check.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_15HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_14HasField(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_14HasField(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("HasField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_9ChangeSet_HasField(__pyx_v_self, __pyx_v_field_name, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5720, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5731
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_17IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_12pyrosm_proto_9ChangeSet_IsInitialized(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_IsInitialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5731, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9ChangeSet_17IsInitialized)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5731, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5731, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5741
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  __pyx_t_5 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":5742
 * 
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         return True
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":5741
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  }

  /* "pyrosm_proto.pyx":5744
 *             return False
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef void MergeFrom(self, ChangeSet other_msg):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5731
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

  /* 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_WriteUnraisable("pyrosm_proto.ChangeSet.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_17IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_16IsInitialized[] = "\n        Checks if the message is initialized.\n\n        Returns:\n            bool: True if the message is initialized (i.e. all of its required\n                fields are set).\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_17IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsInitialized (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_16IsInitialized(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_16IsInitialized(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_12pyrosm_proto_9ChangeSet_IsInitialized(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5731, __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("pyrosm_proto.ChangeSet.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5746
 *         return True
 * 
 *     cpdef void MergeFrom(self, ChangeSet other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_19MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_9ChangeSet_MergeFrom(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int64_t __pyx_t_7;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5746, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9ChangeSet_19MergeFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5746, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5754
 *         """
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":5755
 * 
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":5754
 *         """
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "pyrosm_proto.pyx":5758
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._id = other_msg._id
 *             self.__field_bitmap0 |= 1
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":5759
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._id = other_msg._id             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 1
 * 
 */
    __pyx_t_7 = __pyx_v_other_msg->_id;
    __pyx_v_self->_id = __pyx_t_7;

    /* "pyrosm_proto.pyx":5760
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._id = other_msg._id
 *             self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

    /* "pyrosm_proto.pyx":5758
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._id = other_msg._id
 *             self.__field_bitmap0 |= 1
 */
  }

  /* "pyrosm_proto.pyx":5762
 *             self.__field_bitmap0 |= 1
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5746
 *         return True
 * 
 *     cpdef void MergeFrom(self, ChangeSet other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.ChangeSet.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_19MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_18MergeFrom[] = "\n        Merges the contents of the specified message into the current message.\n\n        Params:\n            other_msg: Message to merge into the current message.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_19MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_ChangeSet, 1, "other_msg", 0))) __PYX_ERR(0, 5746, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_18MergeFrom(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_18MergeFrom(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_9ChangeSet_MergeFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5746, __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("pyrosm_proto.ChangeSet.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5764
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_21MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_9ChangeSet_MergeFromString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_MergeFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  unsigned char const *__pyx_t_10;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9ChangeSet_21MergeFromString)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5764, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5764, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5764, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5764, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5764, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5778
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, False)
 */
  __pyx_t_7 = (__pyx_v_size != Py_None);
  if ((__pyx_t_7 != 0)) {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5778, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_8;
  } else {
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5778, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_9;
  }
  __pyx_v_length = __pyx_t_5;

  /* "pyrosm_proto.pyx":5780
 *         length = size if size is not None else len(data)
 * 
 *         buf = self._protobuf_deserialize(data, length, False)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_10 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 5780, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_10, __pyx_v_length, 0);

  /* "pyrosm_proto.pyx":5782
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  __pyx_t_7 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "pyrosm_proto.pyx":5783
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_GIVEREF(__pyx_v_size);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_size);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Truncated_message_got_s_expected, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5783, __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, 5783, __pyx_L1_error)

    /* "pyrosm_proto.pyx":5782
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  }

  /* "pyrosm_proto.pyx":5785
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5787
 *         self._Modified()
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5764
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_21MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_20MergeFromString[] = "\n        Merges serialized protocol buffer data into this message.\n\n        Params:\n            data (bytes): a string of binary data.\n            size (int): optional - the length of the data string\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_21MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "MergeFromString") < 0)) __PYX_ERR(0, 5764, __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_data = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MergeFromString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5764, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_20MergeFromString(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self), __pyx_v_data, __pyx_v_size);

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_20MergeFromString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_MergeFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_ChangeSet->MergeFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5764, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5789
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_23ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_9ChangeSet_ParseFromString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_ParseFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_reset = ((int)1);
  int __pyx_v_cache = ((int)0);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  unsigned char const *__pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_reset = __pyx_optional_args->reset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cache = __pyx_optional_args->cache;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9ChangeSet_23ParseFromString)) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5789, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5789, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5789, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5789, __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(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5789, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_size);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 3+__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, 5789, __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, 5789, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5805
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         if reset:
 */
  __pyx_t_9 = (__pyx_v_size != Py_None);
  if ((__pyx_t_9 != 0)) {
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5805, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5805, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_11;
  }
  __pyx_v_length = __pyx_t_7;

  /* "pyrosm_proto.pyx":5807
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_9 = (__pyx_v_reset != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":5808
 * 
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":5807
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":5810
 *             self.reset()
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_12 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 5810, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_12, __pyx_v_length, __pyx_v_cache);

  /* "pyrosm_proto.pyx":5812
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  __pyx_t_9 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "pyrosm_proto.pyx":5813
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message")             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s_Truncated_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Truncated_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5813, __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, 5813, __pyx_L1_error)

    /* "pyrosm_proto.pyx":5812
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  }

  /* "pyrosm_proto.pyx":5815
 *             raise DecodeError("Truncated message")
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5817
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  __pyx_t_9 = (__pyx_v_cache != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":5818
 * 
 *         if cache:
 *             self._cached_serialization = data             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) __PYX_ERR(0, 5818, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5817
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  }

  /* "pyrosm_proto.pyx":5820
 *             self._cached_serialization = data
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5789
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_23ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_22ParseFromString[] = "\n        Populate the message class from a string of protobuf encoded binary data.\n\n        Params:\n            data (bytes): a string of binary data\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n            cache (bool): optional - whether to cache serialized data\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_23ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_v_reset;
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,&__pyx_n_s_cache,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromString") < 0)) __PYX_ERR(0, 5789, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    if (values[2]) {
      __pyx_v_reset = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5789, __pyx_L3_error)
    } else {
      __pyx_v_reset = ((int)1);
    }
    if (values[3]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5789, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromString", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5789, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_22ParseFromString(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset, __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_22ParseFromString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_ParseFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.reset = __pyx_v_reset;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_ChangeSet->ParseFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5789, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5823
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_25FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_25FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FromString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_24FromString(((PyTypeObject*)__pyx_v_cls), ((PyObject *)__pyx_v_s));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_24FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("FromString", 0);

  /* "pyrosm_proto.pyx":5824
 *     @classmethod
 *     def FromString(cls, s):
 *         message = cls()             # <<<<<<<<<<<<<<
 *         message.MergeFromString(s)
 *         return message
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5825
 *     def FromString(cls, s):
 *         message = cls()
 *         message.MergeFromString(s)             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5825, __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;

  /* "pyrosm_proto.pyx":5826
 *         message = cls()
 *         message.MergeFromString(s)
 *         return message             # <<<<<<<<<<<<<<
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5823
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.FromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5828
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         # id
 *         if self.__field_bitmap0 & 1 == 1:
 */

static void __pyx_f_12pyrosm_proto_9ChangeSet__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_buf, CYTHON_UNUSED int __pyx_v_cache) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("_protobuf_serialize", 0);

  /* "pyrosm_proto.pyx":5830
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 *         # id
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(8, buf)
 *             set_varint64(self._id, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":5831
 *         # id
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(8, buf)             # <<<<<<<<<<<<<<
 *             set_varint64(self._id, buf)
 * 
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(8, __pyx_v_buf));

    /* "pyrosm_proto.pyx":5832
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(8, buf)
 *             set_varint64(self._id, buf)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void _Modified(self):
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_v_self->_id, __pyx_v_buf));

    /* "pyrosm_proto.pyx":5830
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 *         # id
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(8, buf)
 *             set_varint64(self._id, buf)
 */
  }

  /* "pyrosm_proto.pyx":5828
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         # id
 *         if self.__field_bitmap0 & 1 == 1:
 */

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

/* "pyrosm_proto.pyx":5834
 *             set_varint64(self._id, buf)
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_27_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_9ChangeSet__Modified(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Modified); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9ChangeSet_27_Modified)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5834, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5835
 * 
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":5836
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()             # <<<<<<<<<<<<<<
 *         self._cached_serialization = None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_listener), __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5836, __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;

  /* "pyrosm_proto.pyx":5837
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
  __Pyx_DECREF(__pyx_v_self->_cached_serialization);
  __pyx_v_self->_cached_serialization = ((PyObject*)Py_None);

  /* "pyrosm_proto.pyx":5834
 *             set_varint64(self._id, buf)
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.ChangeSet._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_27_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_27_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_Modified (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_26_Modified(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_26_Modified(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_9ChangeSet__Modified(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5834, __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("pyrosm_proto.ChangeSet._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5839
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_29SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_9ChangeSet_SerializeToString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_SerializeToString *__pyx_optional_args) {
  int __pyx_v_cache = ((int)0);
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_out = 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;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cache = __pyx_optional_args->cache;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5839, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9ChangeSet_29SerializeToString)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5839, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5839, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 5839, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5848
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 * 
 */
  __pyx_t_6 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":5849
 * 
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5849, __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, 5849, __pyx_L1_error)

    /* "pyrosm_proto.pyx":5848
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 * 
 */
  }

  /* "pyrosm_proto.pyx":5851
 *             raise Exception("required field 'id' not initialized and does not have default")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_6 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":5852
 * 
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":5851
 *             raise Exception("required field 'id' not initialized and does not have default")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":5854
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5855
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)             # <<<<<<<<<<<<<<
 *         cdef bytes out = bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, __pyx_v_cache);

  /* "pyrosm_proto.pyx":5856
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5858
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  __pyx_t_7 = (__pyx_v_cache != 0);
  if (__pyx_t_7) {

    /* "pyrosm_proto.pyx":5859
 * 
 *         if cache:
 *             self._cached_serialization = out             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = __pyx_v_out;

    /* "pyrosm_proto.pyx":5858
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  }

  /* "pyrosm_proto.pyx":5861
 *             self._cached_serialization = out
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializePartialToString(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5839
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.ChangeSet.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_29SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_28SerializeToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_29SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cache,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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SerializeToString") < 0)) __PYX_ERR(0, 5839, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5839, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("SerializeToString", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5839, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_28SerializeToString(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self), __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_28SerializeToString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_SerializeToString __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_ChangeSet->SerializeToString(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5839, __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("pyrosm_proto.ChangeSet.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5863
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_31SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_9ChangeSet_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_buf = 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;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_9ChangeSet_31SerializePartialToString)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5863, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 5863, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":5870
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_5 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":5871
 *         """
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":5870
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":5873
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5874
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)             # <<<<<<<<<<<<<<
 *         return bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, 0);

  /* "pyrosm_proto.pyx":5875
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *     def SetInParent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5863
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.ChangeSet.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_31SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_30SerializePartialToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_31SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_30SerializePartialToString(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_30SerializePartialToString(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_9ChangeSet_SerializePartialToString(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5863, __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("pyrosm_proto.ChangeSet.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5877
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_33SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_32SetInParent[] = "\n        Mark this an present in the parent.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_33SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_32SetInParent(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_32SetInParent(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent", 0);

  /* "pyrosm_proto.pyx":5881
 *         Mark this an present in the parent.
 *         """
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5877
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5883
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_35ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_34ParseFromJson[] = "\n        Populate the message class from a json string.\n\n        Params:\n            data (str): a json string\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_35ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromJson (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromJson") < 0)) __PYX_ERR(0, 5883, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    __pyx_v_reset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromJson", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5883, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_34ParseFromJson(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_34ParseFromJson(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("ParseFromJson", 0);
  __Pyx_INCREF(__pyx_v_size);

  /* "pyrosm_proto.pyx":5892
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":5893
 *         """
 *         if size is None:
 *             size = len(data)             # <<<<<<<<<<<<<<
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5893, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":5892
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  }

  /* "pyrosm_proto.pyx":5894
 *         if size is None:
 *             size = len(data)
 *         d = json.loads(data[:size])             # <<<<<<<<<<<<<<
 *         self.ParseFromDict(d, reset)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_json); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_d = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":5895
 *             size = len(data)
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToJson(self, **kwargs):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5895, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5895, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5895, __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_d);
    __Pyx_GIVEREF(__pyx_v_d);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_d);
    __Pyx_INCREF(__pyx_v_reset);
    __Pyx_GIVEREF(__pyx_v_reset);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_reset);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":5883
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5897
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_37SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_36SerializeToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_37SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializeToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializeToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_36SerializeToJson(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_36SerializeToJson(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializeToJson", 0);

  /* "pyrosm_proto.pyx":5904
 *             str: a json formatted string
 *         """
 *         d = self.SerializeToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5905
 *         """
 *         d = self.SerializeToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToJson(self, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5897
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.SerializeToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5907
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_39SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_38SerializePartialToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_39SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializePartialToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializePartialToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_38SerializePartialToJson(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_38SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToJson", 0);

  /* "pyrosm_proto.pyx":5914
 *             str: a json formatted string
 *         """
 *         d = self.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5915
 *         """
 *         d = self.SerializePartialToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromDict(self, d, reset=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5907
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.SerializePartialToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5917
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_41ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_40ParseFromDict[] = "\n        Populate the message class from a Python dictionary.\n\n        Params:\n            d (dict): a Python dictionary representing the message\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_41ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,&__pyx_n_s_reset,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 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_reset);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromDict") < 0)) __PYX_ERR(0, 5917, __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_d = values[0];
    __pyx_v_reset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromDict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5917, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_40ParseFromDict(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self), __pyx_v_d, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_40ParseFromDict(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset) {
  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;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("ParseFromDict", 0);

  /* "pyrosm_proto.pyx":5925
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reset); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5925, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":5926
 *         """
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         assert type(d) == dict
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":5925
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":5928
 *             self.reset()
 * 
 *         assert type(d) == dict             # <<<<<<<<<<<<<<
 *         try:
 *             self.id = d["id"]
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_d)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5928, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5928, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 5928, __pyx_L1_error)
    }
  }
  #endif

  /* "pyrosm_proto.pyx":5929
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.id = d["id"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":5930
 *         assert type(d) == dict
 *         try:
 *             self.id = d["id"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5930, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id, __pyx_t_2) < 0) __PYX_ERR(0, 5930, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":5929
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.id = d["id"]
 *         except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":5931
 *         try:
 *             self.id = d["id"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":5929
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.id = d["id"]
 *         except KeyError:
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":5934
 *             pass
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":5935
 * 
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 * 
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrosm_proto.pyx":5936
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")             # <<<<<<<<<<<<<<
 * 
 *         return
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 5936, __pyx_L1_error)

    /* "pyrosm_proto.pyx":5935
 * 
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 * 
 */
  }

  /* "pyrosm_proto.pyx":5938
 *             raise Exception("required field 'id' not initialized and does not have default")
 * 
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5917
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5940
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_43SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_42SerializeToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_43SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_42SerializeToDict(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_42SerializeToDict(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToDict", 0);

  /* "pyrosm_proto.pyx":5947
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5948
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":5949
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5949, __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, 5949, __pyx_L1_error)

    /* "pyrosm_proto.pyx":5948
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 */
  }

  /* "pyrosm_proto.pyx":5950
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 * 
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":5951
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_id, __pyx_t_1) < 0)) __PYX_ERR(0, 5951, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5950
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 * 
 */
  }

  /* "pyrosm_proto.pyx":5953
 *             out["id"] = self.id
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5940
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.SerializeToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5955
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_45SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_44SerializePartialToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_45SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_44SerializePartialToDict(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_44SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializePartialToDict", 0);

  /* "pyrosm_proto.pyx":5962
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":5963
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 * 
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":5964
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_id, __pyx_t_1) < 0)) __PYX_ERR(0, 5964, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":5963
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 * 
 */
  }

  /* "pyrosm_proto.pyx":5966
 *             out["id"] = self.id
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def Items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":5955
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.SerializePartialToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_9ChangeSet_48generator36(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":5968
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_47Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_46Items[] = "\n        Iterator over the field names and values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_47Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_46Items(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_46Items(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_36_Items(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_36_Items, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 5968, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_9ChangeSet_48generator36, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Items, __pyx_n_s_ChangeSet_Items, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 5968, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_9ChangeSet_48generator36(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5968, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5975
 *             iterator
 *         """
 *         yield 'id', self.id             # <<<<<<<<<<<<<<
 * 
 *     def Fields(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_id);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5975, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":5968
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_9ChangeSet_51generator37(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":5977
 *         yield 'id', self.id
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_50Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_49Fields[] = "\n        Iterator over the field names of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_50Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_49Fields(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_49Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_37_Fields(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_37_Fields, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 5977, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_9ChangeSet_51generator37, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Fields, __pyx_n_s_ChangeSet_Fields, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 5977, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_9ChangeSet_51generator37(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5977, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5984
 *             iterator
 *         """
 *         yield 'id'             # <<<<<<<<<<<<<<
 * 
 *     def Values(self):
 */
  __Pyx_INCREF(__pyx_n_s_id);
  __pyx_r = __pyx_n_s_id;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5984, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":5977
 *         yield 'id', self.id
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_9ChangeSet_54generator38(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":5986
 *         yield 'id'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_53Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_52Values[] = "\n        Iterator over the values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_53Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_52Values(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_52Values(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_38_Values(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_38_Values, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 5986, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_9ChangeSet_54generator38, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Values, __pyx_n_s_ChangeSet_Values, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 5986, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_9ChangeSet_54generator38(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5986, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5993
 *             iterator
 *         """
 *         yield self.id             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5993, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":5986
 *         yield 'id'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_9ChangeSet_57generator39(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":5997
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_56Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_9ChangeSet_55Setters[] = "\n        Iterator over functions to set the fields in a message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_56Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_55Setters(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_55Setters(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_39_Setters(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_39_Setters, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 5997, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_9ChangeSet_57generator39, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Setters, __pyx_n_s_ChangeSet_Setters, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 5997, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.Setters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6004
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_9ChangeSet_7Setters_1setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_7Setters_1setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_7Setters_setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":6005
 *         """
 *         def setter(value):
 *             self.id = value             # <<<<<<<<<<<<<<
 *         yield setter
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 6005, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_id, __pyx_v_value) < 0) __PYX_ERR(0, 6005, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6004
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":5997
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

static PyObject *__pyx_gb_12pyrosm_proto_9ChangeSet_57generator39(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 5997, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6004
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_9ChangeSet_7Setters_1setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_setter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6006
 *         def setter(value):
 *             self.id = value
 *         yield setter             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6006, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":5997
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

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

/* "pyrosm_proto.pxd":341
 *     cdef uint64_t __field_bitmap0
 * 
 *     cdef public bint _is_present_in_parent             # <<<<<<<<<<<<<<
 *     cdef bytes _cached_serialization
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_21_is_present_in_parent___get__(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_present_in_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 341, __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("pyrosm_proto.ChangeSet._is_present_in_parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_9ChangeSet_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_9ChangeSet_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_9ChangeSet_21_is_present_in_parent_2__set__(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_9ChangeSet_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 341, __pyx_L1_error)
  __pyx_v_self->_is_present_in_parent = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet._is_present_in_parent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_59__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_59__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_12pyrosm_proto_9ChangeSet_58__reduce_cython__(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_58__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_61__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_9ChangeSet_61__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_12pyrosm_proto_9ChangeSet_60__setstate_cython__(((struct __pyx_obj_12pyrosm_proto_ChangeSet *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_12pyrosm_proto_9ChangeSet_60__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_ChangeSet *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__125, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.ChangeSet.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6013
 * cdef class Node:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Node_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Node_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node___cinit__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static int __pyx_pf_12pyrosm_proto_4Node___cinit__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrosm_proto.pyx":6014
 * 
 *     def __cinit__(self):
 *         self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

  /* "pyrosm_proto.pyx":6013
 * cdef class Node:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

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

/* "pyrosm_proto.pyx":6016
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._keys is not None:
 */

/* Python wrapper */
static void __pyx_pw_12pyrosm_proto_4Node_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrosm_proto_4Node_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrosm_proto_4Node_2__dealloc__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static void __pyx_pf_12pyrosm_proto_4Node_2__dealloc__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrosm_proto.pyx":6018
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         if self._vals is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_keys) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6019
 *         # Remove any references to self from child messages or repeated fields
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6018
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         if self._vals is not None:
 */
  }

  /* "pyrosm_proto.pyx":6020
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         if self._info is not None:
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_vals) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":6021
 *             self._keys._listener = <PyObject *>null_listener
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6020
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         if self._info is not None:
 */
  }

  /* "pyrosm_proto.pyx":6022
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6023
 *             self._vals._listener = <PyObject *>null_listener
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, **kwargs):
 */
    __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6022
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 * 
 */
  }

  /* "pyrosm_proto.pyx":6016
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._keys is not None:
 */

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

/* "pyrosm_proto.pyx":6025
 *             self._info._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Node_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Node_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_4__init__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), __pyx_v_kwargs);

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

static int __pyx_pf_12pyrosm_proto_4Node_4__init__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_field_name = NULL;
  PyObject *__pyx_v_field_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrosm_proto.pyx":6026
 * 
 *     def __init__(self, **kwargs):
 *         self.reset()             # <<<<<<<<<<<<<<
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6027
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 6027, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":6028
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('info',):
 */
    __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6028, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 6028, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6028, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 6028, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6028, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 6028, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 6028, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6028, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6028, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6028, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 6028, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 6028, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":6029
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "pyrosm_proto.pyx":6030
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('info',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('keys','vals',):
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_info, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 6030, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_13 = (__pyx_t_1 != 0);
          if (__pyx_t_13) {

            /* "pyrosm_proto.pyx":6031
 *                 try:
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)             # <<<<<<<<<<<<<<
 *                     elif field_name in ('keys','vals',):
 *                         getattr(self, field_name).extend(field_value)
 */
            __pyx_t_7 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6031, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6031, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_7 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_7)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6031, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":6030
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('info',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('keys','vals',):
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":6032
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('keys','vals',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_keys, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 6032, __pyx_L8_error)
          if (!__pyx_t_1) {
          } else {
            __pyx_t_13 = __pyx_t_1;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_vals, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 6032, __pyx_L8_error)
          __pyx_t_13 = __pyx_t_1;
          __pyx_L17_bool_binop_done:;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_1 = (__pyx_t_13 != 0);
          if (__pyx_t_1) {

            /* "pyrosm_proto.pyx":6033
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('keys','vals',):
 *                         getattr(self, field_name).extend(field_value)             # <<<<<<<<<<<<<<
 *                     else:
 *                         setattr(self, field_name, field_value)
 */
            __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6033, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_extend); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6033, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
              __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
              if (likely(__pyx_t_6)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_7, function);
              }
            }
            __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6033, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":6032
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('keys','vals',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":6035
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 *                         setattr(self, field_name, field_value)             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 */
          /*else*/ {
            __pyx_t_14 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name, __pyx_v_field_value); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6035, __pyx_L8_error)
          }
          __pyx_L16:;

          /* "pyrosm_proto.pyx":6029
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L15_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrosm_proto.pyx":6036
 *                     else:
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return
 */
        __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_15) {
          __Pyx_AddTraceback("pyrosm_proto.Node.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 6036, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_6);

          /* "pyrosm_proto.pyx":6037
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))             # <<<<<<<<<<<<<<
 *         return
 * 
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6037, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_field_name);
          __Pyx_GIVEREF(__pyx_v_field_name);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_field_name);
          __pyx_t_16 = __Pyx_PyString_Format(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 6037, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6037, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 6037, __pyx_L10_except_error)
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;

        /* "pyrosm_proto.pyx":6029
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L15_try_end:;
      }

      /* "pyrosm_proto.pyx":6028
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('info',):
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":6027
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  }

  /* "pyrosm_proto.pyx":6038
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6025
 *             self._info._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("pyrosm_proto.Node.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XDECREF(__pyx_v_field_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6040
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'id',
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Node_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_6__str__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_6__str__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_messages = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyrosm_proto.pyx":6041
 * 
 *     def __str__(self):
 *         fields = [             # <<<<<<<<<<<<<<
 *                           'id',
 *                           'keys',
 */
  __pyx_t_1 = PyList_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_id);
  __Pyx_INCREF(__pyx_n_s_keys);
  __Pyx_GIVEREF(__pyx_n_s_keys);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_keys);
  __Pyx_INCREF(__pyx_n_s_vals);
  __Pyx_GIVEREF(__pyx_n_s_vals);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_vals);
  __Pyx_INCREF(__pyx_n_s_lat);
  __Pyx_GIVEREF(__pyx_n_s_lat);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_lat);
  __Pyx_INCREF(__pyx_n_s_lon);
  __Pyx_GIVEREF(__pyx_n_s_lon);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_lon);
  __pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6047
 *                           'lat',
 *                           'lon',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]             # <<<<<<<<<<<<<<
 *         messages = [
 *                             'info',]
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 6047, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6047, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6047, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 6047, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6048
 *                           'lon',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = [             # <<<<<<<<<<<<<<
 *                             'info',]
 *         for message in messages:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_info);
  __Pyx_GIVEREF(__pyx_n_s_info);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_info);
  __pyx_v_messages = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6050
 *         messages = [
 *                             'info',]
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  __pyx_t_1 = __pyx_v_messages; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 6050, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":6051
 *                             'info',]
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))             # <<<<<<<<<<<<<<
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 6051, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":6052
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    __pyx_t_4 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6052, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 6052, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 6052, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6052, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 6052, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6052, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 6052, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":6053
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))             # <<<<<<<<<<<<<<
 *             components.append('}')
 *         return '\n'.join(components)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6053, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_line);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6053, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 6053, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":6052
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":6054
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 *             components.append('}')             # <<<<<<<<<<<<<<
 *         return '\n'.join(components)
 * 
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_kp_s__2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 6054, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6050
 *         messages = [
 *                             'info',]
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6055
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 *         return '\n'.join(components)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6040
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'id',
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.Node.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_messages);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6057
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Node_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_4Node_reset(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("reset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6057, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Node_9reset)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6057, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":6060
 *         # reset values and populate defaults
 * 
 *         self.__field_bitmap0 = 0             # <<<<<<<<<<<<<<
 * 
 *         self._id = 0
 */
  __pyx_v_self->__pyx___field_bitmap0 = 0;

  /* "pyrosm_proto.pyx":6062
 *         self.__field_bitmap0 = 0
 * 
 *         self._id = 0             # <<<<<<<<<<<<<<
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_id = 0;

  /* "pyrosm_proto.pyx":6063
 * 
 *         self._id = 0
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         self._keys = Uint32List.__new__(Uint32List)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_keys) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":6064
 *         self._id = 0
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._keys = Uint32List.__new__(Uint32List)
 *         self._keys._listener = <PyObject *>self
 */
    __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6063
 * 
 *         self._id = 0
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         self._keys = Uint32List.__new__(Uint32List)
 */
  }

  /* "pyrosm_proto.pyx":6065
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 *         self._keys = Uint32List.__new__(Uint32List)             # <<<<<<<<<<<<<<
 *         self._keys._listener = <PyObject *>self
 *         if self._vals is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Uint32List)))) __PYX_ERR(0, 6065, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_keys);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys));
  __pyx_v_self->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6066
 *             self._keys._listener = <PyObject *>null_listener
 *         self._keys = Uint32List.__new__(Uint32List)
 *         self._keys._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":6067
 *         self._keys = Uint32List.__new__(Uint32List)
 *         self._keys._listener = <PyObject *>self
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         self._vals = Uint32List.__new__(Uint32List)
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_vals) != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6068
 *         self._keys._listener = <PyObject *>self
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._vals = Uint32List.__new__(Uint32List)
 *         self._vals._listener = <PyObject *>self
 */
    __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6067
 *         self._keys = Uint32List.__new__(Uint32List)
 *         self._keys._listener = <PyObject *>self
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         self._vals = Uint32List.__new__(Uint32List)
 */
  }

  /* "pyrosm_proto.pyx":6069
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 *         self._vals = Uint32List.__new__(Uint32List)             # <<<<<<<<<<<<<<
 *         self._vals._listener = <PyObject *>self
 *         if self._info is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Uint32List)))) __PYX_ERR(0, 6069, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_vals);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_vals));
  __pyx_v_self->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6070
 *             self._vals._listener = <PyObject *>null_listener
 *         self._vals = Uint32List.__new__(Uint32List)
 *         self._vals._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":6071
 *         self._vals = Uint32List.__new__(Uint32List)
 *         self._vals._listener = <PyObject *>self
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = None
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":6072
 *         self._vals._listener = <PyObject *>self
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._info = None
 *         self._lat = 0
 */
    __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6071
 *         self._vals = Uint32List.__new__(Uint32List)
 *         self._vals._listener = <PyObject *>self
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = None
 */
  }

  /* "pyrosm_proto.pyx":6073
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = None             # <<<<<<<<<<<<<<
 *         self._lat = 0
 *         self._lon = 0
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_info);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
  __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)Py_None);

  /* "pyrosm_proto.pyx":6074
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = None
 *         self._lat = 0             # <<<<<<<<<<<<<<
 *         self._lon = 0
 *         return
 */
  __pyx_v_self->_lat = 0;

  /* "pyrosm_proto.pyx":6075
 *         self._info = None
 *         self._lat = 0
 *         self._lon = 0             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_v_self->_lon = 0;

  /* "pyrosm_proto.pyx":6076
 *         self._lat = 0
 *         self._lon = 0
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6057
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

  /* 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_WriteUnraisable("pyrosm_proto.Node.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Node_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_8reset(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_8reset(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Node_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6057, __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("pyrosm_proto.Node.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6080
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._id
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Node_2id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_2id___get__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_2id___get__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":6081
 *     @property
 *     def id(self):
 *         return self._id             # <<<<<<<<<<<<<<
 * 
 *     @id.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6080
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._id
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Node.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6084
 * 
 *     @id.setter
 *     def id(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         self._id = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Node_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Node_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_2id_2__set__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Node_2id_2__set__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":6085
 *     @id.setter
 *     def id(self, value):
 *         self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *         self._id = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

  /* "pyrosm_proto.pyx":6086
 *     def id(self, value):
 *         self.__field_bitmap0 |= 1
 *         self._id = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6086, __pyx_L1_error)
  __pyx_v_self->_id = __pyx_t_1;

  /* "pyrosm_proto.pyx":6087
 *         self.__field_bitmap0 |= 1
 *         self._id = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6084
 * 
 *     @id.setter
 *     def id(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         self._id = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6090
 * 
 *     @property
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self._keys
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_4keys_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Node_4keys_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_4keys___get__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_4keys___get__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":6091
 *     @property
 *     def keys(self):
 *         return self._keys             # <<<<<<<<<<<<<<
 * 
 *     @keys.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_keys));
  __pyx_r = ((PyObject *)__pyx_v_self->_keys);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6090
 * 
 *     @property
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self._keys
 * 
 */

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

/* "pyrosm_proto.pyx":6094
 * 
 *     @keys.setter
 *     def keys(self, value):             # <<<<<<<<<<<<<<
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Node_4keys_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Node_4keys_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_4keys_2__set__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Node_4keys_2__set__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  uint32_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":6095
 *     @keys.setter
 *     def keys(self, value):
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_keys) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6096
 *     def keys(self, value):
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6095
 *     @keys.setter
 *     def keys(self, value):
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":6098
 *             self._keys._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":6099
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":6100
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint32_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 6100, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":6101
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":6099
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":6102
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":6099
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":6105
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._keys = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6106
 *         cdef int i
 *         if memview_available == 1:
 *             self._keys = Uint32List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._keys.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6106, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 6106, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_keys);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys));
    __pyx_v_self->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":6107
 *         if memview_available == 1:
 *             self._keys = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._keys.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6107, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6107, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":6108
 *             self._keys = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._keys.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._keys = Uint32List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6108, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 6108, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_keys->__pyx_vtab)->append(__pyx_v_self->_keys, (*((uint32_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6108, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":6109
 *             for i in range(memview.size):
 *                 self._keys.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._keys = Uint32List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6105
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._keys = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":6110
 *                 self._keys.append(memview[i])
 *             return
 *         self._keys = Uint32List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._keys.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 6110, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_keys);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys));
  __pyx_v_self->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":6111
 *             return
 *         self._keys = Uint32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._keys.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 6111, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 6111, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6111, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 6111, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6111, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 6111, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":6112
 *         self._keys = Uint32List(listener=self)
 *         for val in value:
 *             self._keys.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_uint32_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6112, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_keys->__pyx_vtab)->append(__pyx_v_self->_keys, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":6111
 *             return
 *         self._keys = Uint32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._keys.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":6113
 *         for val in value:
 *             self._keys.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6094
 * 
 *     @keys.setter
 *     def keys(self, value):             # <<<<<<<<<<<<<<
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.Node.keys.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6116
 * 
 *     @property
 *     def vals(self):             # <<<<<<<<<<<<<<
 *         return self._vals
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_4vals_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Node_4vals_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_4vals___get__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_4vals___get__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":6117
 *     @property
 *     def vals(self):
 *         return self._vals             # <<<<<<<<<<<<<<
 * 
 *     @vals.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_vals));
  __pyx_r = ((PyObject *)__pyx_v_self->_vals);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6116
 * 
 *     @property
 *     def vals(self):             # <<<<<<<<<<<<<<
 *         return self._vals
 * 
 */

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

/* "pyrosm_proto.pyx":6120
 * 
 *     @vals.setter
 *     def vals(self, value):             # <<<<<<<<<<<<<<
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Node_4vals_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Node_4vals_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_4vals_2__set__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Node_4vals_2__set__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  uint32_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":6121
 *     @vals.setter
 *     def vals(self, value):
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_vals) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6122
 *     def vals(self, value):
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6121
 *     @vals.setter
 *     def vals(self, value):
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":6124
 *             self._vals._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":6125
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":6126
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint32_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 6126, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":6127
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":6125
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":6128
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":6125
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":6131
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._vals = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6132
 *         cdef int i
 *         if memview_available == 1:
 *             self._vals = Uint32List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._vals.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6132, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 6132, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_vals);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_vals));
    __pyx_v_self->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":6133
 *         if memview_available == 1:
 *             self._vals = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._vals.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6133, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6133, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":6134
 *             self._vals = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._vals.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._vals = Uint32List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6134, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 6134, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_vals->__pyx_vtab)->append(__pyx_v_self->_vals, (*((uint32_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":6135
 *             for i in range(memview.size):
 *                 self._vals.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._vals = Uint32List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6131
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._vals = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":6136
 *                 self._vals.append(memview[i])
 *             return
 *         self._vals = Uint32List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._vals.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 6136, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_vals);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_vals));
  __pyx_v_self->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":6137
 *             return
 *         self._vals = Uint32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._vals.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 6137, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 6137, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6137, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 6137, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6137, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 6137, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":6138
 *         self._vals = Uint32List(listener=self)
 *         for val in value:
 *             self._vals.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_uint32_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6138, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_vals->__pyx_vtab)->append(__pyx_v_self->_vals, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":6137
 *             return
 *         self._vals = Uint32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._vals.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":6139
 *         for val in value:
 *             self._vals.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6120
 * 
 *     @vals.setter
 *     def vals(self, value):             # <<<<<<<<<<<<<<
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.Node.vals.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6142
 * 
 *     @property
 *     def info(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._info is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_4info_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Node_4info_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_4info___get__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_4info___get__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":6144
 *     def info(self):
 *         # lazy init sub messages
 *         if self._info is None:             # <<<<<<<<<<<<<<
 *             self._info = Info.__new__(Info)
 *             self._info.reset()
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_info) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6145
 *         # lazy init sub messages
 *         if self._info is None:
 *             self._info = Info.__new__(Info)             # <<<<<<<<<<<<<<
 *             self._info.reset()
 *             self._info._listener = <PyObject *>self
 */
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_Info(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6145, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __Pyx_GOTREF(__pyx_v_self->_info);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
    __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":6146
 *         if self._info is None:
 *             self._info = Info.__new__(Info)
 *             self._info.reset()             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>self
 *         return self._info
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->reset(__pyx_v_self->_info, 0);

    /* "pyrosm_proto.pyx":6147
 *             self._info = Info.__new__(Info)
 *             self._info.reset()
 *             self._info._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return self._info
 * 
 */
    __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":6144
 *     def info(self):
 *         # lazy init sub messages
 *         if self._info is None:             # <<<<<<<<<<<<<<
 *             self._info = Info.__new__(Info)
 *             self._info.reset()
 */
  }

  /* "pyrosm_proto.pyx":6148
 *             self._info.reset()
 *             self._info._listener = <PyObject *>self
 *         return self._info             # <<<<<<<<<<<<<<
 * 
 *     @info.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_info));
  __pyx_r = ((PyObject *)__pyx_v_self->_info);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6142
 * 
 *     @property
 *     def info(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._info is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Node.info.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6151
 * 
 *     @info.setter
 *     def info(self, value):             # <<<<<<<<<<<<<<
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Node_4info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Node_4info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_4info_2__set__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Node_4info_2__set__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":6152
 *     @info.setter
 *     def info(self, value):
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = value
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6153
 *     def info(self, value):
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._info = value
 *         self._info._listener = <PyObject *>self
 */
    __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6152
 *     @info.setter
 *     def info(self, value):
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = value
 */
  }

  /* "pyrosm_proto.pyx":6154
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = value             # <<<<<<<<<<<<<<
 *         self._info._listener = <PyObject *>self
 *         self._Modified()
 */
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_12pyrosm_proto_Info))))) __PYX_ERR(0, 6154, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_info);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
  __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":6155
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = value
 *         self._info._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":6156
 *         self._info = value
 *         self._info._listener = <PyObject *>self
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6151
 * 
 *     @info.setter
 *     def info(self, value):             # <<<<<<<<<<<<<<
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Node.info.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6159
 * 
 *     @property
 *     def lat(self):             # <<<<<<<<<<<<<<
 *         return self._lat
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_3lat_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Node_3lat_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_3lat___get__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_3lat___get__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":6160
 *     @property
 *     def lat(self):
 *         return self._lat             # <<<<<<<<<<<<<<
 * 
 *     @lat.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_lat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6159
 * 
 *     @property
 *     def lat(self):             # <<<<<<<<<<<<<<
 *         return self._lat
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Node.lat.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6163
 * 
 *     @lat.setter
 *     def lat(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 128
 *         self._lat = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Node_3lat_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Node_3lat_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_3lat_2__set__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Node_3lat_2__set__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":6164
 *     @lat.setter
 *     def lat(self, value):
 *         self.__field_bitmap0 |= 128             # <<<<<<<<<<<<<<
 *         self._lat = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x80);

  /* "pyrosm_proto.pyx":6165
 *     def lat(self, value):
 *         self.__field_bitmap0 |= 128
 *         self._lat = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6165, __pyx_L1_error)
  __pyx_v_self->_lat = __pyx_t_1;

  /* "pyrosm_proto.pyx":6166
 *         self.__field_bitmap0 |= 128
 *         self._lat = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6163
 * 
 *     @lat.setter
 *     def lat(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 128
 *         self._lat = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.lat.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6169
 * 
 *     @property
 *     def lon(self):             # <<<<<<<<<<<<<<
 *         return self._lon
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_3lon_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Node_3lon_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_3lon___get__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_3lon___get__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":6170
 *     @property
 *     def lon(self):
 *         return self._lon             # <<<<<<<<<<<<<<
 * 
 *     @lon.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_lon); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6169
 * 
 *     @property
 *     def lon(self):             # <<<<<<<<<<<<<<
 *         return self._lon
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Node.lon.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6173
 * 
 *     @lon.setter
 *     def lon(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 256
 *         self._lon = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Node_3lon_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Node_3lon_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_3lon_2__set__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Node_3lon_2__set__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":6174
 *     @lon.setter
 *     def lon(self, value):
 *         self.__field_bitmap0 |= 256             # <<<<<<<<<<<<<<
 *         self._lon = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x100);

  /* "pyrosm_proto.pyx":6175
 *     def lon(self, value):
 *         self.__field_bitmap0 |= 256
 *         self._lon = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6175, __pyx_L1_error)
  __pyx_v_self->_lon = __pyx_t_1;

  /* "pyrosm_proto.pyx":6176
 *         self.__field_bitmap0 |= 256
 *         self._lon = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6173
 * 
 *     @lon.setter
 *     def lon(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 256
 *         self._lon = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.lon.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6179
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

static int __pyx_f_12pyrosm_proto_4Node__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, int __pyx_v_cache) {
  int __pyx_v_current_offset;
  int64_t __pyx_v_key;
  int64_t __pyx_v_field_size;
  int64_t __pyx_v_keys_marker;
  uint32_t __pyx_v_keys_elt;
  int64_t __pyx_v_vals_marker;
  uint32_t __pyx_v_vals_elt;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_protobuf_deserialize", 0);

  /* "pyrosm_proto.pyx":6180
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):
 *         cdef int current_offset = 0             # <<<<<<<<<<<<<<
 *         cdef int64_t key
 *         cdef int64_t field_size
 */
  __pyx_v_current_offset = 0;

  /* "pyrosm_proto.pyx":6187
 *         cdef int64_t vals_marker
 *         cdef uint32_t vals_elt
 *         while current_offset < size:             # <<<<<<<<<<<<<<
 *             key = get_varint64(memory, &current_offset)
 *             # id
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_current_offset < __pyx_v_size) != 0);
    if (!__pyx_t_1) break;

    /* "pyrosm_proto.pyx":6188
 *         cdef uint32_t vals_elt
 *         while current_offset < size:
 *             key = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # id
 *             if key == 8:
 */
    __pyx_v_key = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

    /* "pyrosm_proto.pyx":6190
 *             key = get_varint64(memory, &current_offset)
 *             # id
 *             if key == 8:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 self._id = get_signed_varint64(memory, &current_offset)
 */
    switch (__pyx_v_key) {
      case 8:

      /* "pyrosm_proto.pyx":6191
 *             # id
 *             if key == 8:
 *                 self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *                 self._id = get_signed_varint64(memory, &current_offset)
 *             # keys
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

      /* "pyrosm_proto.pyx":6192
 *             if key == 8:
 *                 self.__field_bitmap0 |= 1
 *                 self._id = get_signed_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # keys
 *             elif key == 18:
 */
      __pyx_v_self->_id = __pyx_f_12pyrobuf_util_get_signed_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":6190
 *             key = get_varint64(memory, &current_offset)
 *             # id
 *             if key == 8:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 self._id = get_signed_varint64(memory, &current_offset)
 */
      break;
      case 18:

      /* "pyrosm_proto.pyx":6195
 *             # keys
 *             elif key == 18:
 *                 keys_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 keys_marker += current_offset
 * 
 */
      __pyx_v_keys_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":6196
 *             elif key == 18:
 *                 keys_marker = get_varint64(memory, &current_offset)
 *                 keys_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>keys_marker:
 */
      __pyx_v_keys_marker = (__pyx_v_keys_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":6198
 *                 keys_marker += current_offset
 * 
 *                 while current_offset < <int>keys_marker:             # <<<<<<<<<<<<<<
 *                     keys_elt = get_varint32(memory, &current_offset)
 *                     self._keys._append(keys_elt)
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_current_offset < ((int)__pyx_v_keys_marker)) != 0);
        if (!__pyx_t_1) break;

        /* "pyrosm_proto.pyx":6199
 * 
 *                 while current_offset < <int>keys_marker:
 *                     keys_elt = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._keys._append(keys_elt)
 *             # vals
 */
        __pyx_v_keys_elt = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":6200
 *                 while current_offset < <int>keys_marker:
 *                     keys_elt = get_varint32(memory, &current_offset)
 *                     self._keys._append(keys_elt)             # <<<<<<<<<<<<<<
 *             # vals
 *             elif key == 26:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_keys->__pyx_vtab)->_append(__pyx_v_self->_keys, __pyx_v_keys_elt);
      }

      /* "pyrosm_proto.pyx":6194
 *                 self._id = get_signed_varint64(memory, &current_offset)
 *             # keys
 *             elif key == 18:             # <<<<<<<<<<<<<<
 *                 keys_marker = get_varint64(memory, &current_offset)
 *                 keys_marker += current_offset
 */
      break;
      case 26:

      /* "pyrosm_proto.pyx":6203
 *             # vals
 *             elif key == 26:
 *                 vals_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 vals_marker += current_offset
 * 
 */
      __pyx_v_vals_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":6204
 *             elif key == 26:
 *                 vals_marker = get_varint64(memory, &current_offset)
 *                 vals_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>vals_marker:
 */
      __pyx_v_vals_marker = (__pyx_v_vals_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":6206
 *                 vals_marker += current_offset
 * 
 *                 while current_offset < <int>vals_marker:             # <<<<<<<<<<<<<<
 *                     vals_elt = get_varint32(memory, &current_offset)
 *                     self._vals._append(vals_elt)
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_current_offset < ((int)__pyx_v_vals_marker)) != 0);
        if (!__pyx_t_1) break;

        /* "pyrosm_proto.pyx":6207
 * 
 *                 while current_offset < <int>vals_marker:
 *                     vals_elt = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._vals._append(vals_elt)
 *             # info
 */
        __pyx_v_vals_elt = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":6208
 *                 while current_offset < <int>vals_marker:
 *                     vals_elt = get_varint32(memory, &current_offset)
 *                     self._vals._append(vals_elt)             # <<<<<<<<<<<<<<
 *             # info
 *             elif key == 34:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_vals->__pyx_vtab)->_append(__pyx_v_self->_vals, __pyx_v_vals_elt);
      }

      /* "pyrosm_proto.pyx":6202
 *                     self._keys._append(keys_elt)
 *             # vals
 *             elif key == 26:             # <<<<<<<<<<<<<<
 *                 vals_marker = get_varint64(memory, &current_offset)
 *                 vals_marker += current_offset
 */
      break;
      case 34:

      /* "pyrosm_proto.pyx":6211
 *             # info
 *             elif key == 34:
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 if self._info is None:
 *                     self._info = Info.__new__(Info)
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":6212
 *             elif key == 34:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._info is None:             # <<<<<<<<<<<<<<
 *                     self._info = Info.__new__(Info)
 *                     self._info._listener = <PyObject *>self
 */
      __pyx_t_1 = (((PyObject *)__pyx_v_self->_info) == Py_None);
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "pyrosm_proto.pyx":6213
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._info is None:
 *                     self._info = Info.__new__(Info)             # <<<<<<<<<<<<<<
 *                     self._info._listener = <PyObject *>self
 *                 self._info.reset()
 */
        __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_Info(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6213, __pyx_L1_error)
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
        __Pyx_GOTREF(__pyx_v_self->_info);
        __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
        __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyrosm_proto.pyx":6214
 *                 if self._info is None:
 *                     self._info = Info.__new__(Info)
 *                     self._info._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *                 self._info.reset()
 *                 if cache:
 */
        __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_self);

        /* "pyrosm_proto.pyx":6212
 *             elif key == 34:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._info is None:             # <<<<<<<<<<<<<<
 *                     self._info = Info.__new__(Info)
 *                     self._info._listener = <PyObject *>self
 */
      }

      /* "pyrosm_proto.pyx":6215
 *                     self._info = Info.__new__(Info)
 *                     self._info._listener = <PyObject *>self
 *                 self._info.reset()             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     self._info._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->reset(__pyx_v_self->_info, 0);

      /* "pyrosm_proto.pyx":6216
 *                     self._info._listener = <PyObject *>self
 *                 self._info.reset()
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._info._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._info._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      __pyx_t_2 = (__pyx_v_cache != 0);
      if (__pyx_t_2) {

        /* "pyrosm_proto.pyx":6217
 *                 self._info.reset()
 *                 if cache:
 *                     self._info._cached_serialization = bytes(memory[current_offset:current_offset+field_size])             # <<<<<<<<<<<<<<
 *                 current_offset += self._info._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *             # lat
 */
        __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6217, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6217, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_self->_info->_cached_serialization);
        __Pyx_DECREF(__pyx_v_self->_info->_cached_serialization);
        __pyx_v_self->_info->_cached_serialization = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyrosm_proto.pyx":6216
 *                     self._info._listener = <PyObject *>self
 *                 self._info.reset()
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._info._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._info._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      }

      /* "pyrosm_proto.pyx":6218
 *                 if cache:
 *                     self._info._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._info._protobuf_deserialize(memory+current_offset, <int>field_size, cache)             # <<<<<<<<<<<<<<
 *             # lat
 *             elif key == 64:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self->_info, (__pyx_v_memory + __pyx_v_current_offset), ((int)__pyx_v_field_size), __pyx_v_cache));

      /* "pyrosm_proto.pyx":6210
 *                     self._vals._append(vals_elt)
 *             # info
 *             elif key == 34:             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._info is None:
 */
      break;
      case 64:

      /* "pyrosm_proto.pyx":6221
 *             # lat
 *             elif key == 64:
 *                 self.__field_bitmap0 |= 128             # <<<<<<<<<<<<<<
 *                 self._lat = get_signed_varint64(memory, &current_offset)
 *             # lon
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x80);

      /* "pyrosm_proto.pyx":6222
 *             elif key == 64:
 *                 self.__field_bitmap0 |= 128
 *                 self._lat = get_signed_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # lon
 *             elif key == 72:
 */
      __pyx_v_self->_lat = __pyx_f_12pyrobuf_util_get_signed_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":6220
 *                 current_offset += self._info._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *             # lat
 *             elif key == 64:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 128
 *                 self._lat = get_signed_varint64(memory, &current_offset)
 */
      break;
      case 72:

      /* "pyrosm_proto.pyx":6225
 *             # lon
 *             elif key == 72:
 *                 self.__field_bitmap0 |= 256             # <<<<<<<<<<<<<<
 *                 self._lon = get_signed_varint64(memory, &current_offset)
 *             # Unknown field - need to skip proper number of bytes
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x100);

      /* "pyrosm_proto.pyx":6226
 *             elif key == 72:
 *                 self.__field_bitmap0 |= 256
 *                 self._lon = get_signed_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 */
      __pyx_v_self->_lon = __pyx_f_12pyrobuf_util_get_signed_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":6224
 *                 self._lat = get_signed_varint64(memory, &current_offset)
 *             # lon
 *             elif key == 72:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 256
 *                 self._lon = get_signed_varint64(memory, &current_offset)
 */
      break;
      default:

      /* "pyrosm_proto.pyx":6229
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)             # <<<<<<<<<<<<<<
 * 
 *         self._is_present_in_parent = True
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        if (unlikely(!(__pyx_f_12pyrobuf_util_skip_generic(__pyx_v_memory, (&__pyx_v_current_offset), __pyx_v_size, (__pyx_v_key & 0x7)) != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 6229, __pyx_L1_error)
        }
      }
      #endif
      break;
    }
  }

  /* "pyrosm_proto.pyx":6231
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)
 * 
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 * 
 *         return current_offset
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":6233
 *         self._is_present_in_parent = True
 * 
 *         return current_offset             # <<<<<<<<<<<<<<
 * 
 *     cpdef void Clear(self):
 */
  __pyx_r = __pyx_v_current_offset;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6179
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pyrosm_proto.Node._protobuf_deserialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6235
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Node_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_4Node_Clear(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Node_11Clear)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6235, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":6237
 *     cpdef void Clear(self):
 *         """Clears all data that was set in the message."""
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6238
 *         """Clears all data that was set in the message."""
 *         self.reset()
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void ClearField(self, field_name):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6235
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Node.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_10Clear[] = "Clears all data that was set in the message.";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Clear (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_10Clear(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_10Clear(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Node_Clear(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6235, __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("pyrosm_proto.Node.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6240
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Node_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static void __pyx_f_12pyrosm_proto_4Node_ClearField(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("ClearField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ClearField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Node_13ClearField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":6242
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_id, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 6242, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6243
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':
 *             self.__field_bitmap0 &= ~1             # <<<<<<<<<<<<<<
 *             self._id = 0
 *         elif field_name == 'keys':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~1));

    /* "pyrosm_proto.pyx":6244
 *         if field_name == 'id':
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0             # <<<<<<<<<<<<<<
 *         elif field_name == 'keys':
 *             self._keys._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_id = 0;

    /* "pyrosm_proto.pyx":6242
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":6245
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0
 *         elif field_name == 'keys':             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *             self._keys = Uint32List.__new__(Uint32List)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_keys, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 6245, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6246
 *             self._id = 0
 *         elif field_name == 'keys':
 *             self._keys._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._keys = Uint32List.__new__(Uint32List)
 *             self._keys._listener = <PyObject *>self
 */
    __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6247
 *         elif field_name == 'keys':
 *             self._keys._listener = <PyObject *>null_listener
 *             self._keys = Uint32List.__new__(Uint32List)             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>self
 *         elif field_name == 'vals':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Uint32List)))) __PYX_ERR(0, 6247, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_keys);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys));
    __pyx_v_self->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":6248
 *             self._keys._listener = <PyObject *>null_listener
 *             self._keys = Uint32List.__new__(Uint32List)
 *             self._keys._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'vals':
 *             self._vals._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":6245
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0
 *         elif field_name == 'keys':             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *             self._keys = Uint32List.__new__(Uint32List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":6249
 *             self._keys = Uint32List.__new__(Uint32List)
 *             self._keys._listener = <PyObject *>self
 *         elif field_name == 'vals':             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *             self._vals = Uint32List.__new__(Uint32List)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_vals, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 6249, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6250
 *             self._keys._listener = <PyObject *>self
 *         elif field_name == 'vals':
 *             self._vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._vals = Uint32List.__new__(Uint32List)
 *             self._vals._listener = <PyObject *>self
 */
    __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6251
 *         elif field_name == 'vals':
 *             self._vals._listener = <PyObject *>null_listener
 *             self._vals = Uint32List.__new__(Uint32List)             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>self
 *         elif field_name == 'info':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Uint32List)))) __PYX_ERR(0, 6251, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_vals);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_vals));
    __pyx_v_self->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":6252
 *             self._vals._listener = <PyObject *>null_listener
 *             self._vals = Uint32List.__new__(Uint32List)
 *             self._vals._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'info':
 *             if self._info is not None:
 */
    __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":6249
 *             self._keys = Uint32List.__new__(Uint32List)
 *             self._keys._listener = <PyObject *>self
 *         elif field_name == 'vals':             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *             self._vals = Uint32List.__new__(Uint32List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":6253
 *             self._vals = Uint32List.__new__(Uint32List)
 *             self._vals._listener = <PyObject *>self
 *         elif field_name == 'info':             # <<<<<<<<<<<<<<
 *             if self._info is not None:
 *                 self._info._listener = <PyObject *>null_listener
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_info, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 6253, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6254
 *             self._vals._listener = <PyObject *>self
 *         elif field_name == 'info':
 *             if self._info is not None:             # <<<<<<<<<<<<<<
 *                 self._info._listener = <PyObject *>null_listener
 *             self._info = None
 */
    __pyx_t_5 = (((PyObject *)__pyx_v_self->_info) != Py_None);
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "pyrosm_proto.pyx":6255
 *         elif field_name == 'info':
 *             if self._info is not None:
 *                 self._info._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._info = None
 *         elif field_name == 'lat':
 */
      __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

      /* "pyrosm_proto.pyx":6254
 *             self._vals._listener = <PyObject *>self
 *         elif field_name == 'info':
 *             if self._info is not None:             # <<<<<<<<<<<<<<
 *                 self._info._listener = <PyObject *>null_listener
 *             self._info = None
 */
    }

    /* "pyrosm_proto.pyx":6256
 *             if self._info is not None:
 *                 self._info._listener = <PyObject *>null_listener
 *             self._info = None             # <<<<<<<<<<<<<<
 *         elif field_name == 'lat':
 *             self.__field_bitmap0 &= ~128
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->_info);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
    __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)Py_None);

    /* "pyrosm_proto.pyx":6253
 *             self._vals = Uint32List.__new__(Uint32List)
 *             self._vals._listener = <PyObject *>self
 *         elif field_name == 'info':             # <<<<<<<<<<<<<<
 *             if self._info is not None:
 *                 self._info._listener = <PyObject *>null_listener
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":6257
 *                 self._info._listener = <PyObject *>null_listener
 *             self._info = None
 *         elif field_name == 'lat':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~128
 *             self._lat = 0
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_lat, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 6257, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":6258
 *             self._info = None
 *         elif field_name == 'lat':
 *             self.__field_bitmap0 &= ~128             # <<<<<<<<<<<<<<
 *             self._lat = 0
 *         elif field_name == 'lon':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~0x80));

    /* "pyrosm_proto.pyx":6259
 *         elif field_name == 'lat':
 *             self.__field_bitmap0 &= ~128
 *             self._lat = 0             # <<<<<<<<<<<<<<
 *         elif field_name == 'lon':
 *             self.__field_bitmap0 &= ~256
 */
    __pyx_v_self->_lat = 0;

    /* "pyrosm_proto.pyx":6257
 *                 self._info._listener = <PyObject *>null_listener
 *             self._info = None
 *         elif field_name == 'lat':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~128
 *             self._lat = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":6260
 *             self.__field_bitmap0 &= ~128
 *             self._lat = 0
 *         elif field_name == 'lon':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~256
 *             self._lon = 0
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_lon, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 6260, __pyx_L1_error)
  if (likely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":6261
 *             self._lat = 0
 *         elif field_name == 'lon':
 *             self.__field_bitmap0 &= ~256             # <<<<<<<<<<<<<<
 *             self._lon = 0
 *         else:
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~0x100));

    /* "pyrosm_proto.pyx":6262
 *         elif field_name == 'lon':
 *             self.__field_bitmap0 &= ~256
 *             self._lon = 0             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 */
    __pyx_v_self->_lon = 0;

    /* "pyrosm_proto.pyx":6260
 *             self.__field_bitmap0 &= ~128
 *             self._lat = 0
 *         elif field_name == 'lon':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~256
 *             self._lon = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":6264
 *             self._lon = 0
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 6264, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":6266
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void CopyFrom(self, Node other_msg):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6240
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Node.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_12ClearField[] = "Clears the contents of a given field.";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ClearField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_12ClearField(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_12ClearField(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ClearField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Node_ClearField(__pyx_v_self, __pyx_v_field_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6240, __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("pyrosm_proto.Node.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6268
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, Node other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Node_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_4Node_CopyFrom(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CopyFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Node_15CopyFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6268, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":6275
 *             other_msg (Node): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":6276
 *         """
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 *         self.reset()
 *         self.MergeFrom(other_msg)
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6275
 *             other_msg (Node): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  }

  /* "pyrosm_proto.pyx":6277
 *         if self is other_msg:
 *             return
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self.MergeFrom(other_msg)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6278
 *             return
 *         self.reset()
 *         self.MergeFrom(other_msg)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint HasField(self, field_name) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->MergeFrom(__pyx_v_self, __pyx_v_other_msg, 0);

  /* "pyrosm_proto.pyx":6268
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, Node other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Node.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_14CopyFrom[] = "\n        Copies the content of the specified message into the current message.\n\n        Params:\n            other_msg (Node): Message to copy into the current one.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CopyFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_Node, 1, "other_msg", 0))) __PYX_ERR(0, 6268, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_14CopyFrom(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_14CopyFrom(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Node_CopyFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6268, __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("pyrosm_proto.Node.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6280
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Node_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static int __pyx_f_12pyrosm_proto_4Node_HasField(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("HasField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_HasField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6280, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Node_17HasField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6280, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6280, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":6287
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'info':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_id, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 6287, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6288
 *         """
 *         if field_name == 'id':
 *             return self.__field_bitmap0 & 1 == 1             # <<<<<<<<<<<<<<
 *         if field_name == 'info':
 *             return self._info is not None and self._info._is_present_in_parent
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6287
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'info':
 */
  }

  /* "pyrosm_proto.pyx":6289
 *         if field_name == 'id':
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'info':             # <<<<<<<<<<<<<<
 *             return self._info is not None and self._info._is_present_in_parent
 *         if field_name == 'lat':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_info, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 6289, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6290
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'info':
 *             return self._info is not None and self._info._is_present_in_parent             # <<<<<<<<<<<<<<
 *         if field_name == 'lat':
 *             return self.__field_bitmap0 & 128 == 128
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_info) != Py_None);
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_5 = __pyx_t_7;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->_info->_is_present_in_parent != 0);
    __pyx_t_5 = __pyx_t_7;
    __pyx_L5_bool_binop_done:;
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6289
 *         if field_name == 'id':
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'info':             # <<<<<<<<<<<<<<
 *             return self._info is not None and self._info._is_present_in_parent
 *         if field_name == 'lat':
 */
  }

  /* "pyrosm_proto.pyx":6291
 *         if field_name == 'info':
 *             return self._info is not None and self._info._is_present_in_parent
 *         if field_name == 'lat':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 128 == 128
 *         if field_name == 'lon':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_lat, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 6291, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6292
 *             return self._info is not None and self._info._is_present_in_parent
 *         if field_name == 'lat':
 *             return self.__field_bitmap0 & 128 == 128             # <<<<<<<<<<<<<<
 *         if field_name == 'lon':
 *             return self.__field_bitmap0 & 256 == 256
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 0x80) == 0x80);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6291
 *         if field_name == 'info':
 *             return self._info is not None and self._info._is_present_in_parent
 *         if field_name == 'lat':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 128 == 128
 *         if field_name == 'lon':
 */
  }

  /* "pyrosm_proto.pyx":6293
 *         if field_name == 'lat':
 *             return self.__field_bitmap0 & 128 == 128
 *         if field_name == 'lon':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 256 == 256
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_lon, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 6293, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6294
 *             return self.__field_bitmap0 & 128 == 128
 *         if field_name == 'lon':
 *             return self.__field_bitmap0 & 256 == 256             # <<<<<<<<<<<<<<
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 0x100) == 0x100);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6293
 *         if field_name == 'lat':
 *             return self.__field_bitmap0 & 128 == 128
 *         if field_name == 'lon':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 256 == 256
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  }

  /* "pyrosm_proto.pyx":6295
 *         if field_name == 'lon':
 *             return self.__field_bitmap0 & 256 == 256
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint IsInitialized(self):
 */
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_singular, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 6295, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6280
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

  /* 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("pyrosm_proto.Node.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_16HasField[] = "\n        Checks if a certain field is set for the message.\n\n        Params:\n            field_name (str): The name of the field to check.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_16HasField(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_16HasField(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("HasField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_4Node_HasField(__pyx_v_self, __pyx_v_field_name, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6280, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.Node.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6297
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Node_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_12pyrosm_proto_4Node_IsInitialized(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_IsInitialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6297, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Node_19IsInitialized)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6297, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6297, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":6307
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             return False
 *         if self.__field_bitmap0 & 128 != 128:
 */
  __pyx_t_5 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6308
 * 
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 128 != 128:
 *             return False
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6307
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             return False
 *         if self.__field_bitmap0 & 128 != 128:
 */
  }

  /* "pyrosm_proto.pyx":6309
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False
 *         if self.__field_bitmap0 & 128 != 128:             # <<<<<<<<<<<<<<
 *             return False
 *         if self.__field_bitmap0 & 256 != 256:
 */
  __pyx_t_5 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x80) != 0x80) != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6310
 *             return False
 *         if self.__field_bitmap0 & 128 != 128:
 *             return False             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 256 != 256:
 *             return False
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6309
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False
 *         if self.__field_bitmap0 & 128 != 128:             # <<<<<<<<<<<<<<
 *             return False
 *         if self.__field_bitmap0 & 256 != 256:
 */
  }

  /* "pyrosm_proto.pyx":6311
 *         if self.__field_bitmap0 & 128 != 128:
 *             return False
 *         if self.__field_bitmap0 & 256 != 256:             # <<<<<<<<<<<<<<
 *             return False
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 */
  __pyx_t_5 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x100) != 0x100) != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6312
 *             return False
 *         if self.__field_bitmap0 & 256 != 256:
 *             return False             # <<<<<<<<<<<<<<
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             return False
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6311
 *         if self.__field_bitmap0 & 128 != 128:
 *             return False
 *         if self.__field_bitmap0 & 256 != 256:             # <<<<<<<<<<<<<<
 *             return False
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 */
  }

  /* "pyrosm_proto.pyx":6313
 *         if self.__field_bitmap0 & 256 != 256:
 *             return False
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_self->_info->_is_present_in_parent != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_7 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->IsInitialized(__pyx_v_self->_info, 0) != 0)) != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6314
 *             return False
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         return True
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6313
 *         if self.__field_bitmap0 & 256 != 256:
 *             return False
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  }

  /* "pyrosm_proto.pyx":6316
 *             return False
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef void MergeFrom(self, Node other_msg):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6297
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

  /* 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_WriteUnraisable("pyrosm_proto.Node.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_18IsInitialized[] = "\n        Checks if the message is initialized.\n\n        Returns:\n            bool: True if the message is initialized (i.e. all of its required\n                fields are set).\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsInitialized (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_18IsInitialized(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_18IsInitialized(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_12pyrosm_proto_4Node_IsInitialized(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6297, __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("pyrosm_proto.Node.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6318
 *         return True
 * 
 *     cpdef void MergeFrom(self, Node other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Node_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_4Node_MergeFrom(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int64_t __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6318, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Node_21MergeFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6318, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":6327
 *         cdef int i
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":6328
 * 
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6327
 *         cdef int i
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "pyrosm_proto.pyx":6331
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._id = other_msg._id
 *             self.__field_bitmap0 |= 1
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":6332
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._id = other_msg._id             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 1
 *         self._keys.extend(other_msg._keys)
 */
    __pyx_t_7 = __pyx_v_other_msg->_id;
    __pyx_v_self->_id = __pyx_t_7;

    /* "pyrosm_proto.pyx":6333
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._id = other_msg._id
 *             self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *         self._keys.extend(other_msg._keys)
 *         self._vals.extend(other_msg._vals)
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

    /* "pyrosm_proto.pyx":6331
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._id = other_msg._id
 *             self.__field_bitmap0 |= 1
 */
  }

  /* "pyrosm_proto.pyx":6334
 *             self._id = other_msg._id
 *             self.__field_bitmap0 |= 1
 *         self._keys.extend(other_msg._keys)             # <<<<<<<<<<<<<<
 *         self._vals.extend(other_msg._vals)
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_keys);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_keys->__pyx_vtab)->extend(__pyx_v_self->_keys, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6334, __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;

  /* "pyrosm_proto.pyx":6335
 *             self.__field_bitmap0 |= 1
 *         self._keys.extend(other_msg._keys)
 *         self._vals.extend(other_msg._vals)             # <<<<<<<<<<<<<<
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:
 *             if self._info is None:
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_other_msg->_vals);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_vals->__pyx_vtab)->extend(__pyx_v_self->_vals, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6335, __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;

  /* "pyrosm_proto.pyx":6336
 *         self._keys.extend(other_msg._keys)
 *         self._vals.extend(other_msg._vals)
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             if self._info is None:
 *                 self._info = Info.__new__(Info)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_other_msg->_info) != Py_None);
  __pyx_t_8 = (__pyx_t_5 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_other_msg->_info->_is_present_in_parent != 0);
  __pyx_t_6 = __pyx_t_8;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":6337
 *         self._vals.extend(other_msg._vals)
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:
 *             if self._info is None:             # <<<<<<<<<<<<<<
 *                 self._info = Info.__new__(Info)
 *                 self._info.reset()
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_info) == Py_None);
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (__pyx_t_8) {

      /* "pyrosm_proto.pyx":6338
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:
 *             if self._info is None:
 *                 self._info = Info.__new__(Info)             # <<<<<<<<<<<<<<
 *                 self._info.reset()
 *                 self._info._listener = <PyObject *>self
 */
      __pyx_t_1 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_Info(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6338, __pyx_L1_error)
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
      __Pyx_GOTREF(__pyx_v_self->_info);
      __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
      __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyrosm_proto.pyx":6339
 *             if self._info is None:
 *                 self._info = Info.__new__(Info)
 *                 self._info.reset()             # <<<<<<<<<<<<<<
 *                 self._info._listener = <PyObject *>self
 *             self._info.MergeFrom(other_msg._info)
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->reset(__pyx_v_self->_info, 0);

      /* "pyrosm_proto.pyx":6340
 *                 self._info = Info.__new__(Info)
 *                 self._info.reset()
 *                 self._info._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *             self._info.MergeFrom(other_msg._info)
 *         if other_msg.__field_bitmap0 & 128 == 128:
 */
      __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_self);

      /* "pyrosm_proto.pyx":6337
 *         self._vals.extend(other_msg._vals)
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:
 *             if self._info is None:             # <<<<<<<<<<<<<<
 *                 self._info = Info.__new__(Info)
 *                 self._info.reset()
 */
    }

    /* "pyrosm_proto.pyx":6341
 *                 self._info.reset()
 *                 self._info._listener = <PyObject *>self
 *             self._info.MergeFrom(other_msg._info)             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 128 == 128:
 *             self._lat = other_msg._lat
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_info);
    __Pyx_INCREF(__pyx_t_1);
    ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->MergeFrom(__pyx_v_self->_info, ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_t_1), 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":6336
 *         self._keys.extend(other_msg._keys)
 *         self._vals.extend(other_msg._vals)
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             if self._info is None:
 *                 self._info = Info.__new__(Info)
 */
  }

  /* "pyrosm_proto.pyx":6342
 *                 self._info._listener = <PyObject *>self
 *             self._info.MergeFrom(other_msg._info)
 *         if other_msg.__field_bitmap0 & 128 == 128:             # <<<<<<<<<<<<<<
 *             self._lat = other_msg._lat
 *             self.__field_bitmap0 |= 128
 */
  __pyx_t_8 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 0x80) == 0x80) != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":6343
 *             self._info.MergeFrom(other_msg._info)
 *         if other_msg.__field_bitmap0 & 128 == 128:
 *             self._lat = other_msg._lat             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 128
 *         if other_msg.__field_bitmap0 & 256 == 256:
 */
    __pyx_t_7 = __pyx_v_other_msg->_lat;
    __pyx_v_self->_lat = __pyx_t_7;

    /* "pyrosm_proto.pyx":6344
 *         if other_msg.__field_bitmap0 & 128 == 128:
 *             self._lat = other_msg._lat
 *             self.__field_bitmap0 |= 128             # <<<<<<<<<<<<<<
 *         if other_msg.__field_bitmap0 & 256 == 256:
 *             self._lon = other_msg._lon
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x80);

    /* "pyrosm_proto.pyx":6342
 *                 self._info._listener = <PyObject *>self
 *             self._info.MergeFrom(other_msg._info)
 *         if other_msg.__field_bitmap0 & 128 == 128:             # <<<<<<<<<<<<<<
 *             self._lat = other_msg._lat
 *             self.__field_bitmap0 |= 128
 */
  }

  /* "pyrosm_proto.pyx":6345
 *             self._lat = other_msg._lat
 *             self.__field_bitmap0 |= 128
 *         if other_msg.__field_bitmap0 & 256 == 256:             # <<<<<<<<<<<<<<
 *             self._lon = other_msg._lon
 *             self.__field_bitmap0 |= 256
 */
  __pyx_t_8 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 0x100) == 0x100) != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":6346
 *             self.__field_bitmap0 |= 128
 *         if other_msg.__field_bitmap0 & 256 == 256:
 *             self._lon = other_msg._lon             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 256
 * 
 */
    __pyx_t_7 = __pyx_v_other_msg->_lon;
    __pyx_v_self->_lon = __pyx_t_7;

    /* "pyrosm_proto.pyx":6347
 *         if other_msg.__field_bitmap0 & 256 == 256:
 *             self._lon = other_msg._lon
 *             self.__field_bitmap0 |= 256             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 0x100);

    /* "pyrosm_proto.pyx":6345
 *             self._lat = other_msg._lat
 *             self.__field_bitmap0 |= 128
 *         if other_msg.__field_bitmap0 & 256 == 256:             # <<<<<<<<<<<<<<
 *             self._lon = other_msg._lon
 *             self.__field_bitmap0 |= 256
 */
  }

  /* "pyrosm_proto.pyx":6349
 *             self.__field_bitmap0 |= 256
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6318
 *         return True
 * 
 *     cpdef void MergeFrom(self, Node other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Node.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_20MergeFrom[] = "\n        Merges the contents of the specified message into the current message.\n\n        Params:\n            other_msg: Message to merge into the current message.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_Node, 1, "other_msg", 0))) __PYX_ERR(0, 6318, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_20MergeFrom(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_20MergeFrom(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Node_MergeFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6318, __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("pyrosm_proto.Node.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6351
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Node_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_4Node_MergeFromString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Node_MergeFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  unsigned char const *__pyx_t_10;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Node_23MergeFromString)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6351, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6351, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6351, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6351, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6351, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":6365
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, False)
 */
  __pyx_t_7 = (__pyx_v_size != Py_None);
  if ((__pyx_t_7 != 0)) {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6365, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_8;
  } else {
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6365, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_9;
  }
  __pyx_v_length = __pyx_t_5;

  /* "pyrosm_proto.pyx":6367
 *         length = size if size is not None else len(data)
 * 
 *         buf = self._protobuf_deserialize(data, length, False)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_10 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 6367, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_10, __pyx_v_length, 0);

  /* "pyrosm_proto.pyx":6369
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  __pyx_t_7 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "pyrosm_proto.pyx":6370
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_GIVEREF(__pyx_v_size);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_size);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Truncated_message_got_s_expected, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6370, __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, 6370, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6369
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  }

  /* "pyrosm_proto.pyx":6372
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6374
 *         self._Modified()
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6351
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.Node.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_22MergeFromString[] = "\n        Merges serialized protocol buffer data into this message.\n\n        Params:\n            data (bytes): a string of binary data.\n            size (int): optional - the length of the data string\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "MergeFromString") < 0)) __PYX_ERR(0, 6351, __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_data = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MergeFromString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6351, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_22MergeFromString(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), __pyx_v_data, __pyx_v_size);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_22MergeFromString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_4Node_MergeFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_Node->MergeFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6351, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Node.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6376
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Node_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_4Node_ParseFromString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Node_ParseFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_reset = ((int)1);
  int __pyx_v_cache = ((int)0);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  unsigned char const *__pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_reset = __pyx_optional_args->reset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cache = __pyx_optional_args->cache;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6376, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Node_25ParseFromString)) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6376, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6376, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6376, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6376, __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(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6376, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_size);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 3+__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, 6376, __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, 6376, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":6392
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         if reset:
 */
  __pyx_t_9 = (__pyx_v_size != Py_None);
  if ((__pyx_t_9 != 0)) {
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6392, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6392, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_11;
  }
  __pyx_v_length = __pyx_t_7;

  /* "pyrosm_proto.pyx":6394
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_9 = (__pyx_v_reset != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":6395
 * 
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":6394
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":6397
 *             self.reset()
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_12 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 6397, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_12, __pyx_v_length, __pyx_v_cache);

  /* "pyrosm_proto.pyx":6399
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  __pyx_t_9 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "pyrosm_proto.pyx":6400
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message")             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s_Truncated_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Truncated_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6400, __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, 6400, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6399
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  }

  /* "pyrosm_proto.pyx":6402
 *             raise DecodeError("Truncated message")
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6404
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  __pyx_t_9 = (__pyx_v_cache != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":6405
 * 
 *         if cache:
 *             self._cached_serialization = data             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) __PYX_ERR(0, 6405, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":6404
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  }

  /* "pyrosm_proto.pyx":6407
 *             self._cached_serialization = data
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6376
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.Node.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_24ParseFromString[] = "\n        Populate the message class from a string of protobuf encoded binary data.\n\n        Params:\n            data (bytes): a string of binary data\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n            cache (bool): optional - whether to cache serialized data\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_v_reset;
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,&__pyx_n_s_cache,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromString") < 0)) __PYX_ERR(0, 6376, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    if (values[2]) {
      __pyx_v_reset = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6376, __pyx_L3_error)
    } else {
      __pyx_v_reset = ((int)1);
    }
    if (values[3]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6376, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromString", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6376, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_24ParseFromString(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset, __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_24ParseFromString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_4Node_ParseFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.reset = __pyx_v_reset;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_Node->ParseFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6376, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Node.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6410
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Node_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FromString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_26FromString(((PyTypeObject*)__pyx_v_cls), ((PyObject *)__pyx_v_s));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("FromString", 0);

  /* "pyrosm_proto.pyx":6411
 *     @classmethod
 *     def FromString(cls, s):
 *         message = cls()             # <<<<<<<<<<<<<<
 *         message.MergeFromString(s)
 *         return message
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6412
 *     def FromString(cls, s):
 *         message = cls()
 *         message.MergeFromString(s)             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6412, __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;

  /* "pyrosm_proto.pyx":6413
 *         message = cls()
 *         message.MergeFromString(s)
 *         return message             # <<<<<<<<<<<<<<
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6410
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Node.FromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6415
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # id
 */

static void __pyx_f_12pyrosm_proto_4Node__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_cache) {
  Py_ssize_t __pyx_v_length;
  uint32_t __pyx_v_keys_elt;
  PyObject *__pyx_v_keys_buf = 0;
  uint32_t __pyx_v_vals_elt;
  PyObject *__pyx_v_vals_buf = 0;
  PyObject *__pyx_v_info_buf = 0;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  uint32_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("_protobuf_serialize", 0);
  __Pyx_INCREF(__pyx_v_buf);

  /* "pyrosm_proto.pyx":6418
 *         cdef ssize_t length
 *         # id
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(8, buf)
 *             set_signed_varint64(self._id, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":6419
 *         # id
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(8, buf)             # <<<<<<<<<<<<<<
 *             set_signed_varint64(self._id, buf)
 *         # keys
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(8, __pyx_v_buf));

    /* "pyrosm_proto.pyx":6420
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(8, buf)
 *             set_signed_varint64(self._id, buf)             # <<<<<<<<<<<<<<
 *         # keys
 *         cdef uint32_t keys_elt
 */
    (void)(__pyx_f_12pyrobuf_util_set_signed_varint64(__pyx_v_self->_id, __pyx_v_buf));

    /* "pyrosm_proto.pyx":6418
 *         cdef ssize_t length
 *         # id
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(8, buf)
 *             set_signed_varint64(self._id, buf)
 */
  }

  /* "pyrosm_proto.pyx":6423
 *         # keys
 *         cdef uint32_t keys_elt
 *         cdef bytearray keys_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._keys)
 *         if length > 0:
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_keys_buf = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyrosm_proto.pyx":6424
 *         cdef uint32_t keys_elt
 *         cdef bytearray keys_buf = bytearray()
 *         length = len(self._keys)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(18, buf)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_keys);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6424, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_length = __pyx_t_3;

  /* "pyrosm_proto.pyx":6425
 *         cdef bytearray keys_buf = bytearray()
 *         length = len(self._keys)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(18, buf)
 *             for keys_elt in self._keys:
 */
  __pyx_t_1 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":6426
 *         length = len(self._keys)
 *         if length > 0:
 *             set_varint64(18, buf)             # <<<<<<<<<<<<<<
 *             for keys_elt in self._keys:
 *                 set_varint32(keys_elt, keys_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(18, __pyx_v_buf));

    /* "pyrosm_proto.pyx":6427
 *         if length > 0:
 *             set_varint64(18, buf)
 *             for keys_elt in self._keys:             # <<<<<<<<<<<<<<
 *                 set_varint32(keys_elt, keys_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_keys))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_keys))) {
      __pyx_t_2 = ((PyObject *)__pyx_v_self->_keys); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self->_keys)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6427, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6427, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 6427, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6427, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 6427, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6427, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 6427, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_6 = __Pyx_PyInt_As_uint32_t(__pyx_t_5); if (unlikely((__pyx_t_6 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6427, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_keys_elt = __pyx_t_6;

      /* "pyrosm_proto.pyx":6428
 *             set_varint64(18, buf)
 *             for keys_elt in self._keys:
 *                 set_varint32(keys_elt, keys_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(keys_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_keys_elt, __pyx_v_keys_buf));

      /* "pyrosm_proto.pyx":6427
 *         if length > 0:
 *             set_varint64(18, buf)
 *             for keys_elt in self._keys:             # <<<<<<<<<<<<<<
 *                 set_varint32(keys_elt, keys_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":6430
 *                 set_varint32(keys_elt, keys_buf)
 * 
 *             set_varint64(len(keys_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += keys_buf
 *         # vals
 */
    __pyx_t_3 = PyByteArray_GET_SIZE(__pyx_v_keys_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6430, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

    /* "pyrosm_proto.pyx":6431
 * 
 *             set_varint64(len(keys_buf), buf)
 *             buf += keys_buf             # <<<<<<<<<<<<<<
 *         # vals
 *         cdef uint32_t vals_elt
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_keys_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":6425
 *         cdef bytearray keys_buf = bytearray()
 *         length = len(self._keys)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(18, buf)
 *             for keys_elt in self._keys:
 */
  }

  /* "pyrosm_proto.pyx":6434
 *         # vals
 *         cdef uint32_t vals_elt
 *         cdef bytearray vals_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._vals)
 *         if length > 0:
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_vals_buf = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyrosm_proto.pyx":6435
 *         cdef uint32_t vals_elt
 *         cdef bytearray vals_buf = bytearray()
 *         length = len(self._vals)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(26, buf)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_vals);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6435, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_length = __pyx_t_3;

  /* "pyrosm_proto.pyx":6436
 *         cdef bytearray vals_buf = bytearray()
 *         length = len(self._vals)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(26, buf)
 *             for vals_elt in self._vals:
 */
  __pyx_t_1 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":6437
 *         length = len(self._vals)
 *         if length > 0:
 *             set_varint64(26, buf)             # <<<<<<<<<<<<<<
 *             for vals_elt in self._vals:
 *                 set_varint32(vals_elt, vals_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(26, __pyx_v_buf));

    /* "pyrosm_proto.pyx":6438
 *         if length > 0:
 *             set_varint64(26, buf)
 *             for vals_elt in self._vals:             # <<<<<<<<<<<<<<
 *                 set_varint32(vals_elt, vals_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_vals))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_vals))) {
      __pyx_t_2 = ((PyObject *)__pyx_v_self->_vals); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self->_vals)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6438, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 6438, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6438, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 6438, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6438, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 6438, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_6 = __Pyx_PyInt_As_uint32_t(__pyx_t_5); if (unlikely((__pyx_t_6 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6438, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_vals_elt = __pyx_t_6;

      /* "pyrosm_proto.pyx":6439
 *             set_varint64(26, buf)
 *             for vals_elt in self._vals:
 *                 set_varint32(vals_elt, vals_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(vals_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_vals_elt, __pyx_v_vals_buf));

      /* "pyrosm_proto.pyx":6438
 *         if length > 0:
 *             set_varint64(26, buf)
 *             for vals_elt in self._vals:             # <<<<<<<<<<<<<<
 *                 set_varint32(vals_elt, vals_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":6441
 *                 set_varint32(vals_elt, vals_buf)
 * 
 *             set_varint64(len(vals_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += vals_buf
 *         # info
 */
    __pyx_t_3 = PyByteArray_GET_SIZE(__pyx_v_vals_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6441, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

    /* "pyrosm_proto.pyx":6442
 * 
 *             set_varint64(len(vals_buf), buf)
 *             buf += vals_buf             # <<<<<<<<<<<<<<
 *         # info
 *         cdef bytearray info_buf
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_vals_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":6436
 *         cdef bytearray vals_buf = bytearray()
 *         length = len(self._vals)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(26, buf)
 *             for vals_elt in self._vals:
 */
  }

  /* "pyrosm_proto.pyx":6445
 *         # info
 *         cdef bytearray info_buf
 *         if self._info is not None and self._info._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             set_varint64(34, buf)
 *             if self._info._cached_serialization is not None:
 */
  __pyx_t_7 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_1 = __pyx_t_8;
    goto __pyx_L11_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_self->_info->_is_present_in_parent != 0);
  __pyx_t_1 = __pyx_t_8;
  __pyx_L11_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":6446
 *         cdef bytearray info_buf
 *         if self._info is not None and self._info._is_present_in_parent:
 *             set_varint64(34, buf)             # <<<<<<<<<<<<<<
 *             if self._info._cached_serialization is not None:
 *                 set_varint64(len(self._info._cached_serialization), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(34, __pyx_v_buf));

    /* "pyrosm_proto.pyx":6447
 *         if self._info is not None and self._info._is_present_in_parent:
 *             set_varint64(34, buf)
 *             if self._info._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(self._info._cached_serialization), buf)
 *                 buf += self._info._cached_serialization
 */
    __pyx_t_1 = (__pyx_v_self->_info->_cached_serialization != ((PyObject*)Py_None));
    __pyx_t_8 = (__pyx_t_1 != 0);
    if (__pyx_t_8) {

      /* "pyrosm_proto.pyx":6448
 *             set_varint64(34, buf)
 *             if self._info._cached_serialization is not None:
 *                 set_varint64(len(self._info._cached_serialization), buf)             # <<<<<<<<<<<<<<
 *                 buf += self._info._cached_serialization
 *             else:
 */
      __pyx_t_2 = __pyx_v_self->_info->_cached_serialization;
      __Pyx_INCREF(__pyx_t_2);
      if (unlikely(__pyx_t_2 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(0, 6448, __pyx_L1_error)
      }
      __pyx_t_3 = PyBytes_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6448, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

      /* "pyrosm_proto.pyx":6449
 *             if self._info._cached_serialization is not None:
 *                 set_varint64(len(self._info._cached_serialization), buf)
 *                 buf += self._info._cached_serialization             # <<<<<<<<<<<<<<
 *             else:
 *                 info_buf = bytearray()
 */
      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_self->_info->_cached_serialization); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6449, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":6447
 *         if self._info is not None and self._info._is_present_in_parent:
 *             set_varint64(34, buf)
 *             if self._info._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(self._info._cached_serialization), buf)
 *                 buf += self._info._cached_serialization
 */
      goto __pyx_L13;
    }

    /* "pyrosm_proto.pyx":6451
 *                 buf += self._info._cached_serialization
 *             else:
 *                 info_buf = bytearray()             # <<<<<<<<<<<<<<
 *                 self._info._protobuf_serialize(info_buf, cache)
 *                 set_varint64(len(info_buf), buf)
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6451, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_info_buf = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":6452
 *             else:
 *                 info_buf = bytearray()
 *                 self._info._protobuf_serialize(info_buf, cache)             # <<<<<<<<<<<<<<
 *                 set_varint64(len(info_buf), buf)
 *                 buf += info_buf
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->_protobuf_serialize(__pyx_v_self->_info, __pyx_v_info_buf, __pyx_v_cache);

      /* "pyrosm_proto.pyx":6453
 *                 info_buf = bytearray()
 *                 self._info._protobuf_serialize(info_buf, cache)
 *                 set_varint64(len(info_buf), buf)             # <<<<<<<<<<<<<<
 *                 buf += info_buf
 *                 if cache:
 */
      __pyx_t_3 = PyByteArray_GET_SIZE(__pyx_v_info_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6453, __pyx_L1_error)
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

      /* "pyrosm_proto.pyx":6454
 *                 self._info._protobuf_serialize(info_buf, cache)
 *                 set_varint64(len(info_buf), buf)
 *                 buf += info_buf             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     self._info._cached_serialization = bytes(info_buf)
 */
      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_info_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6454, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":6455
 *                 set_varint64(len(info_buf), buf)
 *                 buf += info_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._info._cached_serialization = bytes(info_buf)
 *         # lat
 */
      __pyx_t_8 = (__pyx_v_cache != 0);
      if (__pyx_t_8) {

        /* "pyrosm_proto.pyx":6456
 *                 buf += info_buf
 *                 if cache:
 *                     self._info._cached_serialization = bytes(info_buf)             # <<<<<<<<<<<<<<
 *         # lat
 *         if self.__field_bitmap0 & 128 == 128:
 */
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_info_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_v_self->_info->_cached_serialization);
        __Pyx_DECREF(__pyx_v_self->_info->_cached_serialization);
        __pyx_v_self->_info->_cached_serialization = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyrosm_proto.pyx":6455
 *                 set_varint64(len(info_buf), buf)
 *                 buf += info_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._info._cached_serialization = bytes(info_buf)
 *         # lat
 */
      }
    }
    __pyx_L13:;

    /* "pyrosm_proto.pyx":6445
 *         # info
 *         cdef bytearray info_buf
 *         if self._info is not None and self._info._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             set_varint64(34, buf)
 *             if self._info._cached_serialization is not None:
 */
  }

  /* "pyrosm_proto.pyx":6458
 *                     self._info._cached_serialization = bytes(info_buf)
 *         # lat
 *         if self.__field_bitmap0 & 128 == 128:             # <<<<<<<<<<<<<<
 *             set_varint64(64, buf)
 *             set_signed_varint64(self._lat, buf)
 */
  __pyx_t_8 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x80) == 0x80) != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":6459
 *         # lat
 *         if self.__field_bitmap0 & 128 == 128:
 *             set_varint64(64, buf)             # <<<<<<<<<<<<<<
 *             set_signed_varint64(self._lat, buf)
 *         # lon
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(64, __pyx_v_buf));

    /* "pyrosm_proto.pyx":6460
 *         if self.__field_bitmap0 & 128 == 128:
 *             set_varint64(64, buf)
 *             set_signed_varint64(self._lat, buf)             # <<<<<<<<<<<<<<
 *         # lon
 *         if self.__field_bitmap0 & 256 == 256:
 */
    (void)(__pyx_f_12pyrobuf_util_set_signed_varint64(__pyx_v_self->_lat, __pyx_v_buf));

    /* "pyrosm_proto.pyx":6458
 *                     self._info._cached_serialization = bytes(info_buf)
 *         # lat
 *         if self.__field_bitmap0 & 128 == 128:             # <<<<<<<<<<<<<<
 *             set_varint64(64, buf)
 *             set_signed_varint64(self._lat, buf)
 */
  }

  /* "pyrosm_proto.pyx":6462
 *             set_signed_varint64(self._lat, buf)
 *         # lon
 *         if self.__field_bitmap0 & 256 == 256:             # <<<<<<<<<<<<<<
 *             set_varint64(72, buf)
 *             set_signed_varint64(self._lon, buf)
 */
  __pyx_t_8 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x100) == 0x100) != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":6463
 *         # lon
 *         if self.__field_bitmap0 & 256 == 256:
 *             set_varint64(72, buf)             # <<<<<<<<<<<<<<
 *             set_signed_varint64(self._lon, buf)
 * 
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(72, __pyx_v_buf));

    /* "pyrosm_proto.pyx":6464
 *         if self.__field_bitmap0 & 256 == 256:
 *             set_varint64(72, buf)
 *             set_signed_varint64(self._lon, buf)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void _Modified(self):
 */
    (void)(__pyx_f_12pyrobuf_util_set_signed_varint64(__pyx_v_self->_lon, __pyx_v_buf));

    /* "pyrosm_proto.pyx":6462
 *             set_signed_varint64(self._lat, buf)
 *         # lon
 *         if self.__field_bitmap0 & 256 == 256:             # <<<<<<<<<<<<<<
 *             set_varint64(72, buf)
 *             set_signed_varint64(self._lon, buf)
 */
  }

  /* "pyrosm_proto.pyx":6415
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # id
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("pyrosm_proto.Node._protobuf_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_keys_buf);
  __Pyx_XDECREF(__pyx_v_vals_buf);
  __Pyx_XDECREF(__pyx_v_info_buf);
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_RefNannyFinishContext();
}

/* "pyrosm_proto.pyx":6466
 *             set_signed_varint64(self._lon, buf)
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Node_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_4Node__Modified(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Modified); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6466, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Node_29_Modified)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6466, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":6467
 * 
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":6468
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()             # <<<<<<<<<<<<<<
 *         self._cached_serialization = None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_listener), __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6468, __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;

  /* "pyrosm_proto.pyx":6469
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
  __Pyx_DECREF(__pyx_v_self->_cached_serialization);
  __pyx_v_self->_cached_serialization = ((PyObject*)Py_None);

  /* "pyrosm_proto.pyx":6466
 *             set_signed_varint64(self._lon, buf)
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Node._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Node_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_Modified (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_28_Modified(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_28_Modified(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_4Node__Modified(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6466, __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("pyrosm_proto.Node._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6471
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Node_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_4Node_SerializeToString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Node_SerializeToString *__pyx_optional_args) {
  int __pyx_v_cache = ((int)0);
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_out = 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;
  int __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cache = __pyx_optional_args->cache;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Node_31SerializeToString)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6471, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6471, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 6471, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":6480
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:
 */
  __pyx_t_6 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":6481
 * 
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 128 != 128:
 *             raise Exception("required field 'lat' not initialized and does not have default")
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6481, __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, 6481, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6480
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:
 */
  }

  /* "pyrosm_proto.pyx":6482
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:
 */
  __pyx_t_6 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x80) != 0x80) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":6483
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:
 *             raise Exception("required field 'lat' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 256 != 256:
 *             raise Exception("required field 'lon' not initialized and does not have default")
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__126, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6483, __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, 6483, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6482
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:
 */
  }

  /* "pyrosm_proto.pyx":6484
 *         if self.__field_bitmap0 & 128 != 128:
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'lon' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 */
  __pyx_t_6 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x100) != 0x100) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":6485
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:
 *             raise Exception("required field 'lon' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             raise Exception("Message Node is missing required field: info")
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__127, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6485, __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, 6485, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6484
 *         if self.__field_bitmap0 & 128 != 128:
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'lon' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 */
  }

  /* "pyrosm_proto.pyx":6486
 *         if self.__field_bitmap0 & 256 != 256:
 *             raise Exception("required field 'lon' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():             # <<<<<<<<<<<<<<
 *             raise Exception("Message Node is missing required field: info")
 * 
 */
  __pyx_t_7 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_self->_info->_is_present_in_parent != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_8 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->IsInitialized(__pyx_v_self->_info, 0) != 0)) != 0);
  __pyx_t_6 = __pyx_t_8;
  __pyx_L7_bool_binop_done:;
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":6487
 *             raise Exception("required field 'lon' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             raise Exception("Message Node is missing required field: info")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__128, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6487, __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, 6487, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6486
 *         if self.__field_bitmap0 & 256 != 256:
 *             raise Exception("required field 'lon' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():             # <<<<<<<<<<<<<<
 *             raise Exception("Message Node is missing required field: info")
 * 
 */
  }

  /* "pyrosm_proto.pyx":6489
 *             raise Exception("Message Node is missing required field: info")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_6 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_8 = (__pyx_t_6 != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":6490
 * 
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6489
 *             raise Exception("Message Node is missing required field: info")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":6492
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6493
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)             # <<<<<<<<<<<<<<
 *         cdef bytes out = bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, __pyx_v_cache);

  /* "pyrosm_proto.pyx":6494
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6496
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  __pyx_t_8 = (__pyx_v_cache != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":6497
 * 
 *         if cache:
 *             self._cached_serialization = out             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = __pyx_v_out;

    /* "pyrosm_proto.pyx":6496
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  }

  /* "pyrosm_proto.pyx":6499
 *             self._cached_serialization = out
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializePartialToString(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6471
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.Node.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_30SerializeToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cache,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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SerializeToString") < 0)) __PYX_ERR(0, 6471, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6471, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("SerializeToString", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6471, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_30SerializeToString(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_30SerializeToString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_12pyrosm_proto_4Node_SerializeToString __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_Node->SerializeToString(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6471, __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("pyrosm_proto.Node.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6501
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_4Node_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_4Node_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_buf = 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;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_4Node_33SerializePartialToString)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6501, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 6501, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":6508
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_5 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":6509
 *         """
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6508
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":6511
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6512
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)             # <<<<<<<<<<<<<<
 *         return bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, 0);

  /* "pyrosm_proto.pyx":6513
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *     def SetInParent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6501
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.Node.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_32SerializePartialToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_32SerializePartialToString(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_4Node_SerializePartialToString(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6501, __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("pyrosm_proto.Node.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6515
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_34SetInParent[] = "\n        Mark this an present in the parent.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_34SetInParent(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_34SetInParent(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent", 0);

  /* "pyrosm_proto.pyx":6519
 *         Mark this an present in the parent.
 *         """
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6515
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6521
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_36ParseFromJson[] = "\n        Populate the message class from a json string.\n\n        Params:\n            data (str): a json string\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromJson (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromJson") < 0)) __PYX_ERR(0, 6521, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    __pyx_v_reset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromJson", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6521, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_36ParseFromJson(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("ParseFromJson", 0);
  __Pyx_INCREF(__pyx_v_size);

  /* "pyrosm_proto.pyx":6530
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6531
 *         """
 *         if size is None:
 *             size = len(data)             # <<<<<<<<<<<<<<
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6531, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":6530
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  }

  /* "pyrosm_proto.pyx":6532
 *         if size is None:
 *             size = len(data)
 *         d = json.loads(data[:size])             # <<<<<<<<<<<<<<
 *         self.ParseFromDict(d, reset)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_json); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_d = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":6533
 *             size = len(data)
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToJson(self, **kwargs):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6533, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6533, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6533, __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_d);
    __Pyx_GIVEREF(__pyx_v_d);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_d);
    __Pyx_INCREF(__pyx_v_reset);
    __Pyx_GIVEREF(__pyx_v_reset);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_reset);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":6521
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrosm_proto.Node.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6535
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_38SerializeToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializeToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializeToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_38SerializeToJson(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializeToJson", 0);

  /* "pyrosm_proto.pyx":6542
 *             str: a json formatted string
 *         """
 *         d = self.SerializeToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6543
 *         """
 *         d = self.SerializeToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToJson(self, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6535
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Node.SerializeToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6545
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_40SerializePartialToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializePartialToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializePartialToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_40SerializePartialToJson(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToJson", 0);

  /* "pyrosm_proto.pyx":6552
 *             str: a json formatted string
 *         """
 *         d = self.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6553
 *         """
 *         d = self.SerializePartialToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromDict(self, d, reset=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6545
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Node.SerializePartialToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6555
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_42ParseFromDict[] = "\n        Populate the message class from a Python dictionary.\n\n        Params:\n            d (dict): a Python dictionary representing the message\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,&__pyx_n_s_reset,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 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_reset);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromDict") < 0)) __PYX_ERR(0, 6555, __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_d = values[0];
    __pyx_v_reset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromDict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6555, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_42ParseFromDict(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), __pyx_v_d, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset) {
  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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("ParseFromDict", 0);

  /* "pyrosm_proto.pyx":6563
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reset); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 6563, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":6564
 *         """
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         assert type(d) == dict
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":6563
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":6566
 *             self.reset()
 * 
 *         assert type(d) == dict             # <<<<<<<<<<<<<<
 *         try:
 *             self.id = d["id"]
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_d)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6566, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 6566, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 6566, __pyx_L1_error)
    }
  }
  #endif

  /* "pyrosm_proto.pyx":6567
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.id = d["id"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":6568
 *         assert type(d) == dict
 *         try:
 *             self.id = d["id"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6568, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id, __pyx_t_2) < 0) __PYX_ERR(0, 6568, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":6567
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.id = d["id"]
 *         except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":6569
 *         try:
 *             self.id = d["id"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":6567
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.id = d["id"]
 *         except KeyError:
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":6571
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.keys = d["keys"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":6572
 *             pass
 *         try:
 *             self.keys = d["keys"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6572, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys, __pyx_t_2) < 0) __PYX_ERR(0, 6572, __pyx_L10_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":6571
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.keys = d["keys"]
 *         except KeyError:
 */
    }
    __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_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":6573
 *         try:
 *             self.keys = d["keys"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    goto __pyx_L12_except_error;
    __pyx_L12_except_error:;

    /* "pyrosm_proto.pyx":6571
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.keys = d["keys"]
 *         except KeyError:
 */
    __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:;
  }

  /* "pyrosm_proto.pyx":6575
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.vals = d["vals"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":6576
 *             pass
 *         try:
 *             self.vals = d["vals"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_vals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6576, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vals, __pyx_t_2) < 0) __PYX_ERR(0, 6576, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":6575
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.vals = d["vals"]
 *         except KeyError:
 */
    }
    __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_L21_try_end;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":6577
 *         try:
 *             self.vals = d["vals"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L17_exception_handled;
    }
    goto __pyx_L18_except_error;
    __pyx_L18_except_error:;

    /* "pyrosm_proto.pyx":6575
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.vals = d["vals"]
 *         except KeyError:
 */
    __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_L17_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_L21_try_end:;
  }

  /* "pyrosm_proto.pyx":6579
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.info.ParseFromDict(d["info"])
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":6580
 *             pass
 *         try:
 *             self.info.ParseFromDict(d["info"])             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6580, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6580, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6580, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6580, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":6579
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.info.ParseFromDict(d["info"])
 *         except KeyError:
 */
    }
    __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_L27_try_end;
    __pyx_L22_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":6581
 *         try:
 *             self.info.ParseFromDict(d["info"])
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L23_exception_handled;
    }
    goto __pyx_L24_except_error;
    __pyx_L24_except_error:;

    /* "pyrosm_proto.pyx":6579
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.info.ParseFromDict(d["info"])
 *         except KeyError:
 */
    __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_L23_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_L27_try_end:;
  }

  /* "pyrosm_proto.pyx":6583
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lat = d["lat"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":6584
 *             pass
 *         try:
 *             self.lat = d["lat"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_lat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6584, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lat, __pyx_t_2) < 0) __PYX_ERR(0, 6584, __pyx_L28_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":6583
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lat = d["lat"]
 *         except KeyError:
 */
    }
    __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_L33_try_end;
    __pyx_L28_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":6585
 *         try:
 *             self.lat = d["lat"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L29_exception_handled;
    }
    goto __pyx_L30_except_error;
    __pyx_L30_except_error:;

    /* "pyrosm_proto.pyx":6583
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lat = d["lat"]
 *         except KeyError:
 */
    __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_L29_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_L33_try_end:;
  }

  /* "pyrosm_proto.pyx":6587
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lon = d["lon"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":6588
 *             pass
 *         try:
 *             self.lon = d["lon"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_lon); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6588, __pyx_L34_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lon, __pyx_t_2) < 0) __PYX_ERR(0, 6588, __pyx_L34_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":6587
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lon = d["lon"]
 *         except KeyError:
 */
    }
    __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_L39_try_end;
    __pyx_L34_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":6589
 *         try:
 *             self.lon = d["lon"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L35_exception_handled;
    }
    goto __pyx_L36_except_error;
    __pyx_L36_except_error:;

    /* "pyrosm_proto.pyx":6587
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lon = d["lon"]
 *         except KeyError:
 */
    __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_L35_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_L39_try_end:;
  }

  /* "pyrosm_proto.pyx":6592
 *             pass
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Node *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6593
 * 
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrosm_proto.pyx":6594
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 128 != 128:
 *             raise Exception("required field 'lat' not initialized and does not have default")
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 6594, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6593
 * 
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:
 */
  }

  /* "pyrosm_proto.pyx":6595
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x80) != 0x80) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrosm_proto.pyx":6596
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:
 *             raise Exception("required field 'lat' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 256 != 256:
 *             raise Exception("required field 'lon' not initialized and does not have default")
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__126, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 6596, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6595
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:
 */
  }

  /* "pyrosm_proto.pyx":6597
 *         if self.__field_bitmap0 & 128 != 128:
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'lon' not initialized and does not have default")
 * 
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x100) != 0x100) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrosm_proto.pyx":6598
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:
 *             raise Exception("required field 'lon' not initialized and does not have default")             # <<<<<<<<<<<<<<
 * 
 *         return
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__127, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 6598, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6597
 *         if self.__field_bitmap0 & 128 != 128:
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'lon' not initialized and does not have default")
 * 
 */
  }

  /* "pyrosm_proto.pyx":6600
 *             raise Exception("required field 'lon' not initialized and does not have default")
 * 
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6555
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.Node.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6602
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_44SerializeToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_44SerializeToDict(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_info_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("SerializeToDict", 0);

  /* "pyrosm_proto.pyx":6609
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6610
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":6611
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 128 != 128:
 *             raise Exception("required field 'lat' not initialized and does not have default")
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6611, __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, 6611, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6610
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:
 */
  }

  /* "pyrosm_proto.pyx":6612
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x80) != 0x80) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":6613
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:
 *             raise Exception("required field 'lat' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 256 != 256:
 *             raise Exception("required field 'lon' not initialized and does not have default")
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__126, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6613, __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, 6613, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6612
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:
 */
  }

  /* "pyrosm_proto.pyx":6614
 *         if self.__field_bitmap0 & 128 != 128:
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'lon' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x100) != 0x100) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":6615
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:
 *             raise Exception("required field 'lon' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__127, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6615, __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, 6615, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6614
 *         if self.__field_bitmap0 & 128 != 128:
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'lon' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 */
  }

  /* "pyrosm_proto.pyx":6616
 *         if self.__field_bitmap0 & 256 != 256:
 *             raise Exception("required field 'lon' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6617
 *             raise Exception("required field 'lon' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id             # <<<<<<<<<<<<<<
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_id, __pyx_t_1) < 0)) __PYX_ERR(0, 6617, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":6616
 *         if self.__field_bitmap0 & 256 != 256:
 *             raise Exception("required field 'lon' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 */
  }

  /* "pyrosm_proto.pyx":6618
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 *         if len(self.keys) > 0:             # <<<<<<<<<<<<<<
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6619
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)             # <<<<<<<<<<<<<<
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_keys, __pyx_t_4) < 0)) __PYX_ERR(0, 6619, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":6618
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 *         if len(self.keys) > 0:             # <<<<<<<<<<<<<<
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 */
  }

  /* "pyrosm_proto.pyx":6620
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:             # <<<<<<<<<<<<<<
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializeToDict()
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6620, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6621
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)             # <<<<<<<<<<<<<<
 *         info_dict = self.info.SerializeToDict()
 *         if info_dict != {}:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_vals, __pyx_t_1) < 0)) __PYX_ERR(0, 6621, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":6620
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:             # <<<<<<<<<<<<<<
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializeToDict()
 */
  }

  /* "pyrosm_proto.pyx":6622
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializeToDict()             # <<<<<<<<<<<<<<
 *         if info_dict != {}:
 *             out["info"] = info_dict
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_info_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6623
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializeToDict()
 *         if info_dict != {}:             # <<<<<<<<<<<<<<
 *             out["info"] = info_dict
 *         if self.__field_bitmap0 & 128 == 128:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_info_dict, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 6623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6624
 *         info_dict = self.info.SerializeToDict()
 *         if info_dict != {}:
 *             out["info"] = info_dict             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 128 == 128:
 *             out["lat"] = self.lat
 */
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_info, __pyx_v_info_dict) < 0)) __PYX_ERR(0, 6624, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6623
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializeToDict()
 *         if info_dict != {}:             # <<<<<<<<<<<<<<
 *             out["info"] = info_dict
 *         if self.__field_bitmap0 & 128 == 128:
 */
  }

  /* "pyrosm_proto.pyx":6625
 *         if info_dict != {}:
 *             out["info"] = info_dict
 *         if self.__field_bitmap0 & 128 == 128:             # <<<<<<<<<<<<<<
 *             out["lat"] = self.lat
 *         if self.__field_bitmap0 & 256 == 256:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x80) == 0x80) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6626
 *             out["info"] = info_dict
 *         if self.__field_bitmap0 & 128 == 128:
 *             out["lat"] = self.lat             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 256 == 256:
 *             out["lon"] = self.lon
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_lat, __pyx_t_5) < 0)) __PYX_ERR(0, 6626, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyrosm_proto.pyx":6625
 *         if info_dict != {}:
 *             out["info"] = info_dict
 *         if self.__field_bitmap0 & 128 == 128:             # <<<<<<<<<<<<<<
 *             out["lat"] = self.lat
 *         if self.__field_bitmap0 & 256 == 256:
 */
  }

  /* "pyrosm_proto.pyx":6627
 *         if self.__field_bitmap0 & 128 == 128:
 *             out["lat"] = self.lat
 *         if self.__field_bitmap0 & 256 == 256:             # <<<<<<<<<<<<<<
 *             out["lon"] = self.lon
 * 
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x100) == 0x100) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6628
 *             out["lat"] = self.lat
 *         if self.__field_bitmap0 & 256 == 256:
 *             out["lon"] = self.lon             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lon); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_lon, __pyx_t_5) < 0)) __PYX_ERR(0, 6628, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyrosm_proto.pyx":6627
 *         if self.__field_bitmap0 & 128 == 128:
 *             out["lat"] = self.lat
 *         if self.__field_bitmap0 & 256 == 256:             # <<<<<<<<<<<<<<
 *             out["lon"] = self.lon
 * 
 */
  }

  /* "pyrosm_proto.pyx":6630
 *             out["lon"] = self.lon
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6602
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.Node.SerializeToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_info_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6632
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_46SerializePartialToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_46SerializePartialToDict(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_info_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToDict", 0);

  /* "pyrosm_proto.pyx":6639
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6640
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6641
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id             # <<<<<<<<<<<<<<
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_id, __pyx_t_1) < 0)) __PYX_ERR(0, 6641, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":6640
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 */
  }

  /* "pyrosm_proto.pyx":6642
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 *         if len(self.keys) > 0:             # <<<<<<<<<<<<<<
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6643
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)             # <<<<<<<<<<<<<<
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_keys, __pyx_t_4) < 0)) __PYX_ERR(0, 6643, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":6642
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 *         if len(self.keys) > 0:             # <<<<<<<<<<<<<<
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 */
  }

  /* "pyrosm_proto.pyx":6644
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:             # <<<<<<<<<<<<<<
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializePartialToDict()
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6645
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)             # <<<<<<<<<<<<<<
 *         info_dict = self.info.SerializePartialToDict()
 *         if info_dict != {}:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_vals, __pyx_t_1) < 0)) __PYX_ERR(0, 6645, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":6644
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:             # <<<<<<<<<<<<<<
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializePartialToDict()
 */
  }

  /* "pyrosm_proto.pyx":6646
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         if info_dict != {}:
 *             out["info"] = info_dict
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_info_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6647
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializePartialToDict()
 *         if info_dict != {}:             # <<<<<<<<<<<<<<
 *             out["info"] = info_dict
 *         if self.__field_bitmap0 & 128 == 128:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_info_dict, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6647, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 6647, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6648
 *         info_dict = self.info.SerializePartialToDict()
 *         if info_dict != {}:
 *             out["info"] = info_dict             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 128 == 128:
 *             out["lat"] = self.lat
 */
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_info, __pyx_v_info_dict) < 0)) __PYX_ERR(0, 6648, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6647
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializePartialToDict()
 *         if info_dict != {}:             # <<<<<<<<<<<<<<
 *             out["info"] = info_dict
 *         if self.__field_bitmap0 & 128 == 128:
 */
  }

  /* "pyrosm_proto.pyx":6649
 *         if info_dict != {}:
 *             out["info"] = info_dict
 *         if self.__field_bitmap0 & 128 == 128:             # <<<<<<<<<<<<<<
 *             out["lat"] = self.lat
 *         if self.__field_bitmap0 & 256 == 256:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x80) == 0x80) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6650
 *             out["info"] = info_dict
 *         if self.__field_bitmap0 & 128 == 128:
 *             out["lat"] = self.lat             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 256 == 256:
 *             out["lon"] = self.lon
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_lat, __pyx_t_5) < 0)) __PYX_ERR(0, 6650, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyrosm_proto.pyx":6649
 *         if info_dict != {}:
 *             out["info"] = info_dict
 *         if self.__field_bitmap0 & 128 == 128:             # <<<<<<<<<<<<<<
 *             out["lat"] = self.lat
 *         if self.__field_bitmap0 & 256 == 256:
 */
  }

  /* "pyrosm_proto.pyx":6651
 *         if self.__field_bitmap0 & 128 == 128:
 *             out["lat"] = self.lat
 *         if self.__field_bitmap0 & 256 == 256:             # <<<<<<<<<<<<<<
 *             out["lon"] = self.lon
 * 
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 0x100) == 0x100) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6652
 *             out["lat"] = self.lat
 *         if self.__field_bitmap0 & 256 == 256:
 *             out["lon"] = self.lon             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lon); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_lon, __pyx_t_5) < 0)) __PYX_ERR(0, 6652, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyrosm_proto.pyx":6651
 *         if self.__field_bitmap0 & 128 == 128:
 *             out["lat"] = self.lat
 *         if self.__field_bitmap0 & 256 == 256:             # <<<<<<<<<<<<<<
 *             out["lon"] = self.lon
 * 
 */
  }

  /* "pyrosm_proto.pyx":6654
 *             out["lon"] = self.lon
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def Items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6632
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.Node.SerializePartialToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_info_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_4Node_50generator40(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":6656
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_48Items[] = "\n        Iterator over the field names and values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_48Items(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_48Items(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_40_Items(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_40_Items, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 6656, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_4Node_50generator40, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Items, __pyx_n_s_Node_Items, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 6656, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_4Node_50generator40(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6656, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6663
 *             iterator
 *         """
 *         yield 'id', self.id             # <<<<<<<<<<<<<<
 *         yield 'keys', self.keys
 *         yield 'vals', self.vals
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_id);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6663, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6664
 *         """
 *         yield 'id', self.id
 *         yield 'keys', self.keys             # <<<<<<<<<<<<<<
 *         yield 'vals', self.vals
 *         yield 'info', self.info
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_keys);
  __Pyx_GIVEREF(__pyx_n_s_keys);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_keys);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6664, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6665
 *         yield 'id', self.id
 *         yield 'keys', self.keys
 *         yield 'vals', self.vals             # <<<<<<<<<<<<<<
 *         yield 'info', self.info
 *         yield 'lat', self.lat
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_vals);
  __Pyx_GIVEREF(__pyx_n_s_vals);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_vals);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6665, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6666
 *         yield 'keys', self.keys
 *         yield 'vals', self.vals
 *         yield 'info', self.info             # <<<<<<<<<<<<<<
 *         yield 'lat', self.lat
 *         yield 'lon', self.lon
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_info);
  __Pyx_GIVEREF(__pyx_n_s_info);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_info);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6666, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6667
 *         yield 'vals', self.vals
 *         yield 'info', self.info
 *         yield 'lat', self.lat             # <<<<<<<<<<<<<<
 *         yield 'lon', self.lon
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_lat);
  __Pyx_GIVEREF(__pyx_n_s_lat);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_lat);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6667, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6668
 *         yield 'info', self.info
 *         yield 'lat', self.lat
 *         yield 'lon', self.lon             # <<<<<<<<<<<<<<
 * 
 *     def Fields(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lon); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_lon);
  __Pyx_GIVEREF(__pyx_n_s_lon);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_lon);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6668, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":6656
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_4Node_53generator41(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":6670
 *         yield 'lon', self.lon
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_51Fields[] = "\n        Iterator over the field names of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_51Fields(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_41_Fields(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_41_Fields, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 6670, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_4Node_53generator41, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Fields, __pyx_n_s_Node_Fields, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 6670, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_4Node_53generator41(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6670, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6677
 *             iterator
 *         """
 *         yield 'id'             # <<<<<<<<<<<<<<
 *         yield 'keys'
 *         yield 'vals'
 */
  __Pyx_INCREF(__pyx_n_s_id);
  __pyx_r = __pyx_n_s_id;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6677, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6678
 *         """
 *         yield 'id'
 *         yield 'keys'             # <<<<<<<<<<<<<<
 *         yield 'vals'
 *         yield 'info'
 */
  __Pyx_INCREF(__pyx_n_s_keys);
  __pyx_r = __pyx_n_s_keys;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6678, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6679
 *         yield 'id'
 *         yield 'keys'
 *         yield 'vals'             # <<<<<<<<<<<<<<
 *         yield 'info'
 *         yield 'lat'
 */
  __Pyx_INCREF(__pyx_n_s_vals);
  __pyx_r = __pyx_n_s_vals;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6679, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6680
 *         yield 'keys'
 *         yield 'vals'
 *         yield 'info'             # <<<<<<<<<<<<<<
 *         yield 'lat'
 *         yield 'lon'
 */
  __Pyx_INCREF(__pyx_n_s_info);
  __pyx_r = __pyx_n_s_info;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6680, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6681
 *         yield 'vals'
 *         yield 'info'
 *         yield 'lat'             # <<<<<<<<<<<<<<
 *         yield 'lon'
 * 
 */
  __Pyx_INCREF(__pyx_n_s_lat);
  __pyx_r = __pyx_n_s_lat;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6681, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6682
 *         yield 'info'
 *         yield 'lat'
 *         yield 'lon'             # <<<<<<<<<<<<<<
 * 
 *     def Values(self):
 */
  __Pyx_INCREF(__pyx_n_s_lon);
  __pyx_r = __pyx_n_s_lon;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6682, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":6670
 *         yield 'lon', self.lon
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_4Node_56generator42(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":6684
 *         yield 'lon'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_54Values[] = "\n        Iterator over the values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_54Values(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_54Values(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_42_Values(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_42_Values, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 6684, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_4Node_56generator42, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Values, __pyx_n_s_Node_Values, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 6684, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_4Node_56generator42(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6684, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6691
 *             iterator
 *         """
 *         yield self.id             # <<<<<<<<<<<<<<
 *         yield self.keys
 *         yield self.vals
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6691, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6692
 *         """
 *         yield self.id
 *         yield self.keys             # <<<<<<<<<<<<<<
 *         yield self.vals
 *         yield self.info
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6692, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6693
 *         yield self.id
 *         yield self.keys
 *         yield self.vals             # <<<<<<<<<<<<<<
 *         yield self.info
 *         yield self.lat
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6693, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6694
 *         yield self.keys
 *         yield self.vals
 *         yield self.info             # <<<<<<<<<<<<<<
 *         yield self.lat
 *         yield self.lon
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6694, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6695
 *         yield self.vals
 *         yield self.info
 *         yield self.lat             # <<<<<<<<<<<<<<
 *         yield self.lon
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6695, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6696
 *         yield self.info
 *         yield self.lat
 *         yield self.lon             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lon); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6696, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":6684
 *         yield 'lon'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_4Node_59generator43(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":6700
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_4Node_57Setters[] = "\n        Iterator over functions to set the fields in a message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_4Node_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_57Setters(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_57Setters(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_43_Setters(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_43_Setters, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 6700, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_4Node_59generator43, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Setters, __pyx_n_s_Node_Setters, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 6700, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.Setters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6707
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Node_7Setters_1setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_7Setters_1setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Node_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_7Setters_setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":6708
 *         """
 *         def setter(value):
 *             self.id = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 6708, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_id, __pyx_v_value) < 0) __PYX_ERR(0, 6708, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6707
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6710
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Node_7Setters_3setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_7Setters_3setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Node_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_7Setters_2setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":6711
 *         yield setter
 *         def setter(value):
 *             self.keys = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 6711, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_keys, __pyx_v_value) < 0) __PYX_ERR(0, 6711, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6710
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6713
 *             self.keys = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.vals = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Node_7Setters_5setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_7Setters_5setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Node_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_7Setters_4setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":6714
 *         yield setter
 *         def setter(value):
 *             self.vals = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 6714, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_vals, __pyx_v_value) < 0) __PYX_ERR(0, 6714, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6713
 *             self.keys = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.vals = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6716
 *             self.vals = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.info = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Node_7Setters_7setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_7Setters_7setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Node_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_7Setters_6setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":6717
 *         yield setter
 *         def setter(value):
 *             self.info = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 6717, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_info, __pyx_v_value) < 0) __PYX_ERR(0, 6717, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6716
 *             self.vals = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.info = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6719
 *             self.info = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lat = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Node_7Setters_9setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_7Setters_9setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Node_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_7Setters_8setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":6720
 *         yield setter
 *         def setter(value):
 *             self.lat = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 6720, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lat, __pyx_v_value) < 0) __PYX_ERR(0, 6720, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6719
 *             self.info = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lat = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6722
 *             self.lat = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lon = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_7Setters_11setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_4Node_7Setters_11setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_7Setters_11setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_4Node_7Setters_11setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_7Setters_10setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_7Setters_10setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":6723
 *         yield setter
 *         def setter(value):
 *             self.lon = value             # <<<<<<<<<<<<<<
 *         yield setter
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 6723, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lon, __pyx_v_value) < 0) __PYX_ERR(0, 6723, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6722
 *             self.lat = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lon = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6700
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

static PyObject *__pyx_gb_12pyrosm_proto_4Node_59generator43(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6700, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6707
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Node_7Setters_1setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_setter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6709
 *         def setter(value):
 *             self.id = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.keys = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6709, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6710
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Node_7Setters_3setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6712
 *         def setter(value):
 *             self.keys = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.vals = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6712, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6713
 *             self.keys = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.vals = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Node_7Setters_5setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6715
 *         def setter(value):
 *             self.vals = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.info = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6715, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6716
 *             self.vals = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.info = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Node_7Setters_7setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6718
 *         def setter(value):
 *             self.info = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.lat = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6718, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6719
 *             self.info = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lat = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Node_7Setters_9setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6721
 *         def setter(value):
 *             self.lat = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.lon = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6721, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6722
 *             self.lat = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lon = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_4Node_7Setters_11setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6724
 *         def setter(value):
 *             self.lon = value
 *         yield setter             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 6724, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":6700
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

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

/* "pyrosm_proto.pxd":378
 *     cdef uint64_t __field_bitmap0
 * 
 *     cdef public bint _is_present_in_parent             # <<<<<<<<<<<<<<
 *     cdef bytes _cached_serialization
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Node_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_21_is_present_in_parent___get__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_present_in_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 378, __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("pyrosm_proto.Node._is_present_in_parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_4Node_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_4Node_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_4Node_21_is_present_in_parent_2__set__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_4Node_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 378, __pyx_L1_error)
  __pyx_v_self->_is_present_in_parent = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Node._is_present_in_parent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_61__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Node_61__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_12pyrosm_proto_4Node_60__reduce_cython__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__141, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Node.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_4Node_63__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_4Node_63__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_12pyrosm_proto_4Node_62__setstate_cython__(((struct __pyx_obj_12pyrosm_proto_Node *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_12pyrosm_proto_4Node_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Node *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__142, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Node.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6731
 * cdef class DenseNodes:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10DenseNodes_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_10DenseNodes_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes___cinit__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static int __pyx_pf_12pyrosm_proto_10DenseNodes___cinit__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrosm_proto.pyx":6732
 * 
 *     def __cinit__(self):
 *         self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

  /* "pyrosm_proto.pyx":6731
 * cdef class DenseNodes:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

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

/* "pyrosm_proto.pyx":6734
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._id is not None:
 */

/* Python wrapper */
static void __pyx_pw_12pyrosm_proto_10DenseNodes_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrosm_proto_10DenseNodes_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrosm_proto_10DenseNodes_2__dealloc__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static void __pyx_pf_12pyrosm_proto_10DenseNodes_2__dealloc__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrosm_proto.pyx":6736
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._id is not None:             # <<<<<<<<<<<<<<
 *             self._id._listener = <PyObject *>null_listener
 *         if self._denseinfo is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_id) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6737
 *         # Remove any references to self from child messages or repeated fields
 *         if self._id is not None:
 *             self._id._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._denseinfo is not None:
 *             self._denseinfo._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_id->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6736
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._id is not None:             # <<<<<<<<<<<<<<
 *             self._id._listener = <PyObject *>null_listener
 *         if self._denseinfo is not None:
 */
  }

  /* "pyrosm_proto.pyx":6738
 *         if self._id is not None:
 *             self._id._listener = <PyObject *>null_listener
 *         if self._denseinfo is not None:             # <<<<<<<<<<<<<<
 *             self._denseinfo._listener = <PyObject *>null_listener
 *         if self._lat is not None:
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_denseinfo) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":6739
 *             self._id._listener = <PyObject *>null_listener
 *         if self._denseinfo is not None:
 *             self._denseinfo._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._lat is not None:
 *             self._lat._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_denseinfo->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6738
 *         if self._id is not None:
 *             self._id._listener = <PyObject *>null_listener
 *         if self._denseinfo is not None:             # <<<<<<<<<<<<<<
 *             self._denseinfo._listener = <PyObject *>null_listener
 *         if self._lat is not None:
 */
  }

  /* "pyrosm_proto.pyx":6740
 *         if self._denseinfo is not None:
 *             self._denseinfo._listener = <PyObject *>null_listener
 *         if self._lat is not None:             # <<<<<<<<<<<<<<
 *             self._lat._listener = <PyObject *>null_listener
 *         if self._lon is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_lat) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6741
 *             self._denseinfo._listener = <PyObject *>null_listener
 *         if self._lat is not None:
 *             self._lat._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._lon is not None:
 *             self._lon._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_lat->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6740
 *         if self._denseinfo is not None:
 *             self._denseinfo._listener = <PyObject *>null_listener
 *         if self._lat is not None:             # <<<<<<<<<<<<<<
 *             self._lat._listener = <PyObject *>null_listener
 *         if self._lon is not None:
 */
  }

  /* "pyrosm_proto.pyx":6742
 *         if self._lat is not None:
 *             self._lat._listener = <PyObject *>null_listener
 *         if self._lon is not None:             # <<<<<<<<<<<<<<
 *             self._lon._listener = <PyObject *>null_listener
 *         if self._keys_vals is not None:
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_lon) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":6743
 *             self._lat._listener = <PyObject *>null_listener
 *         if self._lon is not None:
 *             self._lon._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._keys_vals is not None:
 *             self._keys_vals._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_lon->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6742
 *         if self._lat is not None:
 *             self._lat._listener = <PyObject *>null_listener
 *         if self._lon is not None:             # <<<<<<<<<<<<<<
 *             self._lon._listener = <PyObject *>null_listener
 *         if self._keys_vals is not None:
 */
  }

  /* "pyrosm_proto.pyx":6744
 *         if self._lon is not None:
 *             self._lon._listener = <PyObject *>null_listener
 *         if self._keys_vals is not None:             # <<<<<<<<<<<<<<
 *             self._keys_vals._listener = <PyObject *>null_listener
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_keys_vals) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6745
 *             self._lon._listener = <PyObject *>null_listener
 *         if self._keys_vals is not None:
 *             self._keys_vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, **kwargs):
 */
    __pyx_v_self->_keys_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6744
 *         if self._lon is not None:
 *             self._lon._listener = <PyObject *>null_listener
 *         if self._keys_vals is not None:             # <<<<<<<<<<<<<<
 *             self._keys_vals._listener = <PyObject *>null_listener
 * 
 */
  }

  /* "pyrosm_proto.pyx":6734
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._id is not None:
 */

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

/* "pyrosm_proto.pyx":6747
 *             self._keys_vals._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10DenseNodes_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_10DenseNodes_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_4__init__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), __pyx_v_kwargs);

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

static int __pyx_pf_12pyrosm_proto_10DenseNodes_4__init__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_field_name = NULL;
  PyObject *__pyx_v_field_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrosm_proto.pyx":6748
 * 
 *     def __init__(self, **kwargs):
 *         self.reset()             # <<<<<<<<<<<<<<
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6749
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 6749, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":6750
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('denseinfo',):
 */
    __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6750, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6750, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 6750, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6750, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 6750, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6750, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 6750, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 6750, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6750, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6750, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6750, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 6750, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 6750, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":6751
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('denseinfo',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "pyrosm_proto.pyx":6752
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('denseinfo',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('id','lat','lon','keys_vals',):
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_denseinfo, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 6752, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_13 = (__pyx_t_1 != 0);
          if (__pyx_t_13) {

            /* "pyrosm_proto.pyx":6753
 *                 try:
 *                     if field_name in ('denseinfo',):
 *                         getattr(self, field_name).MergeFrom(field_value)             # <<<<<<<<<<<<<<
 *                     elif field_name in ('id','lat','lon','keys_vals',):
 *                         getattr(self, field_name).extend(field_value)
 */
            __pyx_t_7 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6753, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6753, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_7 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_7)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6753, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":6752
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('denseinfo',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('id','lat','lon','keys_vals',):
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":6754
 *                     if field_name in ('denseinfo',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('id','lat','lon','keys_vals',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_id, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 6754, __pyx_L8_error)
          if (!__pyx_t_1) {
          } else {
            __pyx_t_13 = __pyx_t_1;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_lat, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 6754, __pyx_L8_error)
          if (!__pyx_t_1) {
          } else {
            __pyx_t_13 = __pyx_t_1;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_lon, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 6754, __pyx_L8_error)
          if (!__pyx_t_1) {
          } else {
            __pyx_t_13 = __pyx_t_1;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_keys_vals, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 6754, __pyx_L8_error)
          __pyx_t_13 = __pyx_t_1;
          __pyx_L17_bool_binop_done:;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_1 = (__pyx_t_13 != 0);
          if (__pyx_t_1) {

            /* "pyrosm_proto.pyx":6755
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('id','lat','lon','keys_vals',):
 *                         getattr(self, field_name).extend(field_value)             # <<<<<<<<<<<<<<
 *                     else:
 *                         setattr(self, field_name, field_value)
 */
            __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6755, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_extend); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6755, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
              __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
              if (likely(__pyx_t_6)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_7, function);
              }
            }
            __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6755, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":6754
 *                     if field_name in ('denseinfo',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('id','lat','lon','keys_vals',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":6757
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 *                         setattr(self, field_name, field_value)             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 */
          /*else*/ {
            __pyx_t_14 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name, __pyx_v_field_value); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6757, __pyx_L8_error)
          }
          __pyx_L16:;

          /* "pyrosm_proto.pyx":6751
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('denseinfo',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L15_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrosm_proto.pyx":6758
 *                     else:
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return
 */
        __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_15) {
          __Pyx_AddTraceback("pyrosm_proto.DenseNodes.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 6758, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_6);

          /* "pyrosm_proto.pyx":6759
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))             # <<<<<<<<<<<<<<
 *         return
 * 
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6759, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_field_name);
          __Pyx_GIVEREF(__pyx_v_field_name);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_field_name);
          __pyx_t_16 = __Pyx_PyString_Format(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 6759, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6759, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 6759, __pyx_L10_except_error)
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;

        /* "pyrosm_proto.pyx":6751
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('denseinfo',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L15_try_end:;
      }

      /* "pyrosm_proto.pyx":6750
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('denseinfo',):
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":6749
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  }

  /* "pyrosm_proto.pyx":6760
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6747
 *             self._keys_vals._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XDECREF(__pyx_v_field_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6762
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'id',
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_6__str__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_6__str__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_messages = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyrosm_proto.pyx":6763
 * 
 *     def __str__(self):
 *         fields = [             # <<<<<<<<<<<<<<
 *                           'id',
 *                           'lat',
 */
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_id);
  __Pyx_INCREF(__pyx_n_s_lat);
  __Pyx_GIVEREF(__pyx_n_s_lat);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_lat);
  __Pyx_INCREF(__pyx_n_s_lon);
  __Pyx_GIVEREF(__pyx_n_s_lon);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_lon);
  __Pyx_INCREF(__pyx_n_s_keys_vals);
  __Pyx_GIVEREF(__pyx_n_s_keys_vals);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_keys_vals);
  __pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6768
 *                           'lon',
 *                           'keys_vals',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]             # <<<<<<<<<<<<<<
 *         messages = [
 *                             'denseinfo',]
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 6768, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6768, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6768, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6768, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6768, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 6768, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6769
 *                           'keys_vals',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = [             # <<<<<<<<<<<<<<
 *                             'denseinfo',]
 *         for message in messages:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_denseinfo);
  __Pyx_GIVEREF(__pyx_n_s_denseinfo);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_denseinfo);
  __pyx_v_messages = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6771
 *         messages = [
 *                             'denseinfo',]
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  __pyx_t_1 = __pyx_v_messages; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 6771, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":6772
 *                             'denseinfo',]
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))             # <<<<<<<<<<<<<<
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 6772, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":6773
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    __pyx_t_4 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 6773, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 6773, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6773, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 6773, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6773, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 6773, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":6774
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))             # <<<<<<<<<<<<<<
 *             components.append('}')
 *         return '\n'.join(components)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_line);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 6774, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":6773
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":6775
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 *             components.append('}')             # <<<<<<<<<<<<<<
 *         return '\n'.join(components)
 * 
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_kp_s__2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 6775, __pyx_L1_error)

    /* "pyrosm_proto.pyx":6771
 *         messages = [
 *                             'denseinfo',]
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6776
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 *         return '\n'.join(components)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6762
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'id',
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_messages);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6778
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_10DenseNodes_reset(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("reset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6778, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10DenseNodes_9reset)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6778, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":6781
 *         # reset values and populate defaults
 * 
 *         self.__field_bitmap0 = 0             # <<<<<<<<<<<<<<
 * 
 *         if self._id is not None:
 */
  __pyx_v_self->__pyx___field_bitmap0 = 0;

  /* "pyrosm_proto.pyx":6783
 *         self.__field_bitmap0 = 0
 * 
 *         if self._id is not None:             # <<<<<<<<<<<<<<
 *             self._id._listener = <PyObject *>null_listener
 *         self._id = Int64List.__new__(Int64List)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_id) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":6784
 * 
 *         if self._id is not None:
 *             self._id._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._id = Int64List.__new__(Int64List)
 *         self._id._listener = <PyObject *>self
 */
    __pyx_v_self->_id->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6783
 *         self.__field_bitmap0 = 0
 * 
 *         if self._id is not None:             # <<<<<<<<<<<<<<
 *             self._id._listener = <PyObject *>null_listener
 *         self._id = Int64List.__new__(Int64List)
 */
  }

  /* "pyrosm_proto.pyx":6785
 *         if self._id is not None:
 *             self._id._listener = <PyObject *>null_listener
 *         self._id = Int64List.__new__(Int64List)             # <<<<<<<<<<<<<<
 *         self._id._listener = <PyObject *>self
 *         if self._denseinfo is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int64List)))) __PYX_ERR(0, 6785, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_id);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_id));
  __pyx_v_self->_id = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6786
 *             self._id._listener = <PyObject *>null_listener
 *         self._id = Int64List.__new__(Int64List)
 *         self._id._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._denseinfo is not None:
 *             self._denseinfo._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_id->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":6787
 *         self._id = Int64List.__new__(Int64List)
 *         self._id._listener = <PyObject *>self
 *         if self._denseinfo is not None:             # <<<<<<<<<<<<<<
 *             self._denseinfo._listener = <PyObject *>null_listener
 *         self._denseinfo = None
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_denseinfo) != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6788
 *         self._id._listener = <PyObject *>self
 *         if self._denseinfo is not None:
 *             self._denseinfo._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._denseinfo = None
 *         if self._lat is not None:
 */
    __pyx_v_self->_denseinfo->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6787
 *         self._id = Int64List.__new__(Int64List)
 *         self._id._listener = <PyObject *>self
 *         if self._denseinfo is not None:             # <<<<<<<<<<<<<<
 *             self._denseinfo._listener = <PyObject *>null_listener
 *         self._denseinfo = None
 */
  }

  /* "pyrosm_proto.pyx":6789
 *         if self._denseinfo is not None:
 *             self._denseinfo._listener = <PyObject *>null_listener
 *         self._denseinfo = None             # <<<<<<<<<<<<<<
 *         if self._lat is not None:
 *             self._lat._listener = <PyObject *>null_listener
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_denseinfo);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_denseinfo));
  __pyx_v_self->_denseinfo = ((struct __pyx_obj_12pyrosm_proto_DenseInfo *)Py_None);

  /* "pyrosm_proto.pyx":6790
 *             self._denseinfo._listener = <PyObject *>null_listener
 *         self._denseinfo = None
 *         if self._lat is not None:             # <<<<<<<<<<<<<<
 *             self._lat._listener = <PyObject *>null_listener
 *         self._lat = Int64List.__new__(Int64List)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_lat) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":6791
 *         self._denseinfo = None
 *         if self._lat is not None:
 *             self._lat._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._lat = Int64List.__new__(Int64List)
 *         self._lat._listener = <PyObject *>self
 */
    __pyx_v_self->_lat->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6790
 *             self._denseinfo._listener = <PyObject *>null_listener
 *         self._denseinfo = None
 *         if self._lat is not None:             # <<<<<<<<<<<<<<
 *             self._lat._listener = <PyObject *>null_listener
 *         self._lat = Int64List.__new__(Int64List)
 */
  }

  /* "pyrosm_proto.pyx":6792
 *         if self._lat is not None:
 *             self._lat._listener = <PyObject *>null_listener
 *         self._lat = Int64List.__new__(Int64List)             # <<<<<<<<<<<<<<
 *         self._lat._listener = <PyObject *>self
 *         if self._lon is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int64List)))) __PYX_ERR(0, 6792, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_lat);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_lat));
  __pyx_v_self->_lat = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6793
 *             self._lat._listener = <PyObject *>null_listener
 *         self._lat = Int64List.__new__(Int64List)
 *         self._lat._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._lon is not None:
 *             self._lon._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_lat->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":6794
 *         self._lat = Int64List.__new__(Int64List)
 *         self._lat._listener = <PyObject *>self
 *         if self._lon is not None:             # <<<<<<<<<<<<<<
 *             self._lon._listener = <PyObject *>null_listener
 *         self._lon = Int64List.__new__(Int64List)
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_lon) != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6795
 *         self._lat._listener = <PyObject *>self
 *         if self._lon is not None:
 *             self._lon._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._lon = Int64List.__new__(Int64List)
 *         self._lon._listener = <PyObject *>self
 */
    __pyx_v_self->_lon->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6794
 *         self._lat = Int64List.__new__(Int64List)
 *         self._lat._listener = <PyObject *>self
 *         if self._lon is not None:             # <<<<<<<<<<<<<<
 *             self._lon._listener = <PyObject *>null_listener
 *         self._lon = Int64List.__new__(Int64List)
 */
  }

  /* "pyrosm_proto.pyx":6796
 *         if self._lon is not None:
 *             self._lon._listener = <PyObject *>null_listener
 *         self._lon = Int64List.__new__(Int64List)             # <<<<<<<<<<<<<<
 *         self._lon._listener = <PyObject *>self
 *         if self._keys_vals is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int64List)))) __PYX_ERR(0, 6796, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_lon);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_lon));
  __pyx_v_self->_lon = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6797
 *             self._lon._listener = <PyObject *>null_listener
 *         self._lon = Int64List.__new__(Int64List)
 *         self._lon._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._keys_vals is not None:
 *             self._keys_vals._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_lon->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":6798
 *         self._lon = Int64List.__new__(Int64List)
 *         self._lon._listener = <PyObject *>self
 *         if self._keys_vals is not None:             # <<<<<<<<<<<<<<
 *             self._keys_vals._listener = <PyObject *>null_listener
 *         self._keys_vals = Int32List.__new__(Int32List)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_keys_vals) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":6799
 *         self._lon._listener = <PyObject *>self
 *         if self._keys_vals is not None:
 *             self._keys_vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._keys_vals = Int32List.__new__(Int32List)
 *         self._keys_vals._listener = <PyObject *>self
 */
    __pyx_v_self->_keys_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6798
 *         self._lon = Int64List.__new__(Int64List)
 *         self._lon._listener = <PyObject *>self
 *         if self._keys_vals is not None:             # <<<<<<<<<<<<<<
 *             self._keys_vals._listener = <PyObject *>null_listener
 *         self._keys_vals = Int32List.__new__(Int32List)
 */
  }

  /* "pyrosm_proto.pyx":6800
 *         if self._keys_vals is not None:
 *             self._keys_vals._listener = <PyObject *>null_listener
 *         self._keys_vals = Int32List.__new__(Int32List)             # <<<<<<<<<<<<<<
 *         self._keys_vals._listener = <PyObject *>self
 *         return
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int32List)))) __PYX_ERR(0, 6800, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_keys_vals);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys_vals));
  __pyx_v_self->_keys_vals = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":6801
 *             self._keys_vals._listener = <PyObject *>null_listener
 *         self._keys_vals = Int32List.__new__(Int32List)
 *         self._keys_vals._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_v_self->_keys_vals->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":6802
 *         self._keys_vals = Int32List.__new__(Int32List)
 *         self._keys_vals._listener = <PyObject *>self
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6778
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

  /* 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_WriteUnraisable("pyrosm_proto.DenseNodes.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_8reset(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_8reset(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10DenseNodes_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6778, __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("pyrosm_proto.DenseNodes.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6806
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._id
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_2id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_2id___get__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_2id___get__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":6807
 *     @property
 *     def id(self):
 *         return self._id             # <<<<<<<<<<<<<<
 * 
 *     @id.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_id));
  __pyx_r = ((PyObject *)__pyx_v_self->_id);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6806
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._id
 * 
 */

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

/* "pyrosm_proto.pyx":6810
 * 
 *     @id.setter
 *     def id(self, value):             # <<<<<<<<<<<<<<
 *         if self._id is not None:
 *             self._id._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10DenseNodes_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_10DenseNodes_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_2id_2__set__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_10DenseNodes_2id_2__set__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int64_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":6811
 *     @id.setter
 *     def id(self, value):
 *         if self._id is not None:             # <<<<<<<<<<<<<<
 *             self._id._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_id) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6812
 *     def id(self, value):
 *         if self._id is not None:
 *             self._id._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_id->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6811
 *     @id.setter
 *     def id(self, value):
 *         if self._id is not None:             # <<<<<<<<<<<<<<
 *             self._id._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":6814
 *             self._id._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":6815
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":6816
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_int64_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 6816, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":6817
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":6815
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":6818
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":6815
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":6821
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._id = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6822
 *         cdef int i
 *         if memview_available == 1:
 *             self._id = Int64List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._id.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6822, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int64_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 6822, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_id);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_id));
    __pyx_v_self->_id = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":6823
 *         if memview_available == 1:
 *             self._id = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._id.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6823, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int64_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6823, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":6824
 *             self._id = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._id.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._id = Int64List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6824, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 6824, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_id->__pyx_vtab)->append(__pyx_v_self->_id, (*((int64_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":6825
 *             for i in range(memview.size):
 *                 self._id.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._id = Int64List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6821
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._id = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":6826
 *                 self._id.append(memview[i])
 *             return
 *         self._id = Int64List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._id.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 6826, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_id);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_id));
  __pyx_v_self->_id = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":6827
 *             return
 *         self._id = Int64List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._id.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 6827, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 6827, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6827, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 6827, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6827, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 6827, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":6828
 *         self._id = Int64List(listener=self)
 *         for val in value:
 *             self._id.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_int64_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6828, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_id->__pyx_vtab)->append(__pyx_v_self->_id, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":6827
 *             return
 *         self._id = Int64List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._id.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":6829
 *         for val in value:
 *             self._id.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6810
 * 
 *     @id.setter
 *     def id(self, value):             # <<<<<<<<<<<<<<
 *         if self._id is not None:
 *             self._id._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6832
 * 
 *     @property
 *     def denseinfo(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._denseinfo is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_9denseinfo_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_9denseinfo_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_9denseinfo___get__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_9denseinfo___get__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":6834
 *     def denseinfo(self):
 *         # lazy init sub messages
 *         if self._denseinfo is None:             # <<<<<<<<<<<<<<
 *             self._denseinfo = DenseInfo.__new__(DenseInfo)
 *             self._denseinfo.reset()
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_denseinfo) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6835
 *         # lazy init sub messages
 *         if self._denseinfo is None:
 *             self._denseinfo = DenseInfo.__new__(DenseInfo)             # <<<<<<<<<<<<<<
 *             self._denseinfo.reset()
 *             self._denseinfo._listener = <PyObject *>self
 */
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_DenseInfo(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_DenseInfo), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6835, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __Pyx_GOTREF(__pyx_v_self->_denseinfo);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_denseinfo));
    __pyx_v_self->_denseinfo = ((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":6836
 *         if self._denseinfo is None:
 *             self._denseinfo = DenseInfo.__new__(DenseInfo)
 *             self._denseinfo.reset()             # <<<<<<<<<<<<<<
 *             self._denseinfo._listener = <PyObject *>self
 *         return self._denseinfo
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->_denseinfo->__pyx_vtab)->reset(__pyx_v_self->_denseinfo, 0);

    /* "pyrosm_proto.pyx":6837
 *             self._denseinfo = DenseInfo.__new__(DenseInfo)
 *             self._denseinfo.reset()
 *             self._denseinfo._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return self._denseinfo
 * 
 */
    __pyx_v_self->_denseinfo->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":6834
 *     def denseinfo(self):
 *         # lazy init sub messages
 *         if self._denseinfo is None:             # <<<<<<<<<<<<<<
 *             self._denseinfo = DenseInfo.__new__(DenseInfo)
 *             self._denseinfo.reset()
 */
  }

  /* "pyrosm_proto.pyx":6838
 *             self._denseinfo.reset()
 *             self._denseinfo._listener = <PyObject *>self
 *         return self._denseinfo             # <<<<<<<<<<<<<<
 * 
 *     @denseinfo.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_denseinfo));
  __pyx_r = ((PyObject *)__pyx_v_self->_denseinfo);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6832
 * 
 *     @property
 *     def denseinfo(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._denseinfo is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.denseinfo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6841
 * 
 *     @denseinfo.setter
 *     def denseinfo(self, value):             # <<<<<<<<<<<<<<
 *         if self._denseinfo is not None:
 *             self._denseinfo._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10DenseNodes_9denseinfo_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_10DenseNodes_9denseinfo_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_9denseinfo_2__set__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_10DenseNodes_9denseinfo_2__set__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":6842
 *     @denseinfo.setter
 *     def denseinfo(self, value):
 *         if self._denseinfo is not None:             # <<<<<<<<<<<<<<
 *             self._denseinfo._listener = <PyObject *>null_listener
 *         self._denseinfo = value
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_denseinfo) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6843
 *     def denseinfo(self, value):
 *         if self._denseinfo is not None:
 *             self._denseinfo._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._denseinfo = value
 *         self._denseinfo._listener = <PyObject *>self
 */
    __pyx_v_self->_denseinfo->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6842
 *     @denseinfo.setter
 *     def denseinfo(self, value):
 *         if self._denseinfo is not None:             # <<<<<<<<<<<<<<
 *             self._denseinfo._listener = <PyObject *>null_listener
 *         self._denseinfo = value
 */
  }

  /* "pyrosm_proto.pyx":6844
 *         if self._denseinfo is not None:
 *             self._denseinfo._listener = <PyObject *>null_listener
 *         self._denseinfo = value             # <<<<<<<<<<<<<<
 *         self._denseinfo._listener = <PyObject *>self
 *         self._Modified()
 */
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_12pyrosm_proto_DenseInfo))))) __PYX_ERR(0, 6844, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_denseinfo);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_denseinfo));
  __pyx_v_self->_denseinfo = ((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":6845
 *             self._denseinfo._listener = <PyObject *>null_listener
 *         self._denseinfo = value
 *         self._denseinfo._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_v_self->_denseinfo->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":6846
 *         self._denseinfo = value
 *         self._denseinfo._listener = <PyObject *>self
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6841
 * 
 *     @denseinfo.setter
 *     def denseinfo(self, value):             # <<<<<<<<<<<<<<
 *         if self._denseinfo is not None:
 *             self._denseinfo._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.denseinfo.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6849
 * 
 *     @property
 *     def lat(self):             # <<<<<<<<<<<<<<
 *         return self._lat
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_3lat_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_3lat_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_3lat___get__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_3lat___get__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":6850
 *     @property
 *     def lat(self):
 *         return self._lat             # <<<<<<<<<<<<<<
 * 
 *     @lat.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_lat));
  __pyx_r = ((PyObject *)__pyx_v_self->_lat);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6849
 * 
 *     @property
 *     def lat(self):             # <<<<<<<<<<<<<<
 *         return self._lat
 * 
 */

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

/* "pyrosm_proto.pyx":6853
 * 
 *     @lat.setter
 *     def lat(self, value):             # <<<<<<<<<<<<<<
 *         if self._lat is not None:
 *             self._lat._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10DenseNodes_3lat_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_10DenseNodes_3lat_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_3lat_2__set__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_10DenseNodes_3lat_2__set__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int64_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":6854
 *     @lat.setter
 *     def lat(self, value):
 *         if self._lat is not None:             # <<<<<<<<<<<<<<
 *             self._lat._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_lat) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6855
 *     def lat(self, value):
 *         if self._lat is not None:
 *             self._lat._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_lat->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6854
 *     @lat.setter
 *     def lat(self, value):
 *         if self._lat is not None:             # <<<<<<<<<<<<<<
 *             self._lat._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":6857
 *             self._lat._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":6858
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":6859
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_int64_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 6859, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":6860
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":6858
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":6861
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":6858
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":6864
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._lat = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6865
 *         cdef int i
 *         if memview_available == 1:
 *             self._lat = Int64List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._lat.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6865, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int64_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 6865, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_lat);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_lat));
    __pyx_v_self->_lat = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":6866
 *         if memview_available == 1:
 *             self._lat = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._lat.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6866, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int64_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6866, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":6867
 *             self._lat = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._lat.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._lat = Int64List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6867, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 6867, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_lat->__pyx_vtab)->append(__pyx_v_self->_lat, (*((int64_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6867, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":6868
 *             for i in range(memview.size):
 *                 self._lat.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._lat = Int64List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6864
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._lat = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":6869
 *                 self._lat.append(memview[i])
 *             return
 *         self._lat = Int64List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._lat.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 6869, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_lat);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_lat));
  __pyx_v_self->_lat = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":6870
 *             return
 *         self._lat = Int64List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._lat.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 6870, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 6870, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6870, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 6870, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6870, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 6870, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":6871
 *         self._lat = Int64List(listener=self)
 *         for val in value:
 *             self._lat.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_int64_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6871, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_lat->__pyx_vtab)->append(__pyx_v_self->_lat, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":6870
 *             return
 *         self._lat = Int64List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._lat.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":6872
 *         for val in value:
 *             self._lat.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6853
 * 
 *     @lat.setter
 *     def lat(self, value):             # <<<<<<<<<<<<<<
 *         if self._lat is not None:
 *             self._lat._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.lat.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6875
 * 
 *     @property
 *     def lon(self):             # <<<<<<<<<<<<<<
 *         return self._lon
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_3lon_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_3lon_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_3lon___get__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_3lon___get__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":6876
 *     @property
 *     def lon(self):
 *         return self._lon             # <<<<<<<<<<<<<<
 * 
 *     @lon.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_lon));
  __pyx_r = ((PyObject *)__pyx_v_self->_lon);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6875
 * 
 *     @property
 *     def lon(self):             # <<<<<<<<<<<<<<
 *         return self._lon
 * 
 */

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

/* "pyrosm_proto.pyx":6879
 * 
 *     @lon.setter
 *     def lon(self, value):             # <<<<<<<<<<<<<<
 *         if self._lon is not None:
 *             self._lon._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10DenseNodes_3lon_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_10DenseNodes_3lon_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_3lon_2__set__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_10DenseNodes_3lon_2__set__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int64_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":6880
 *     @lon.setter
 *     def lon(self, value):
 *         if self._lon is not None:             # <<<<<<<<<<<<<<
 *             self._lon._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_lon) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6881
 *     def lon(self, value):
 *         if self._lon is not None:
 *             self._lon._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_lon->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6880
 *     @lon.setter
 *     def lon(self, value):
 *         if self._lon is not None:             # <<<<<<<<<<<<<<
 *             self._lon._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":6883
 *             self._lon._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":6884
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":6885
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_int64_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 6885, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":6886
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":6884
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":6887
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":6884
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":6890
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._lon = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6891
 *         cdef int i
 *         if memview_available == 1:
 *             self._lon = Int64List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._lon.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6891, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int64_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 6891, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_lon);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_lon));
    __pyx_v_self->_lon = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":6892
 *         if memview_available == 1:
 *             self._lon = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._lon.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6892, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int64_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6892, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":6893
 *             self._lon = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._lon.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._lon = Int64List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6893, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 6893, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_lon->__pyx_vtab)->append(__pyx_v_self->_lon, (*((int64_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6893, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":6894
 *             for i in range(memview.size):
 *                 self._lon.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._lon = Int64List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6890
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._lon = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":6895
 *                 self._lon.append(memview[i])
 *             return
 *         self._lon = Int64List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._lon.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 6895, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_lon);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_lon));
  __pyx_v_self->_lon = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":6896
 *             return
 *         self._lon = Int64List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._lon.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 6896, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 6896, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6896, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 6896, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6896, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 6896, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":6897
 *         self._lon = Int64List(listener=self)
 *         for val in value:
 *             self._lon.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_int64_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6897, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_lon->__pyx_vtab)->append(__pyx_v_self->_lon, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":6896
 *             return
 *         self._lon = Int64List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._lon.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":6898
 *         for val in value:
 *             self._lon.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6879
 * 
 *     @lon.setter
 *     def lon(self, value):             # <<<<<<<<<<<<<<
 *         if self._lon is not None:
 *             self._lon._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.lon.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6901
 * 
 *     @property
 *     def keys_vals(self):             # <<<<<<<<<<<<<<
 *         return self._keys_vals
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_9keys_vals_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_9keys_vals_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_9keys_vals___get__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_9keys_vals___get__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":6902
 *     @property
 *     def keys_vals(self):
 *         return self._keys_vals             # <<<<<<<<<<<<<<
 * 
 *     @keys_vals.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_keys_vals));
  __pyx_r = ((PyObject *)__pyx_v_self->_keys_vals);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6901
 * 
 *     @property
 *     def keys_vals(self):             # <<<<<<<<<<<<<<
 *         return self._keys_vals
 * 
 */

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

/* "pyrosm_proto.pyx":6905
 * 
 *     @keys_vals.setter
 *     def keys_vals(self, value):             # <<<<<<<<<<<<<<
 *         if self._keys_vals is not None:
 *             self._keys_vals._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10DenseNodes_9keys_vals_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_10DenseNodes_9keys_vals_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_9keys_vals_2__set__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_10DenseNodes_9keys_vals_2__set__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int32_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":6906
 *     @keys_vals.setter
 *     def keys_vals(self, value):
 *         if self._keys_vals is not None:             # <<<<<<<<<<<<<<
 *             self._keys_vals._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_keys_vals) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6907
 *     def keys_vals(self, value):
 *         if self._keys_vals is not None:
 *             self._keys_vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_keys_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":6906
 *     @keys_vals.setter
 *     def keys_vals(self, value):
 *         if self._keys_vals is not None:             # <<<<<<<<<<<<<<
 *             self._keys_vals._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":6909
 *             self._keys_vals._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":6910
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":6911
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_int32_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 6911, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":6912
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":6910
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":6913
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":6910
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":6916
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._keys_vals = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":6917
 *         cdef int i
 *         if memview_available == 1:
 *             self._keys_vals = Int32List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._keys_vals.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6917, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int32_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 6917, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_keys_vals);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys_vals));
    __pyx_v_self->_keys_vals = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":6918
 *         if memview_available == 1:
 *             self._keys_vals = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._keys_vals.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6918, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int32_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6918, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":6919
 *             self._keys_vals = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._keys_vals.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._keys_vals = Int32List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 6919, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 6919, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_keys_vals->__pyx_vtab)->append(__pyx_v_self->_keys_vals, (*((int32_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6919, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":6920
 *             for i in range(memview.size):
 *                 self._keys_vals.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._keys_vals = Int32List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":6916
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._keys_vals = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":6921
 *                 self._keys_vals.append(memview[i])
 *             return
 *         self._keys_vals = Int32List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._keys_vals.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 6921, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_keys_vals);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys_vals));
  __pyx_v_self->_keys_vals = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":6922
 *             return
 *         self._keys_vals = Int32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._keys_vals.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 6922, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 6922, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6922, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 6922, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6922, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 6922, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":6923
 *         self._keys_vals = Int32List(listener=self)
 *         for val in value:
 *             self._keys_vals.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_int32_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6923, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_keys_vals->__pyx_vtab)->append(__pyx_v_self->_keys_vals, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":6922
 *             return
 *         self._keys_vals = Int32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._keys_vals.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":6924
 *         for val in value:
 *             self._keys_vals.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6905
 * 
 *     @keys_vals.setter
 *     def keys_vals(self, value):             # <<<<<<<<<<<<<<
 *         if self._keys_vals is not None:
 *             self._keys_vals._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.keys_vals.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6927
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

static int __pyx_f_12pyrosm_proto_10DenseNodes__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, int __pyx_v_cache) {
  int __pyx_v_current_offset;
  int64_t __pyx_v_key;
  int64_t __pyx_v_field_size;
  int64_t __pyx_v_id_marker;
  int64_t __pyx_v_id_elt;
  int64_t __pyx_v_lat_marker;
  int64_t __pyx_v_lat_elt;
  int64_t __pyx_v_lon_marker;
  int64_t __pyx_v_lon_elt;
  int64_t __pyx_v_keys_vals_marker;
  int32_t __pyx_v_keys_vals_elt;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_protobuf_deserialize", 0);

  /* "pyrosm_proto.pyx":6928
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):
 *         cdef int current_offset = 0             # <<<<<<<<<<<<<<
 *         cdef int64_t key
 *         cdef int64_t field_size
 */
  __pyx_v_current_offset = 0;

  /* "pyrosm_proto.pyx":6939
 *         cdef int64_t keys_vals_marker
 *         cdef int32_t keys_vals_elt
 *         while current_offset < size:             # <<<<<<<<<<<<<<
 *             key = get_varint64(memory, &current_offset)
 *             # id
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_current_offset < __pyx_v_size) != 0);
    if (!__pyx_t_1) break;

    /* "pyrosm_proto.pyx":6940
 *         cdef int32_t keys_vals_elt
 *         while current_offset < size:
 *             key = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # id
 *             if key == 10:
 */
    __pyx_v_key = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

    /* "pyrosm_proto.pyx":6942
 *             key = get_varint64(memory, &current_offset)
 *             # id
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 id_marker = get_varint64(memory, &current_offset)
 *                 id_marker += current_offset
 */
    switch (__pyx_v_key) {
      case 10:

      /* "pyrosm_proto.pyx":6943
 *             # id
 *             if key == 10:
 *                 id_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 id_marker += current_offset
 * 
 */
      __pyx_v_id_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":6944
 *             if key == 10:
 *                 id_marker = get_varint64(memory, &current_offset)
 *                 id_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>id_marker:
 */
      __pyx_v_id_marker = (__pyx_v_id_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":6946
 *                 id_marker += current_offset
 * 
 *                 while current_offset < <int>id_marker:             # <<<<<<<<<<<<<<
 *                     id_elt = get_signed_varint64(memory, &current_offset)
 *                     self._id._append(id_elt)
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_current_offset < ((int)__pyx_v_id_marker)) != 0);
        if (!__pyx_t_1) break;

        /* "pyrosm_proto.pyx":6947
 * 
 *                 while current_offset < <int>id_marker:
 *                     id_elt = get_signed_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._id._append(id_elt)
 *             # denseinfo
 */
        __pyx_v_id_elt = __pyx_f_12pyrobuf_util_get_signed_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":6948
 *                 while current_offset < <int>id_marker:
 *                     id_elt = get_signed_varint64(memory, &current_offset)
 *                     self._id._append(id_elt)             # <<<<<<<<<<<<<<
 *             # denseinfo
 *             elif key == 42:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_id->__pyx_vtab)->_append(__pyx_v_self->_id, __pyx_v_id_elt);
      }

      /* "pyrosm_proto.pyx":6942
 *             key = get_varint64(memory, &current_offset)
 *             # id
 *             if key == 10:             # <<<<<<<<<<<<<<
 *                 id_marker = get_varint64(memory, &current_offset)
 *                 id_marker += current_offset
 */
      break;
      case 42:

      /* "pyrosm_proto.pyx":6951
 *             # denseinfo
 *             elif key == 42:
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 if self._denseinfo is None:
 *                     self._denseinfo = DenseInfo.__new__(DenseInfo)
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":6952
 *             elif key == 42:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._denseinfo is None:             # <<<<<<<<<<<<<<
 *                     self._denseinfo = DenseInfo.__new__(DenseInfo)
 *                     self._denseinfo._listener = <PyObject *>self
 */
      __pyx_t_1 = (((PyObject *)__pyx_v_self->_denseinfo) == Py_None);
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "pyrosm_proto.pyx":6953
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._denseinfo is None:
 *                     self._denseinfo = DenseInfo.__new__(DenseInfo)             # <<<<<<<<<<<<<<
 *                     self._denseinfo._listener = <PyObject *>self
 *                 self._denseinfo.reset()
 */
        __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_DenseInfo(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_DenseInfo), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6953, __pyx_L1_error)
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
        __Pyx_GOTREF(__pyx_v_self->_denseinfo);
        __Pyx_DECREF(((PyObject *)__pyx_v_self->_denseinfo));
        __pyx_v_self->_denseinfo = ((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyrosm_proto.pyx":6954
 *                 if self._denseinfo is None:
 *                     self._denseinfo = DenseInfo.__new__(DenseInfo)
 *                     self._denseinfo._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *                 self._denseinfo.reset()
 *                 if cache:
 */
        __pyx_v_self->_denseinfo->_listener = ((PyObject *)__pyx_v_self);

        /* "pyrosm_proto.pyx":6952
 *             elif key == 42:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._denseinfo is None:             # <<<<<<<<<<<<<<
 *                     self._denseinfo = DenseInfo.__new__(DenseInfo)
 *                     self._denseinfo._listener = <PyObject *>self
 */
      }

      /* "pyrosm_proto.pyx":6955
 *                     self._denseinfo = DenseInfo.__new__(DenseInfo)
 *                     self._denseinfo._listener = <PyObject *>self
 *                 self._denseinfo.reset()             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     self._denseinfo._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->_denseinfo->__pyx_vtab)->reset(__pyx_v_self->_denseinfo, 0);

      /* "pyrosm_proto.pyx":6956
 *                     self._denseinfo._listener = <PyObject *>self
 *                 self._denseinfo.reset()
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._denseinfo._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._denseinfo._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      __pyx_t_2 = (__pyx_v_cache != 0);
      if (__pyx_t_2) {

        /* "pyrosm_proto.pyx":6957
 *                 self._denseinfo.reset()
 *                 if cache:
 *                     self._denseinfo._cached_serialization = bytes(memory[current_offset:current_offset+field_size])             # <<<<<<<<<<<<<<
 *                 current_offset += self._denseinfo._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *             # lat
 */
        __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6957, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6957, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_self->_denseinfo->_cached_serialization);
        __Pyx_DECREF(__pyx_v_self->_denseinfo->_cached_serialization);
        __pyx_v_self->_denseinfo->_cached_serialization = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyrosm_proto.pyx":6956
 *                     self._denseinfo._listener = <PyObject *>self
 *                 self._denseinfo.reset()
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._denseinfo._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._denseinfo._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      }

      /* "pyrosm_proto.pyx":6958
 *                 if cache:
 *                     self._denseinfo._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._denseinfo._protobuf_deserialize(memory+current_offset, <int>field_size, cache)             # <<<<<<<<<<<<<<
 *             # lat
 *             elif key == 66:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->_denseinfo->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self->_denseinfo, (__pyx_v_memory + __pyx_v_current_offset), ((int)__pyx_v_field_size), __pyx_v_cache));

      /* "pyrosm_proto.pyx":6950
 *                     self._id._append(id_elt)
 *             # denseinfo
 *             elif key == 42:             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._denseinfo is None:
 */
      break;
      case 66:

      /* "pyrosm_proto.pyx":6961
 *             # lat
 *             elif key == 66:
 *                 lat_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 lat_marker += current_offset
 * 
 */
      __pyx_v_lat_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":6962
 *             elif key == 66:
 *                 lat_marker = get_varint64(memory, &current_offset)
 *                 lat_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>lat_marker:
 */
      __pyx_v_lat_marker = (__pyx_v_lat_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":6964
 *                 lat_marker += current_offset
 * 
 *                 while current_offset < <int>lat_marker:             # <<<<<<<<<<<<<<
 *                     lat_elt = get_signed_varint64(memory, &current_offset)
 *                     self._lat._append(lat_elt)
 */
      while (1) {
        __pyx_t_2 = ((__pyx_v_current_offset < ((int)__pyx_v_lat_marker)) != 0);
        if (!__pyx_t_2) break;

        /* "pyrosm_proto.pyx":6965
 * 
 *                 while current_offset < <int>lat_marker:
 *                     lat_elt = get_signed_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._lat._append(lat_elt)
 *             # lon
 */
        __pyx_v_lat_elt = __pyx_f_12pyrobuf_util_get_signed_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":6966
 *                 while current_offset < <int>lat_marker:
 *                     lat_elt = get_signed_varint64(memory, &current_offset)
 *                     self._lat._append(lat_elt)             # <<<<<<<<<<<<<<
 *             # lon
 *             elif key == 74:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_lat->__pyx_vtab)->_append(__pyx_v_self->_lat, __pyx_v_lat_elt);
      }

      /* "pyrosm_proto.pyx":6960
 *                 current_offset += self._denseinfo._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *             # lat
 *             elif key == 66:             # <<<<<<<<<<<<<<
 *                 lat_marker = get_varint64(memory, &current_offset)
 *                 lat_marker += current_offset
 */
      break;
      case 74:

      /* "pyrosm_proto.pyx":6969
 *             # lon
 *             elif key == 74:
 *                 lon_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 lon_marker += current_offset
 * 
 */
      __pyx_v_lon_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":6970
 *             elif key == 74:
 *                 lon_marker = get_varint64(memory, &current_offset)
 *                 lon_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>lon_marker:
 */
      __pyx_v_lon_marker = (__pyx_v_lon_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":6972
 *                 lon_marker += current_offset
 * 
 *                 while current_offset < <int>lon_marker:             # <<<<<<<<<<<<<<
 *                     lon_elt = get_signed_varint64(memory, &current_offset)
 *                     self._lon._append(lon_elt)
 */
      while (1) {
        __pyx_t_2 = ((__pyx_v_current_offset < ((int)__pyx_v_lon_marker)) != 0);
        if (!__pyx_t_2) break;

        /* "pyrosm_proto.pyx":6973
 * 
 *                 while current_offset < <int>lon_marker:
 *                     lon_elt = get_signed_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._lon._append(lon_elt)
 *             # keys_vals
 */
        __pyx_v_lon_elt = __pyx_f_12pyrobuf_util_get_signed_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":6974
 *                 while current_offset < <int>lon_marker:
 *                     lon_elt = get_signed_varint64(memory, &current_offset)
 *                     self._lon._append(lon_elt)             # <<<<<<<<<<<<<<
 *             # keys_vals
 *             elif key == 82:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_lon->__pyx_vtab)->_append(__pyx_v_self->_lon, __pyx_v_lon_elt);
      }

      /* "pyrosm_proto.pyx":6968
 *                     self._lat._append(lat_elt)
 *             # lon
 *             elif key == 74:             # <<<<<<<<<<<<<<
 *                 lon_marker = get_varint64(memory, &current_offset)
 *                 lon_marker += current_offset
 */
      break;
      case 82:

      /* "pyrosm_proto.pyx":6977
 *             # keys_vals
 *             elif key == 82:
 *                 keys_vals_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 keys_vals_marker += current_offset
 * 
 */
      __pyx_v_keys_vals_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":6978
 *             elif key == 82:
 *                 keys_vals_marker = get_varint64(memory, &current_offset)
 *                 keys_vals_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>keys_vals_marker:
 */
      __pyx_v_keys_vals_marker = (__pyx_v_keys_vals_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":6980
 *                 keys_vals_marker += current_offset
 * 
 *                 while current_offset < <int>keys_vals_marker:             # <<<<<<<<<<<<<<
 *                     keys_vals_elt = get_varint32(memory, &current_offset)
 *                     self._keys_vals._append(keys_vals_elt)
 */
      while (1) {
        __pyx_t_2 = ((__pyx_v_current_offset < ((int)__pyx_v_keys_vals_marker)) != 0);
        if (!__pyx_t_2) break;

        /* "pyrosm_proto.pyx":6981
 * 
 *                 while current_offset < <int>keys_vals_marker:
 *                     keys_vals_elt = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._keys_vals._append(keys_vals_elt)
 *             # Unknown field - need to skip proper number of bytes
 */
        __pyx_v_keys_vals_elt = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":6982
 *                 while current_offset < <int>keys_vals_marker:
 *                     keys_vals_elt = get_varint32(memory, &current_offset)
 *                     self._keys_vals._append(keys_vals_elt)             # <<<<<<<<<<<<<<
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_keys_vals->__pyx_vtab)->_append(__pyx_v_self->_keys_vals, __pyx_v_keys_vals_elt);
      }

      /* "pyrosm_proto.pyx":6976
 *                     self._lon._append(lon_elt)
 *             # keys_vals
 *             elif key == 82:             # <<<<<<<<<<<<<<
 *                 keys_vals_marker = get_varint64(memory, &current_offset)
 *                 keys_vals_marker += current_offset
 */
      break;
      default:

      /* "pyrosm_proto.pyx":6985
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)             # <<<<<<<<<<<<<<
 * 
 *         self._is_present_in_parent = True
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        if (unlikely(!(__pyx_f_12pyrobuf_util_skip_generic(__pyx_v_memory, (&__pyx_v_current_offset), __pyx_v_size, (__pyx_v_key & 0x7)) != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 6985, __pyx_L1_error)
        }
      }
      #endif
      break;
    }
  }

  /* "pyrosm_proto.pyx":6987
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)
 * 
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 * 
 *         return current_offset
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":6989
 *         self._is_present_in_parent = True
 * 
 *         return current_offset             # <<<<<<<<<<<<<<
 * 
 *     cpdef void Clear(self):
 */
  __pyx_r = __pyx_v_current_offset;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":6927
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pyrosm_proto.DenseNodes._protobuf_deserialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6991
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_10DenseNodes_Clear(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6991, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10DenseNodes_11Clear)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6991, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":6993
 *     cpdef void Clear(self):
 *         """Clears all data that was set in the message."""
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6994
 *         """Clears all data that was set in the message."""
 *         self.reset()
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void ClearField(self, field_name):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6991
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.DenseNodes.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_10Clear[] = "Clears all data that was set in the message.";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Clear (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_10Clear(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_10Clear(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10DenseNodes_Clear(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6991, __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("pyrosm_proto.DenseNodes.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":6996
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':
 */

static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static void __pyx_f_12pyrosm_proto_10DenseNodes_ClearField(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("ClearField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ClearField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6996, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10DenseNodes_13ClearField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6996, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":6998
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             self._id._listener = <PyObject *>null_listener
 *             self._id = Int64List.__new__(Int64List)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_id, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 6998, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":6999
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':
 *             self._id._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._id = Int64List.__new__(Int64List)
 *             self._id._listener = <PyObject *>self
 */
    __pyx_v_self->_id->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7000
 *         if field_name == 'id':
 *             self._id._listener = <PyObject *>null_listener
 *             self._id = Int64List.__new__(Int64List)             # <<<<<<<<<<<<<<
 *             self._id._listener = <PyObject *>self
 *         elif field_name == 'denseinfo':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int64List)))) __PYX_ERR(0, 7000, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_id);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_id));
    __pyx_v_self->_id = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7001
 *             self._id._listener = <PyObject *>null_listener
 *             self._id = Int64List.__new__(Int64List)
 *             self._id._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'denseinfo':
 *             if self._denseinfo is not None:
 */
    __pyx_v_self->_id->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":6998
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             self._id._listener = <PyObject *>null_listener
 *             self._id = Int64List.__new__(Int64List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":7002
 *             self._id = Int64List.__new__(Int64List)
 *             self._id._listener = <PyObject *>self
 *         elif field_name == 'denseinfo':             # <<<<<<<<<<<<<<
 *             if self._denseinfo is not None:
 *                 self._denseinfo._listener = <PyObject *>null_listener
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_denseinfo, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7002, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":7003
 *             self._id._listener = <PyObject *>self
 *         elif field_name == 'denseinfo':
 *             if self._denseinfo is not None:             # <<<<<<<<<<<<<<
 *                 self._denseinfo._listener = <PyObject *>null_listener
 *             self._denseinfo = None
 */
    __pyx_t_5 = (((PyObject *)__pyx_v_self->_denseinfo) != Py_None);
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "pyrosm_proto.pyx":7004
 *         elif field_name == 'denseinfo':
 *             if self._denseinfo is not None:
 *                 self._denseinfo._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._denseinfo = None
 *         elif field_name == 'lat':
 */
      __pyx_v_self->_denseinfo->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

      /* "pyrosm_proto.pyx":7003
 *             self._id._listener = <PyObject *>self
 *         elif field_name == 'denseinfo':
 *             if self._denseinfo is not None:             # <<<<<<<<<<<<<<
 *                 self._denseinfo._listener = <PyObject *>null_listener
 *             self._denseinfo = None
 */
    }

    /* "pyrosm_proto.pyx":7005
 *             if self._denseinfo is not None:
 *                 self._denseinfo._listener = <PyObject *>null_listener
 *             self._denseinfo = None             # <<<<<<<<<<<<<<
 *         elif field_name == 'lat':
 *             self._lat._listener = <PyObject *>null_listener
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->_denseinfo);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_denseinfo));
    __pyx_v_self->_denseinfo = ((struct __pyx_obj_12pyrosm_proto_DenseInfo *)Py_None);

    /* "pyrosm_proto.pyx":7002
 *             self._id = Int64List.__new__(Int64List)
 *             self._id._listener = <PyObject *>self
 *         elif field_name == 'denseinfo':             # <<<<<<<<<<<<<<
 *             if self._denseinfo is not None:
 *                 self._denseinfo._listener = <PyObject *>null_listener
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":7006
 *                 self._denseinfo._listener = <PyObject *>null_listener
 *             self._denseinfo = None
 *         elif field_name == 'lat':             # <<<<<<<<<<<<<<
 *             self._lat._listener = <PyObject *>null_listener
 *             self._lat = Int64List.__new__(Int64List)
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_lat, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 7006, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":7007
 *             self._denseinfo = None
 *         elif field_name == 'lat':
 *             self._lat._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._lat = Int64List.__new__(Int64List)
 *             self._lat._listener = <PyObject *>self
 */
    __pyx_v_self->_lat->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7008
 *         elif field_name == 'lat':
 *             self._lat._listener = <PyObject *>null_listener
 *             self._lat = Int64List.__new__(Int64List)             # <<<<<<<<<<<<<<
 *             self._lat._listener = <PyObject *>self
 *         elif field_name == 'lon':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7008, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int64List)))) __PYX_ERR(0, 7008, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_lat);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_lat));
    __pyx_v_self->_lat = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7009
 *             self._lat._listener = <PyObject *>null_listener
 *             self._lat = Int64List.__new__(Int64List)
 *             self._lat._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'lon':
 *             self._lon._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_lat->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":7006
 *                 self._denseinfo._listener = <PyObject *>null_listener
 *             self._denseinfo = None
 *         elif field_name == 'lat':             # <<<<<<<<<<<<<<
 *             self._lat._listener = <PyObject *>null_listener
 *             self._lat = Int64List.__new__(Int64List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":7010
 *             self._lat = Int64List.__new__(Int64List)
 *             self._lat._listener = <PyObject *>self
 *         elif field_name == 'lon':             # <<<<<<<<<<<<<<
 *             self._lon._listener = <PyObject *>null_listener
 *             self._lon = Int64List.__new__(Int64List)
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_lon, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 7010, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":7011
 *             self._lat._listener = <PyObject *>self
 *         elif field_name == 'lon':
 *             self._lon._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._lon = Int64List.__new__(Int64List)
 *             self._lon._listener = <PyObject *>self
 */
    __pyx_v_self->_lon->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7012
 *         elif field_name == 'lon':
 *             self._lon._listener = <PyObject *>null_listener
 *             self._lon = Int64List.__new__(Int64List)             # <<<<<<<<<<<<<<
 *             self._lon._listener = <PyObject *>self
 *         elif field_name == 'keys_vals':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int64List)))) __PYX_ERR(0, 7012, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_lon);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_lon));
    __pyx_v_self->_lon = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7013
 *             self._lon._listener = <PyObject *>null_listener
 *             self._lon = Int64List.__new__(Int64List)
 *             self._lon._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'keys_vals':
 *             self._keys_vals._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_lon->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":7010
 *             self._lat = Int64List.__new__(Int64List)
 *             self._lat._listener = <PyObject *>self
 *         elif field_name == 'lon':             # <<<<<<<<<<<<<<
 *             self._lon._listener = <PyObject *>null_listener
 *             self._lon = Int64List.__new__(Int64List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":7014
 *             self._lon = Int64List.__new__(Int64List)
 *             self._lon._listener = <PyObject *>self
 *         elif field_name == 'keys_vals':             # <<<<<<<<<<<<<<
 *             self._keys_vals._listener = <PyObject *>null_listener
 *             self._keys_vals = Int32List.__new__(Int32List)
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_keys_vals, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 7014, __pyx_L1_error)
  if (likely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":7015
 *             self._lon._listener = <PyObject *>self
 *         elif field_name == 'keys_vals':
 *             self._keys_vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._keys_vals = Int32List.__new__(Int32List)
 *             self._keys_vals._listener = <PyObject *>self
 */
    __pyx_v_self->_keys_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7016
 *         elif field_name == 'keys_vals':
 *             self._keys_vals._listener = <PyObject *>null_listener
 *             self._keys_vals = Int32List.__new__(Int32List)             # <<<<<<<<<<<<<<
 *             self._keys_vals._listener = <PyObject *>self
 *         else:
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int32List)))) __PYX_ERR(0, 7016, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_keys_vals);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys_vals));
    __pyx_v_self->_keys_vals = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7017
 *             self._keys_vals._listener = <PyObject *>null_listener
 *             self._keys_vals = Int32List.__new__(Int32List)
 *             self._keys_vals._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 */
    __pyx_v_self->_keys_vals->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":7014
 *             self._lon = Int64List.__new__(Int64List)
 *             self._lon._listener = <PyObject *>self
 *         elif field_name == 'keys_vals':             # <<<<<<<<<<<<<<
 *             self._keys_vals._listener = <PyObject *>null_listener
 *             self._keys_vals = Int32List.__new__(Int32List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":7019
 *             self._keys_vals._listener = <PyObject *>self
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 7019, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":7021
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void CopyFrom(self, DenseNodes other_msg):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":6996
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.DenseNodes.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_12ClearField[] = "Clears the contents of a given field.";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ClearField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_12ClearField(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_12ClearField(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ClearField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10DenseNodes_ClearField(__pyx_v_self, __pyx_v_field_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6996, __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("pyrosm_proto.DenseNodes.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7023
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, DenseNodes other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_10DenseNodes_CopyFrom(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CopyFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7023, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10DenseNodes_15CopyFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7023, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7030
 *             other_msg (DenseNodes): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":7031
 *         """
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 *         self.reset()
 *         self.MergeFrom(other_msg)
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7030
 *             other_msg (DenseNodes): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  }

  /* "pyrosm_proto.pyx":7032
 *         if self is other_msg:
 *             return
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self.MergeFrom(other_msg)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7033
 *             return
 *         self.reset()
 *         self.MergeFrom(other_msg)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint HasField(self, field_name) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->MergeFrom(__pyx_v_self, __pyx_v_other_msg, 0);

  /* "pyrosm_proto.pyx":7023
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, DenseNodes other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.DenseNodes.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_14CopyFrom[] = "\n        Copies the content of the specified message into the current message.\n\n        Params:\n            other_msg (DenseNodes): Message to copy into the current one.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CopyFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_DenseNodes, 1, "other_msg", 0))) __PYX_ERR(0, 7023, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_14CopyFrom(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_14CopyFrom(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10DenseNodes_CopyFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7023, __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("pyrosm_proto.DenseNodes.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7035
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static int __pyx_f_12pyrosm_proto_10DenseNodes_HasField(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("HasField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_HasField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7035, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10DenseNodes_17HasField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7035, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7035, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7042
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'denseinfo':             # <<<<<<<<<<<<<<
 *             return self._denseinfo is not None and self._denseinfo._is_present_in_parent
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_denseinfo, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7042, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":7043
 *         """
 *         if field_name == 'denseinfo':
 *             return self._denseinfo is not None and self._denseinfo._is_present_in_parent             # <<<<<<<<<<<<<<
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_denseinfo) != Py_None);
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_5 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->_denseinfo->_is_present_in_parent != 0);
    __pyx_t_5 = __pyx_t_7;
    __pyx_L4_bool_binop_done:;
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7042
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'denseinfo':             # <<<<<<<<<<<<<<
 *             return self._denseinfo is not None and self._denseinfo._is_present_in_parent
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  }

  /* "pyrosm_proto.pyx":7044
 *         if field_name == 'denseinfo':
 *             return self._denseinfo is not None and self._denseinfo._is_present_in_parent
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint IsInitialized(self):
 */
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_singular, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 7044, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7035
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

  /* 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("pyrosm_proto.DenseNodes.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_16HasField[] = "\n        Checks if a certain field is set for the message.\n\n        Params:\n            field_name (str): The name of the field to check.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_16HasField(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_16HasField(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("HasField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_10DenseNodes_HasField(__pyx_v_self, __pyx_v_field_name, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7035, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7046
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_12pyrosm_proto_10DenseNodes_IsInitialized(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_IsInitialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7046, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10DenseNodes_19IsInitialized)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7046, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7046, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7056
 * 
 * 
 *         if self._denseinfo is not None and self._denseinfo._is_present_in_parent and not self._denseinfo.IsInitialized():             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_denseinfo) != Py_None);
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_self->_denseinfo->_is_present_in_parent != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->_denseinfo->__pyx_vtab)->IsInitialized(__pyx_v_self->_denseinfo, 0) != 0)) != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":7057
 * 
 *         if self._denseinfo is not None and self._denseinfo._is_present_in_parent and not self._denseinfo.IsInitialized():
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         return True
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7056
 * 
 * 
 *         if self._denseinfo is not None and self._denseinfo._is_present_in_parent and not self._denseinfo.IsInitialized():             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  }

  /* "pyrosm_proto.pyx":7059
 *             return False
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef void MergeFrom(self, DenseNodes other_msg):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7046
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

  /* 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_WriteUnraisable("pyrosm_proto.DenseNodes.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_18IsInitialized[] = "\n        Checks if the message is initialized.\n\n        Returns:\n            bool: True if the message is initialized (i.e. all of its required\n                fields are set).\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsInitialized (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_18IsInitialized(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_18IsInitialized(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_12pyrosm_proto_10DenseNodes_IsInitialized(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7046, __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("pyrosm_proto.DenseNodes.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7061
 *         return True
 * 
 *     cpdef void MergeFrom(self, DenseNodes other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_10DenseNodes_MergeFrom(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7061, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10DenseNodes_21MergeFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7061, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7070
 *         cdef int i
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":7071
 * 
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7070
 *         cdef int i
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "pyrosm_proto.pyx":7074
 * 
 * 
 *         self._id.extend(other_msg._id)             # <<<<<<<<<<<<<<
 *         if other_msg._denseinfo is not None and other_msg._denseinfo._is_present_in_parent:
 *             if self._denseinfo is None:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_id);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_id->__pyx_vtab)->extend(__pyx_v_self->_id, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7074, __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;

  /* "pyrosm_proto.pyx":7075
 * 
 *         self._id.extend(other_msg._id)
 *         if other_msg._denseinfo is not None and other_msg._denseinfo._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             if self._denseinfo is None:
 *                 self._denseinfo = DenseInfo.__new__(DenseInfo)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_other_msg->_denseinfo) != Py_None);
  __pyx_t_7 = (__pyx_t_5 != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_other_msg->_denseinfo->_is_present_in_parent != 0);
  __pyx_t_6 = __pyx_t_7;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":7076
 *         self._id.extend(other_msg._id)
 *         if other_msg._denseinfo is not None and other_msg._denseinfo._is_present_in_parent:
 *             if self._denseinfo is None:             # <<<<<<<<<<<<<<
 *                 self._denseinfo = DenseInfo.__new__(DenseInfo)
 *                 self._denseinfo.reset()
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_denseinfo) == Py_None);
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (__pyx_t_7) {

      /* "pyrosm_proto.pyx":7077
 *         if other_msg._denseinfo is not None and other_msg._denseinfo._is_present_in_parent:
 *             if self._denseinfo is None:
 *                 self._denseinfo = DenseInfo.__new__(DenseInfo)             # <<<<<<<<<<<<<<
 *                 self._denseinfo.reset()
 *                 self._denseinfo._listener = <PyObject *>self
 */
      __pyx_t_2 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_DenseInfo(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_DenseInfo), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7077, __pyx_L1_error)
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
      __Pyx_GOTREF(__pyx_v_self->_denseinfo);
      __Pyx_DECREF(((PyObject *)__pyx_v_self->_denseinfo));
      __pyx_v_self->_denseinfo = ((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":7078
 *             if self._denseinfo is None:
 *                 self._denseinfo = DenseInfo.__new__(DenseInfo)
 *                 self._denseinfo.reset()             # <<<<<<<<<<<<<<
 *                 self._denseinfo._listener = <PyObject *>self
 *             self._denseinfo.MergeFrom(other_msg._denseinfo)
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->_denseinfo->__pyx_vtab)->reset(__pyx_v_self->_denseinfo, 0);

      /* "pyrosm_proto.pyx":7079
 *                 self._denseinfo = DenseInfo.__new__(DenseInfo)
 *                 self._denseinfo.reset()
 *                 self._denseinfo._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *             self._denseinfo.MergeFrom(other_msg._denseinfo)
 *         self._lat.extend(other_msg._lat)
 */
      __pyx_v_self->_denseinfo->_listener = ((PyObject *)__pyx_v_self);

      /* "pyrosm_proto.pyx":7076
 *         self._id.extend(other_msg._id)
 *         if other_msg._denseinfo is not None and other_msg._denseinfo._is_present_in_parent:
 *             if self._denseinfo is None:             # <<<<<<<<<<<<<<
 *                 self._denseinfo = DenseInfo.__new__(DenseInfo)
 *                 self._denseinfo.reset()
 */
    }

    /* "pyrosm_proto.pyx":7080
 *                 self._denseinfo.reset()
 *                 self._denseinfo._listener = <PyObject *>self
 *             self._denseinfo.MergeFrom(other_msg._denseinfo)             # <<<<<<<<<<<<<<
 *         self._lat.extend(other_msg._lat)
 *         self._lon.extend(other_msg._lon)
 */
    __pyx_t_2 = ((PyObject *)__pyx_v_other_msg->_denseinfo);
    __Pyx_INCREF(__pyx_t_2);
    ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->_denseinfo->__pyx_vtab)->MergeFrom(__pyx_v_self->_denseinfo, ((struct __pyx_obj_12pyrosm_proto_DenseInfo *)__pyx_t_2), 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":7075
 * 
 *         self._id.extend(other_msg._id)
 *         if other_msg._denseinfo is not None and other_msg._denseinfo._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             if self._denseinfo is None:
 *                 self._denseinfo = DenseInfo.__new__(DenseInfo)
 */
  }

  /* "pyrosm_proto.pyx":7081
 *                 self._denseinfo._listener = <PyObject *>self
 *             self._denseinfo.MergeFrom(other_msg._denseinfo)
 *         self._lat.extend(other_msg._lat)             # <<<<<<<<<<<<<<
 *         self._lon.extend(other_msg._lon)
 *         self._keys_vals.extend(other_msg._keys_vals)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_other_msg->_lat);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_lat->__pyx_vtab)->extend(__pyx_v_self->_lat, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7081, __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;

  /* "pyrosm_proto.pyx":7082
 *             self._denseinfo.MergeFrom(other_msg._denseinfo)
 *         self._lat.extend(other_msg._lat)
 *         self._lon.extend(other_msg._lon)             # <<<<<<<<<<<<<<
 *         self._keys_vals.extend(other_msg._keys_vals)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_lon);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_lon->__pyx_vtab)->extend(__pyx_v_self->_lon, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7082, __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;

  /* "pyrosm_proto.pyx":7083
 *         self._lat.extend(other_msg._lat)
 *         self._lon.extend(other_msg._lon)
 *         self._keys_vals.extend(other_msg._keys_vals)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_other_msg->_keys_vals);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_keys_vals->__pyx_vtab)->extend(__pyx_v_self->_keys_vals, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7083, __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;

  /* "pyrosm_proto.pyx":7085
 *         self._keys_vals.extend(other_msg._keys_vals)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7061
 *         return True
 * 
 *     cpdef void MergeFrom(self, DenseNodes other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.DenseNodes.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_20MergeFrom[] = "\n        Merges the contents of the specified message into the current message.\n\n        Params:\n            other_msg: Message to merge into the current message.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_DenseNodes, 1, "other_msg", 0))) __PYX_ERR(0, 7061, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_20MergeFrom(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_20MergeFrom(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10DenseNodes_MergeFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7061, __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("pyrosm_proto.DenseNodes.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7087
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_10DenseNodes_MergeFromString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_MergeFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  unsigned char const *__pyx_t_10;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7087, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10DenseNodes_23MergeFromString)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7087, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7087, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7087, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7087, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7087, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7101
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, False)
 */
  __pyx_t_7 = (__pyx_v_size != Py_None);
  if ((__pyx_t_7 != 0)) {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7101, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_8;
  } else {
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7101, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_9;
  }
  __pyx_v_length = __pyx_t_5;

  /* "pyrosm_proto.pyx":7103
 *         length = size if size is not None else len(data)
 * 
 *         buf = self._protobuf_deserialize(data, length, False)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_10 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 7103, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_10, __pyx_v_length, 0);

  /* "pyrosm_proto.pyx":7105
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  __pyx_t_7 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "pyrosm_proto.pyx":7106
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_GIVEREF(__pyx_v_size);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_size);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Truncated_message_got_s_expected, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7106, __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, 7106, __pyx_L1_error)

    /* "pyrosm_proto.pyx":7105
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  }

  /* "pyrosm_proto.pyx":7108
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7110
 *         self._Modified()
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7087
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_22MergeFromString[] = "\n        Merges serialized protocol buffer data into this message.\n\n        Params:\n            data (bytes): a string of binary data.\n            size (int): optional - the length of the data string\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "MergeFromString") < 0)) __PYX_ERR(0, 7087, __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_data = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MergeFromString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7087, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_22MergeFromString(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), __pyx_v_data, __pyx_v_size);

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_22MergeFromString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_MergeFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_DenseNodes->MergeFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7087, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7112
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_10DenseNodes_ParseFromString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_ParseFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_reset = ((int)1);
  int __pyx_v_cache = ((int)0);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  unsigned char const *__pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_reset = __pyx_optional_args->reset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cache = __pyx_optional_args->cache;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7112, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10DenseNodes_25ParseFromString)) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7112, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7112, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7112, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7112, __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(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7112, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_size);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 3+__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, 7112, __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, 7112, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7128
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         if reset:
 */
  __pyx_t_9 = (__pyx_v_size != Py_None);
  if ((__pyx_t_9 != 0)) {
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7128, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7128, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_11;
  }
  __pyx_v_length = __pyx_t_7;

  /* "pyrosm_proto.pyx":7130
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_9 = (__pyx_v_reset != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":7131
 * 
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":7130
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":7133
 *             self.reset()
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_12 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 7133, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_12, __pyx_v_length, __pyx_v_cache);

  /* "pyrosm_proto.pyx":7135
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  __pyx_t_9 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "pyrosm_proto.pyx":7136
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message")             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s_Truncated_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Truncated_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7136, __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, 7136, __pyx_L1_error)

    /* "pyrosm_proto.pyx":7135
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  }

  /* "pyrosm_proto.pyx":7138
 *             raise DecodeError("Truncated message")
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7140
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  __pyx_t_9 = (__pyx_v_cache != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":7141
 * 
 *         if cache:
 *             self._cached_serialization = data             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) __PYX_ERR(0, 7141, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7140
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  }

  /* "pyrosm_proto.pyx":7143
 *             self._cached_serialization = data
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7112
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_24ParseFromString[] = "\n        Populate the message class from a string of protobuf encoded binary data.\n\n        Params:\n            data (bytes): a string of binary data\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n            cache (bool): optional - whether to cache serialized data\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_v_reset;
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,&__pyx_n_s_cache,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromString") < 0)) __PYX_ERR(0, 7112, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    if (values[2]) {
      __pyx_v_reset = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7112, __pyx_L3_error)
    } else {
      __pyx_v_reset = ((int)1);
    }
    if (values[3]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7112, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromString", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7112, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_24ParseFromString(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset, __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_24ParseFromString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_ParseFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.reset = __pyx_v_reset;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_DenseNodes->ParseFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7112, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7146
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FromString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_26FromString(((PyTypeObject*)__pyx_v_cls), ((PyObject *)__pyx_v_s));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("FromString", 0);

  /* "pyrosm_proto.pyx":7147
 *     @classmethod
 *     def FromString(cls, s):
 *         message = cls()             # <<<<<<<<<<<<<<
 *         message.MergeFromString(s)
 *         return message
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7148
 *     def FromString(cls, s):
 *         message = cls()
 *         message.MergeFromString(s)             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7148, __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;

  /* "pyrosm_proto.pyx":7149
 *         message = cls()
 *         message.MergeFromString(s)
 *         return message             # <<<<<<<<<<<<<<
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7146
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.FromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7151
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # id
 */

static void __pyx_f_12pyrosm_proto_10DenseNodes__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_cache) {
  Py_ssize_t __pyx_v_length;
  int64_t __pyx_v_id_elt;
  PyObject *__pyx_v_id_buf = 0;
  PyObject *__pyx_v_denseinfo_buf = 0;
  int64_t __pyx_v_lat_elt;
  PyObject *__pyx_v_lat_buf = 0;
  int64_t __pyx_v_lon_elt;
  PyObject *__pyx_v_lon_buf = 0;
  int32_t __pyx_v_keys_vals_elt;
  PyObject *__pyx_v_keys_vals_buf = 0;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int64_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int32_t __pyx_t_9;
  __Pyx_RefNannySetupContext("_protobuf_serialize", 0);
  __Pyx_INCREF(__pyx_v_buf);

  /* "pyrosm_proto.pyx":7155
 *         # id
 *         cdef int64_t id_elt
 *         cdef bytearray id_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._id)
 *         if length > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_id_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7156
 *         cdef int64_t id_elt
 *         cdef bytearray id_buf = bytearray()
 *         length = len(self._id)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(10, buf)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_id);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "pyrosm_proto.pyx":7157
 *         cdef bytearray id_buf = bytearray()
 *         length = len(self._id)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             for id_elt in self._id:
 */
  __pyx_t_3 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":7158
 *         length = len(self._id)
 *         if length > 0:
 *             set_varint64(10, buf)             # <<<<<<<<<<<<<<
 *             for id_elt in self._id:
 *                 set_signed_varint64(id_elt, id_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(10, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7159
 *         if length > 0:
 *             set_varint64(10, buf)
 *             for id_elt in self._id:             # <<<<<<<<<<<<<<
 *                 set_signed_varint64(id_elt, id_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_id))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_id))) {
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_id); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->_id)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7159, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        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_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 7159, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7159, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 7159, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7159, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 7159, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_5); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7159, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_id_elt = __pyx_t_6;

      /* "pyrosm_proto.pyx":7160
 *             set_varint64(10, buf)
 *             for id_elt in self._id:
 *                 set_signed_varint64(id_elt, id_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(id_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_signed_varint64(__pyx_v_id_elt, __pyx_v_id_buf));

      /* "pyrosm_proto.pyx":7159
 *         if length > 0:
 *             set_varint64(10, buf)
 *             for id_elt in self._id:             # <<<<<<<<<<<<<<
 *                 set_signed_varint64(id_elt, id_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7162
 *                 set_signed_varint64(id_elt, id_buf)
 * 
 *             set_varint64(len(id_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += id_buf
 *         # denseinfo
 */
    __pyx_t_2 = PyByteArray_GET_SIZE(__pyx_v_id_buf); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7162, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_2, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7163
 * 
 *             set_varint64(len(id_buf), buf)
 *             buf += id_buf             # <<<<<<<<<<<<<<
 *         # denseinfo
 *         cdef bytearray denseinfo_buf
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_id_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7157
 *         cdef bytearray id_buf = bytearray()
 *         length = len(self._id)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(10, buf)
 *             for id_elt in self._id:
 */
  }

  /* "pyrosm_proto.pyx":7166
 *         # denseinfo
 *         cdef bytearray denseinfo_buf
 *         if self._denseinfo is not None and self._denseinfo._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             set_varint64(42, buf)
 *             if self._denseinfo._cached_serialization is not None:
 */
  __pyx_t_7 = (((PyObject *)__pyx_v_self->_denseinfo) != Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_3 = __pyx_t_8;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_self->_denseinfo->_is_present_in_parent != 0);
  __pyx_t_3 = __pyx_t_8;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":7167
 *         cdef bytearray denseinfo_buf
 *         if self._denseinfo is not None and self._denseinfo._is_present_in_parent:
 *             set_varint64(42, buf)             # <<<<<<<<<<<<<<
 *             if self._denseinfo._cached_serialization is not None:
 *                 set_varint64(len(self._denseinfo._cached_serialization), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(42, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7168
 *         if self._denseinfo is not None and self._denseinfo._is_present_in_parent:
 *             set_varint64(42, buf)
 *             if self._denseinfo._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(self._denseinfo._cached_serialization), buf)
 *                 buf += self._denseinfo._cached_serialization
 */
    __pyx_t_3 = (__pyx_v_self->_denseinfo->_cached_serialization != ((PyObject*)Py_None));
    __pyx_t_8 = (__pyx_t_3 != 0);
    if (__pyx_t_8) {

      /* "pyrosm_proto.pyx":7169
 *             set_varint64(42, buf)
 *             if self._denseinfo._cached_serialization is not None:
 *                 set_varint64(len(self._denseinfo._cached_serialization), buf)             # <<<<<<<<<<<<<<
 *                 buf += self._denseinfo._cached_serialization
 *             else:
 */
      __pyx_t_1 = __pyx_v_self->_denseinfo->_cached_serialization;
      __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, 7169, __pyx_L1_error)
      }
      __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7169, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_2, __pyx_v_buf));

      /* "pyrosm_proto.pyx":7170
 *             if self._denseinfo._cached_serialization is not None:
 *                 set_varint64(len(self._denseinfo._cached_serialization), buf)
 *                 buf += self._denseinfo._cached_serialization             # <<<<<<<<<<<<<<
 *             else:
 *                 denseinfo_buf = bytearray()
 */
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_self->_denseinfo->_cached_serialization); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7170, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pyrosm_proto.pyx":7168
 *         if self._denseinfo is not None and self._denseinfo._is_present_in_parent:
 *             set_varint64(42, buf)
 *             if self._denseinfo._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(self._denseinfo._cached_serialization), buf)
 *                 buf += self._denseinfo._cached_serialization
 */
      goto __pyx_L9;
    }

    /* "pyrosm_proto.pyx":7172
 *                 buf += self._denseinfo._cached_serialization
 *             else:
 *                 denseinfo_buf = bytearray()             # <<<<<<<<<<<<<<
 *                 self._denseinfo._protobuf_serialize(denseinfo_buf, cache)
 *                 set_varint64(len(denseinfo_buf), buf)
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_denseinfo_buf = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyrosm_proto.pyx":7173
 *             else:
 *                 denseinfo_buf = bytearray()
 *                 self._denseinfo._protobuf_serialize(denseinfo_buf, cache)             # <<<<<<<<<<<<<<
 *                 set_varint64(len(denseinfo_buf), buf)
 *                 buf += denseinfo_buf
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->_denseinfo->__pyx_vtab)->_protobuf_serialize(__pyx_v_self->_denseinfo, __pyx_v_denseinfo_buf, __pyx_v_cache);

      /* "pyrosm_proto.pyx":7174
 *                 denseinfo_buf = bytearray()
 *                 self._denseinfo._protobuf_serialize(denseinfo_buf, cache)
 *                 set_varint64(len(denseinfo_buf), buf)             # <<<<<<<<<<<<<<
 *                 buf += denseinfo_buf
 *                 if cache:
 */
      __pyx_t_2 = PyByteArray_GET_SIZE(__pyx_v_denseinfo_buf); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7174, __pyx_L1_error)
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_2, __pyx_v_buf));

      /* "pyrosm_proto.pyx":7175
 *                 self._denseinfo._protobuf_serialize(denseinfo_buf, cache)
 *                 set_varint64(len(denseinfo_buf), buf)
 *                 buf += denseinfo_buf             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     self._denseinfo._cached_serialization = bytes(denseinfo_buf)
 */
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_denseinfo_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pyrosm_proto.pyx":7176
 *                 set_varint64(len(denseinfo_buf), buf)
 *                 buf += denseinfo_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._denseinfo._cached_serialization = bytes(denseinfo_buf)
 *         # lat
 */
      __pyx_t_8 = (__pyx_v_cache != 0);
      if (__pyx_t_8) {

        /* "pyrosm_proto.pyx":7177
 *                 buf += denseinfo_buf
 *                 if cache:
 *                     self._denseinfo._cached_serialization = bytes(denseinfo_buf)             # <<<<<<<<<<<<<<
 *         # lat
 *         cdef int64_t lat_elt
 */
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_denseinfo_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7177, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_v_self->_denseinfo->_cached_serialization);
        __Pyx_DECREF(__pyx_v_self->_denseinfo->_cached_serialization);
        __pyx_v_self->_denseinfo->_cached_serialization = ((PyObject*)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyrosm_proto.pyx":7176
 *                 set_varint64(len(denseinfo_buf), buf)
 *                 buf += denseinfo_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._denseinfo._cached_serialization = bytes(denseinfo_buf)
 *         # lat
 */
      }
    }
    __pyx_L9:;

    /* "pyrosm_proto.pyx":7166
 *         # denseinfo
 *         cdef bytearray denseinfo_buf
 *         if self._denseinfo is not None and self._denseinfo._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             set_varint64(42, buf)
 *             if self._denseinfo._cached_serialization is not None:
 */
  }

  /* "pyrosm_proto.pyx":7180
 *         # lat
 *         cdef int64_t lat_elt
 *         cdef bytearray lat_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._lat)
 *         if length > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_lat_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7181
 *         cdef int64_t lat_elt
 *         cdef bytearray lat_buf = bytearray()
 *         length = len(self._lat)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(66, buf)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_lat);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "pyrosm_proto.pyx":7182
 *         cdef bytearray lat_buf = bytearray()
 *         length = len(self._lat)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(66, buf)
 *             for lat_elt in self._lat:
 */
  __pyx_t_8 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":7183
 *         length = len(self._lat)
 *         if length > 0:
 *             set_varint64(66, buf)             # <<<<<<<<<<<<<<
 *             for lat_elt in self._lat:
 *                 set_signed_varint64(lat_elt, lat_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(66, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7184
 *         if length > 0:
 *             set_varint64(66, buf)
 *             for lat_elt in self._lat:             # <<<<<<<<<<<<<<
 *                 set_signed_varint64(lat_elt, lat_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_lat))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_lat))) {
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_lat); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->_lat)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7184, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        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_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 7184, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7184, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 7184, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7184, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 7184, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_5); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7184, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_lat_elt = __pyx_t_6;

      /* "pyrosm_proto.pyx":7185
 *             set_varint64(66, buf)
 *             for lat_elt in self._lat:
 *                 set_signed_varint64(lat_elt, lat_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(lat_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_signed_varint64(__pyx_v_lat_elt, __pyx_v_lat_buf));

      /* "pyrosm_proto.pyx":7184
 *         if length > 0:
 *             set_varint64(66, buf)
 *             for lat_elt in self._lat:             # <<<<<<<<<<<<<<
 *                 set_signed_varint64(lat_elt, lat_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7187
 *                 set_signed_varint64(lat_elt, lat_buf)
 * 
 *             set_varint64(len(lat_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += lat_buf
 *         # lon
 */
    __pyx_t_2 = PyByteArray_GET_SIZE(__pyx_v_lat_buf); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7187, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_2, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7188
 * 
 *             set_varint64(len(lat_buf), buf)
 *             buf += lat_buf             # <<<<<<<<<<<<<<
 *         # lon
 *         cdef int64_t lon_elt
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_lat_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7182
 *         cdef bytearray lat_buf = bytearray()
 *         length = len(self._lat)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(66, buf)
 *             for lat_elt in self._lat:
 */
  }

  /* "pyrosm_proto.pyx":7191
 *         # lon
 *         cdef int64_t lon_elt
 *         cdef bytearray lon_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._lon)
 *         if length > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_lon_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7192
 *         cdef int64_t lon_elt
 *         cdef bytearray lon_buf = bytearray()
 *         length = len(self._lon)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(74, buf)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_lon);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "pyrosm_proto.pyx":7193
 *         cdef bytearray lon_buf = bytearray()
 *         length = len(self._lon)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(74, buf)
 *             for lon_elt in self._lon:
 */
  __pyx_t_8 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":7194
 *         length = len(self._lon)
 *         if length > 0:
 *             set_varint64(74, buf)             # <<<<<<<<<<<<<<
 *             for lon_elt in self._lon:
 *                 set_signed_varint64(lon_elt, lon_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(74, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7195
 *         if length > 0:
 *             set_varint64(74, buf)
 *             for lon_elt in self._lon:             # <<<<<<<<<<<<<<
 *                 set_signed_varint64(lon_elt, lon_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_lon))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_lon))) {
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_lon); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->_lon)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7195, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        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_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 7195, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 7195, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 7195, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_5); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7195, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_lon_elt = __pyx_t_6;

      /* "pyrosm_proto.pyx":7196
 *             set_varint64(74, buf)
 *             for lon_elt in self._lon:
 *                 set_signed_varint64(lon_elt, lon_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(lon_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_signed_varint64(__pyx_v_lon_elt, __pyx_v_lon_buf));

      /* "pyrosm_proto.pyx":7195
 *         if length > 0:
 *             set_varint64(74, buf)
 *             for lon_elt in self._lon:             # <<<<<<<<<<<<<<
 *                 set_signed_varint64(lon_elt, lon_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7198
 *                 set_signed_varint64(lon_elt, lon_buf)
 * 
 *             set_varint64(len(lon_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += lon_buf
 *         # keys_vals
 */
    __pyx_t_2 = PyByteArray_GET_SIZE(__pyx_v_lon_buf); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7198, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_2, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7199
 * 
 *             set_varint64(len(lon_buf), buf)
 *             buf += lon_buf             # <<<<<<<<<<<<<<
 *         # keys_vals
 *         cdef int32_t keys_vals_elt
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_lon_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7193
 *         cdef bytearray lon_buf = bytearray()
 *         length = len(self._lon)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(74, buf)
 *             for lon_elt in self._lon:
 */
  }

  /* "pyrosm_proto.pyx":7202
 *         # keys_vals
 *         cdef int32_t keys_vals_elt
 *         cdef bytearray keys_vals_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._keys_vals)
 *         if length > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_keys_vals_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7203
 *         cdef int32_t keys_vals_elt
 *         cdef bytearray keys_vals_buf = bytearray()
 *         length = len(self._keys_vals)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(82, buf)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_keys_vals);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7203, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;

  /* "pyrosm_proto.pyx":7204
 *         cdef bytearray keys_vals_buf = bytearray()
 *         length = len(self._keys_vals)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(82, buf)
 *             for keys_vals_elt in self._keys_vals:
 */
  __pyx_t_8 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":7205
 *         length = len(self._keys_vals)
 *         if length > 0:
 *             set_varint64(82, buf)             # <<<<<<<<<<<<<<
 *             for keys_vals_elt in self._keys_vals:
 *                 set_varint32(keys_vals_elt, keys_vals_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(82, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7206
 *         if length > 0:
 *             set_varint64(82, buf)
 *             for keys_vals_elt in self._keys_vals:             # <<<<<<<<<<<<<<
 *                 set_varint32(keys_vals_elt, keys_vals_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_keys_vals))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_keys_vals))) {
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_keys_vals); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->_keys_vals)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7206, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7206, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        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_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 7206, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7206, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 7206, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7206, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_1);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 7206, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_9 = __Pyx_PyInt_As_int32_t(__pyx_t_5); if (unlikely((__pyx_t_9 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7206, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_keys_vals_elt = __pyx_t_9;

      /* "pyrosm_proto.pyx":7207
 *             set_varint64(82, buf)
 *             for keys_vals_elt in self._keys_vals:
 *                 set_varint32(keys_vals_elt, keys_vals_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(keys_vals_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_keys_vals_elt, __pyx_v_keys_vals_buf));

      /* "pyrosm_proto.pyx":7206
 *         if length > 0:
 *             set_varint64(82, buf)
 *             for keys_vals_elt in self._keys_vals:             # <<<<<<<<<<<<<<
 *                 set_varint32(keys_vals_elt, keys_vals_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7209
 *                 set_varint32(keys_vals_elt, keys_vals_buf)
 * 
 *             set_varint64(len(keys_vals_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += keys_vals_buf
 * 
 */
    __pyx_t_2 = PyByteArray_GET_SIZE(__pyx_v_keys_vals_buf); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7209, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_2, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7210
 * 
 *             set_varint64(len(keys_vals_buf), buf)
 *             buf += keys_vals_buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef void _Modified(self):
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_keys_vals_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7204
 *         cdef bytearray keys_vals_buf = bytearray()
 *         length = len(self._keys_vals)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(82, buf)
 *             for keys_vals_elt in self._keys_vals:
 */
  }

  /* "pyrosm_proto.pyx":7151
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # id
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("pyrosm_proto.DenseNodes._protobuf_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_id_buf);
  __Pyx_XDECREF(__pyx_v_denseinfo_buf);
  __Pyx_XDECREF(__pyx_v_lat_buf);
  __Pyx_XDECREF(__pyx_v_lon_buf);
  __Pyx_XDECREF(__pyx_v_keys_vals_buf);
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_RefNannyFinishContext();
}

/* "pyrosm_proto.pyx":7212
 *             buf += keys_vals_buf
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_10DenseNodes__Modified(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Modified); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10DenseNodes_29_Modified)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7212, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7213
 * 
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":7214
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()             # <<<<<<<<<<<<<<
 *         self._cached_serialization = None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_listener), __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7214, __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;

  /* "pyrosm_proto.pyx":7215
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
  __Pyx_DECREF(__pyx_v_self->_cached_serialization);
  __pyx_v_self->_cached_serialization = ((PyObject*)Py_None);

  /* "pyrosm_proto.pyx":7212
 *             buf += keys_vals_buf
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.DenseNodes._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_Modified (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_28_Modified(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_28_Modified(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_10DenseNodes__Modified(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7212, __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("pyrosm_proto.DenseNodes._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7217
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_10DenseNodes_SerializeToString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_SerializeToString *__pyx_optional_args) {
  int __pyx_v_cache = ((int)0);
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_out = 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;
  int __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cache = __pyx_optional_args->cache;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7217, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10DenseNodes_31SerializeToString)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7217, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7217, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 7217, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7226
 * 
 * 
 *         if self._denseinfo is not None and self._denseinfo._is_present_in_parent and not self._denseinfo.IsInitialized():             # <<<<<<<<<<<<<<
 *             raise Exception("Message DenseNodes is missing required field: denseinfo")
 * 
 */
  __pyx_t_7 = (((PyObject *)__pyx_v_self->_denseinfo) != Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_self->_denseinfo->_is_present_in_parent != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo *)__pyx_v_self->_denseinfo->__pyx_vtab)->IsInitialized(__pyx_v_self->_denseinfo, 0) != 0)) != 0);
  __pyx_t_6 = __pyx_t_8;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":7227
 * 
 *         if self._denseinfo is not None and self._denseinfo._is_present_in_parent and not self._denseinfo.IsInitialized():
 *             raise Exception("Message DenseNodes is missing required field: denseinfo")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__143, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7227, __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, 7227, __pyx_L1_error)

    /* "pyrosm_proto.pyx":7226
 * 
 * 
 *         if self._denseinfo is not None and self._denseinfo._is_present_in_parent and not self._denseinfo.IsInitialized():             # <<<<<<<<<<<<<<
 *             raise Exception("Message DenseNodes is missing required field: denseinfo")
 * 
 */
  }

  /* "pyrosm_proto.pyx":7229
 *             raise Exception("Message DenseNodes is missing required field: denseinfo")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_6 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_8 = (__pyx_t_6 != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":7230
 * 
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7229
 *             raise Exception("Message DenseNodes is missing required field: denseinfo")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":7232
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7233
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)             # <<<<<<<<<<<<<<
 *         cdef bytes out = bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, __pyx_v_cache);

  /* "pyrosm_proto.pyx":7234
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7236
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  __pyx_t_8 = (__pyx_v_cache != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":7237
 * 
 *         if cache:
 *             self._cached_serialization = out             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = __pyx_v_out;

    /* "pyrosm_proto.pyx":7236
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  }

  /* "pyrosm_proto.pyx":7239
 *             self._cached_serialization = out
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializePartialToString(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7217
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.DenseNodes.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_30SerializeToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cache,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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SerializeToString") < 0)) __PYX_ERR(0, 7217, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7217, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("SerializeToString", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7217, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_30SerializeToString(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_30SerializeToString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_SerializeToString __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_DenseNodes->SerializeToString(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7217, __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("pyrosm_proto.DenseNodes.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7241
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_10DenseNodes_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_buf = 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;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7241, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_10DenseNodes_33SerializePartialToString)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7241, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 7241, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7248
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_5 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":7249
 *         """
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7248
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":7251
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7252
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)             # <<<<<<<<<<<<<<
 *         return bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, 0);

  /* "pyrosm_proto.pyx":7253
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *     def SetInParent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7241
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.DenseNodes.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_32SerializePartialToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_32SerializePartialToString(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_10DenseNodes_SerializePartialToString(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7241, __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("pyrosm_proto.DenseNodes.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7255
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_34SetInParent[] = "\n        Mark this an present in the parent.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_34SetInParent(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_34SetInParent(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent", 0);

  /* "pyrosm_proto.pyx":7259
 *         Mark this an present in the parent.
 *         """
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7255
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7261
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_36ParseFromJson[] = "\n        Populate the message class from a json string.\n\n        Params:\n            data (str): a json string\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromJson (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromJson") < 0)) __PYX_ERR(0, 7261, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    __pyx_v_reset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromJson", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7261, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_36ParseFromJson(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("ParseFromJson", 0);
  __Pyx_INCREF(__pyx_v_size);

  /* "pyrosm_proto.pyx":7270
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":7271
 *         """
 *         if size is None:
 *             size = len(data)             # <<<<<<<<<<<<<<
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7271, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":7270
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  }

  /* "pyrosm_proto.pyx":7272
 *         if size is None:
 *             size = len(data)
 *         d = json.loads(data[:size])             # <<<<<<<<<<<<<<
 *         self.ParseFromDict(d, reset)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_json); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_d = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":7273
 *             size = len(data)
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToJson(self, **kwargs):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7273, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7273, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7273, __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_d);
    __Pyx_GIVEREF(__pyx_v_d);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_d);
    __Pyx_INCREF(__pyx_v_reset);
    __Pyx_GIVEREF(__pyx_v_reset);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_reset);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":7261
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7275
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_38SerializeToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializeToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializeToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_38SerializeToJson(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializeToJson", 0);

  /* "pyrosm_proto.pyx":7282
 *             str: a json formatted string
 *         """
 *         d = self.SerializeToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7283
 *         """
 *         d = self.SerializeToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToJson(self, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7275
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.SerializeToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7285
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_40SerializePartialToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializePartialToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializePartialToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_40SerializePartialToJson(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToJson", 0);

  /* "pyrosm_proto.pyx":7292
 *             str: a json formatted string
 *         """
 *         d = self.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7293
 *         """
 *         d = self.SerializePartialToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromDict(self, d, reset=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7285
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.SerializePartialToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7295
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_42ParseFromDict[] = "\n        Populate the message class from a Python dictionary.\n\n        Params:\n            d (dict): a Python dictionary representing the message\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,&__pyx_n_s_reset,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 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_reset);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromDict") < 0)) __PYX_ERR(0, 7295, __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_d = values[0];
    __pyx_v_reset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromDict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7295, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_42ParseFromDict(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), __pyx_v_d, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset) {
  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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("ParseFromDict", 0);

  /* "pyrosm_proto.pyx":7303
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reset); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 7303, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":7304
 *         """
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         assert type(d) == dict
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":7303
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":7306
 *             self.reset()
 * 
 *         assert type(d) == dict             # <<<<<<<<<<<<<<
 *         try:
 *             self.id = d["id"]
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_d)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7306, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 7306, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 7306, __pyx_L1_error)
    }
  }
  #endif

  /* "pyrosm_proto.pyx":7307
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.id = d["id"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":7308
 *         assert type(d) == dict
 *         try:
 *             self.id = d["id"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7308, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id, __pyx_t_2) < 0) __PYX_ERR(0, 7308, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":7307
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.id = d["id"]
 *         except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":7309
 *         try:
 *             self.id = d["id"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":7307
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.id = d["id"]
 *         except KeyError:
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":7311
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.denseinfo.ParseFromDict(d["denseinfo"])
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":7312
 *             pass
 *         try:
 *             self.denseinfo.ParseFromDict(d["denseinfo"])             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_denseinfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7312, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7312, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_denseinfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7312, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7312, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":7311
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.denseinfo.ParseFromDict(d["denseinfo"])
 *         except KeyError:
 */
    }
    __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_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":7313
 *         try:
 *             self.denseinfo.ParseFromDict(d["denseinfo"])
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    goto __pyx_L12_except_error;
    __pyx_L12_except_error:;

    /* "pyrosm_proto.pyx":7311
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.denseinfo.ParseFromDict(d["denseinfo"])
 *         except KeyError:
 */
    __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:;
  }

  /* "pyrosm_proto.pyx":7315
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lat = d["lat"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":7316
 *             pass
 *         try:
 *             self.lat = d["lat"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_lat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7316, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lat, __pyx_t_2) < 0) __PYX_ERR(0, 7316, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":7315
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lat = d["lat"]
 *         except KeyError:
 */
    }
    __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_L21_try_end;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":7317
 *         try:
 *             self.lat = d["lat"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L17_exception_handled;
    }
    goto __pyx_L18_except_error;
    __pyx_L18_except_error:;

    /* "pyrosm_proto.pyx":7315
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lat = d["lat"]
 *         except KeyError:
 */
    __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_L17_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_L21_try_end:;
  }

  /* "pyrosm_proto.pyx":7319
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lon = d["lon"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":7320
 *             pass
 *         try:
 *             self.lon = d["lon"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_lon); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7320, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lon, __pyx_t_2) < 0) __PYX_ERR(0, 7320, __pyx_L22_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":7319
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lon = d["lon"]
 *         except KeyError:
 */
    }
    __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_L27_try_end;
    __pyx_L22_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":7321
 *         try:
 *             self.lon = d["lon"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L23_exception_handled;
    }
    goto __pyx_L24_except_error;
    __pyx_L24_except_error:;

    /* "pyrosm_proto.pyx":7319
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.lon = d["lon"]
 *         except KeyError:
 */
    __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_L23_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_L27_try_end:;
  }

  /* "pyrosm_proto.pyx":7323
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.keys_vals = d["keys_vals"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":7324
 *             pass
 *         try:
 *             self.keys_vals = d["keys_vals"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_keys_vals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7324, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys_vals, __pyx_t_2) < 0) __PYX_ERR(0, 7324, __pyx_L28_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":7323
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.keys_vals = d["keys_vals"]
 *         except KeyError:
 */
    }
    __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_L33_try_end;
    __pyx_L28_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":7325
 *         try:
 *             self.keys_vals = d["keys_vals"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L29_exception_handled;
    }
    goto __pyx_L30_except_error;
    __pyx_L30_except_error:;

    /* "pyrosm_proto.pyx":7323
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.keys_vals = d["keys_vals"]
 *         except KeyError:
 */
    __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_L29_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_L33_try_end:;
  }

  /* "pyrosm_proto.pyx":7328
 *             pass
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7330
 *         self._Modified()
 * 
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7295
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7332
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_44SerializeToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_44SerializeToDict(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_denseinfo_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("SerializeToDict", 0);

  /* "pyrosm_proto.pyx":7339
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if len(self.id) > 0:
 *             out["id"] = list(self.id)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7340
 *         """
 *         out = {}
 *         if len(self.id) > 0:             # <<<<<<<<<<<<<<
 *             out["id"] = list(self.id)
 *         denseinfo_dict = self.denseinfo.SerializeToDict()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":7341
 *         out = {}
 *         if len(self.id) > 0:
 *             out["id"] = list(self.id)             # <<<<<<<<<<<<<<
 *         denseinfo_dict = self.denseinfo.SerializeToDict()
 *         if denseinfo_dict != {}:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_id, __pyx_t_4) < 0)) __PYX_ERR(0, 7341, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":7340
 *         """
 *         out = {}
 *         if len(self.id) > 0:             # <<<<<<<<<<<<<<
 *             out["id"] = list(self.id)
 *         denseinfo_dict = self.denseinfo.SerializeToDict()
 */
  }

  /* "pyrosm_proto.pyx":7342
 *         if len(self.id) > 0:
 *             out["id"] = list(self.id)
 *         denseinfo_dict = self.denseinfo.SerializeToDict()             # <<<<<<<<<<<<<<
 *         if denseinfo_dict != {}:
 *             out["denseinfo"] = denseinfo_dict
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_denseinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_denseinfo_dict = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":7343
 *             out["id"] = list(self.id)
 *         denseinfo_dict = self.denseinfo.SerializeToDict()
 *         if denseinfo_dict != {}:             # <<<<<<<<<<<<<<
 *             out["denseinfo"] = denseinfo_dict
 *         if len(self.lat) > 0:
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_denseinfo_dict, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 7343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":7344
 *         denseinfo_dict = self.denseinfo.SerializeToDict()
 *         if denseinfo_dict != {}:
 *             out["denseinfo"] = denseinfo_dict             # <<<<<<<<<<<<<<
 *         if len(self.lat) > 0:
 *             out["lat"] = list(self.lat)
 */
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_denseinfo, __pyx_v_denseinfo_dict) < 0)) __PYX_ERR(0, 7344, __pyx_L1_error)

    /* "pyrosm_proto.pyx":7343
 *             out["id"] = list(self.id)
 *         denseinfo_dict = self.denseinfo.SerializeToDict()
 *         if denseinfo_dict != {}:             # <<<<<<<<<<<<<<
 *             out["denseinfo"] = denseinfo_dict
 *         if len(self.lat) > 0:
 */
  }

  /* "pyrosm_proto.pyx":7345
 *         if denseinfo_dict != {}:
 *             out["denseinfo"] = denseinfo_dict
 *         if len(self.lat) > 0:             # <<<<<<<<<<<<<<
 *             out["lat"] = list(self.lat)
 *         if len(self.lon) > 0:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7345, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":7346
 *             out["denseinfo"] = denseinfo_dict
 *         if len(self.lat) > 0:
 *             out["lat"] = list(self.lat)             # <<<<<<<<<<<<<<
 *         if len(self.lon) > 0:
 *             out["lon"] = list(self.lon)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_lat, __pyx_t_4) < 0)) __PYX_ERR(0, 7346, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":7345
 *         if denseinfo_dict != {}:
 *             out["denseinfo"] = denseinfo_dict
 *         if len(self.lat) > 0:             # <<<<<<<<<<<<<<
 *             out["lat"] = list(self.lat)
 *         if len(self.lon) > 0:
 */
  }

  /* "pyrosm_proto.pyx":7347
 *         if len(self.lat) > 0:
 *             out["lat"] = list(self.lat)
 *         if len(self.lon) > 0:             # <<<<<<<<<<<<<<
 *             out["lon"] = list(self.lon)
 *         if len(self.keys_vals) > 0:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lon); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7347, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":7348
 *             out["lat"] = list(self.lat)
 *         if len(self.lon) > 0:
 *             out["lon"] = list(self.lon)             # <<<<<<<<<<<<<<
 *         if len(self.keys_vals) > 0:
 *             out["keys_vals"] = list(self.keys_vals)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lon); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_lon, __pyx_t_5) < 0)) __PYX_ERR(0, 7348, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyrosm_proto.pyx":7347
 *         if len(self.lat) > 0:
 *             out["lat"] = list(self.lat)
 *         if len(self.lon) > 0:             # <<<<<<<<<<<<<<
 *             out["lon"] = list(self.lon)
 *         if len(self.keys_vals) > 0:
 */
  }

  /* "pyrosm_proto.pyx":7349
 *         if len(self.lon) > 0:
 *             out["lon"] = list(self.lon)
 *         if len(self.keys_vals) > 0:             # <<<<<<<<<<<<<<
 *             out["keys_vals"] = list(self.keys_vals)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys_vals); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":7350
 *             out["lon"] = list(self.lon)
 *         if len(self.keys_vals) > 0:
 *             out["keys_vals"] = list(self.keys_vals)             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys_vals); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_keys_vals, __pyx_t_4) < 0)) __PYX_ERR(0, 7350, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":7349
 *         if len(self.lon) > 0:
 *             out["lon"] = list(self.lon)
 *         if len(self.keys_vals) > 0:             # <<<<<<<<<<<<<<
 *             out["keys_vals"] = list(self.keys_vals)
 * 
 */
  }

  /* "pyrosm_proto.pyx":7352
 *             out["keys_vals"] = list(self.keys_vals)
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7332
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.SerializeToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_denseinfo_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7354
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_46SerializePartialToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_46SerializePartialToDict(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_denseinfo_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToDict", 0);

  /* "pyrosm_proto.pyx":7361
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if len(self.id) > 0:
 *             out["id"] = list(self.id)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7362
 *         """
 *         out = {}
 *         if len(self.id) > 0:             # <<<<<<<<<<<<<<
 *             out["id"] = list(self.id)
 *         denseinfo_dict = self.denseinfo.SerializePartialToDict()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7362, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":7363
 *         out = {}
 *         if len(self.id) > 0:
 *             out["id"] = list(self.id)             # <<<<<<<<<<<<<<
 *         denseinfo_dict = self.denseinfo.SerializePartialToDict()
 *         if denseinfo_dict != {}:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_id, __pyx_t_4) < 0)) __PYX_ERR(0, 7363, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":7362
 *         """
 *         out = {}
 *         if len(self.id) > 0:             # <<<<<<<<<<<<<<
 *             out["id"] = list(self.id)
 *         denseinfo_dict = self.denseinfo.SerializePartialToDict()
 */
  }

  /* "pyrosm_proto.pyx":7364
 *         if len(self.id) > 0:
 *             out["id"] = list(self.id)
 *         denseinfo_dict = self.denseinfo.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         if denseinfo_dict != {}:
 *             out["denseinfo"] = denseinfo_dict
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_denseinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_denseinfo_dict = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":7365
 *             out["id"] = list(self.id)
 *         denseinfo_dict = self.denseinfo.SerializePartialToDict()
 *         if denseinfo_dict != {}:             # <<<<<<<<<<<<<<
 *             out["denseinfo"] = denseinfo_dict
 *         if len(self.lat) > 0:
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_denseinfo_dict, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7365, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 7365, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":7366
 *         denseinfo_dict = self.denseinfo.SerializePartialToDict()
 *         if denseinfo_dict != {}:
 *             out["denseinfo"] = denseinfo_dict             # <<<<<<<<<<<<<<
 *         if len(self.lat) > 0:
 *             out["lat"] = list(self.lat)
 */
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_denseinfo, __pyx_v_denseinfo_dict) < 0)) __PYX_ERR(0, 7366, __pyx_L1_error)

    /* "pyrosm_proto.pyx":7365
 *             out["id"] = list(self.id)
 *         denseinfo_dict = self.denseinfo.SerializePartialToDict()
 *         if denseinfo_dict != {}:             # <<<<<<<<<<<<<<
 *             out["denseinfo"] = denseinfo_dict
 *         if len(self.lat) > 0:
 */
  }

  /* "pyrosm_proto.pyx":7367
 *         if denseinfo_dict != {}:
 *             out["denseinfo"] = denseinfo_dict
 *         if len(self.lat) > 0:             # <<<<<<<<<<<<<<
 *             out["lat"] = list(self.lat)
 *         if len(self.lon) > 0:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7367, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":7368
 *             out["denseinfo"] = denseinfo_dict
 *         if len(self.lat) > 0:
 *             out["lat"] = list(self.lat)             # <<<<<<<<<<<<<<
 *         if len(self.lon) > 0:
 *             out["lon"] = list(self.lon)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_lat, __pyx_t_4) < 0)) __PYX_ERR(0, 7368, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":7367
 *         if denseinfo_dict != {}:
 *             out["denseinfo"] = denseinfo_dict
 *         if len(self.lat) > 0:             # <<<<<<<<<<<<<<
 *             out["lat"] = list(self.lat)
 *         if len(self.lon) > 0:
 */
  }

  /* "pyrosm_proto.pyx":7369
 *         if len(self.lat) > 0:
 *             out["lat"] = list(self.lat)
 *         if len(self.lon) > 0:             # <<<<<<<<<<<<<<
 *             out["lon"] = list(self.lon)
 *         if len(self.keys_vals) > 0:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lon); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7369, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":7370
 *             out["lat"] = list(self.lat)
 *         if len(self.lon) > 0:
 *             out["lon"] = list(self.lon)             # <<<<<<<<<<<<<<
 *         if len(self.keys_vals) > 0:
 *             out["keys_vals"] = list(self.keys_vals)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lon); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_lon, __pyx_t_5) < 0)) __PYX_ERR(0, 7370, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyrosm_proto.pyx":7369
 *         if len(self.lat) > 0:
 *             out["lat"] = list(self.lat)
 *         if len(self.lon) > 0:             # <<<<<<<<<<<<<<
 *             out["lon"] = list(self.lon)
 *         if len(self.keys_vals) > 0:
 */
  }

  /* "pyrosm_proto.pyx":7371
 *         if len(self.lon) > 0:
 *             out["lon"] = list(self.lon)
 *         if len(self.keys_vals) > 0:             # <<<<<<<<<<<<<<
 *             out["keys_vals"] = list(self.keys_vals)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys_vals); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {

    /* "pyrosm_proto.pyx":7372
 *             out["lon"] = list(self.lon)
 *         if len(self.keys_vals) > 0:
 *             out["keys_vals"] = list(self.keys_vals)             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys_vals); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_keys_vals, __pyx_t_4) < 0)) __PYX_ERR(0, 7372, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":7371
 *         if len(self.lon) > 0:
 *             out["lon"] = list(self.lon)
 *         if len(self.keys_vals) > 0:             # <<<<<<<<<<<<<<
 *             out["keys_vals"] = list(self.keys_vals)
 * 
 */
  }

  /* "pyrosm_proto.pyx":7374
 *             out["keys_vals"] = list(self.keys_vals)
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def Items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7354
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.SerializePartialToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_denseinfo_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_10DenseNodes_50generator44(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":7376
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_48Items[] = "\n        Iterator over the field names and values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_48Items(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_48Items(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_44_Items(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_44_Items, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 7376, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_10DenseNodes_50generator44, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Items, __pyx_n_s_DenseNodes_Items, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 7376, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_10DenseNodes_50generator44(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7376, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7383
 *             iterator
 *         """
 *         yield 'id', self.id             # <<<<<<<<<<<<<<
 *         yield 'denseinfo', self.denseinfo
 *         yield 'lat', self.lat
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_id);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7383, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7384
 *         """
 *         yield 'id', self.id
 *         yield 'denseinfo', self.denseinfo             # <<<<<<<<<<<<<<
 *         yield 'lat', self.lat
 *         yield 'lon', self.lon
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_denseinfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_denseinfo);
  __Pyx_GIVEREF(__pyx_n_s_denseinfo);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_denseinfo);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7384, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7385
 *         yield 'id', self.id
 *         yield 'denseinfo', self.denseinfo
 *         yield 'lat', self.lat             # <<<<<<<<<<<<<<
 *         yield 'lon', self.lon
 *         yield 'keys_vals', self.keys_vals
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_lat);
  __Pyx_GIVEREF(__pyx_n_s_lat);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_lat);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7385, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7386
 *         yield 'denseinfo', self.denseinfo
 *         yield 'lat', self.lat
 *         yield 'lon', self.lon             # <<<<<<<<<<<<<<
 *         yield 'keys_vals', self.keys_vals
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lon); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_lon);
  __Pyx_GIVEREF(__pyx_n_s_lon);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_lon);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7386, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7387
 *         yield 'lat', self.lat
 *         yield 'lon', self.lon
 *         yield 'keys_vals', self.keys_vals             # <<<<<<<<<<<<<<
 * 
 *     def Fields(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_keys_vals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_keys_vals);
  __Pyx_GIVEREF(__pyx_n_s_keys_vals);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_keys_vals);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7387, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":7376
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_10DenseNodes_53generator45(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":7389
 *         yield 'keys_vals', self.keys_vals
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_51Fields[] = "\n        Iterator over the field names of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_51Fields(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_45_Fields(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_45_Fields, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 7389, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_10DenseNodes_53generator45, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Fields, __pyx_n_s_DenseNodes_Fields, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 7389, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_10DenseNodes_53generator45(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7389, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7396
 *             iterator
 *         """
 *         yield 'id'             # <<<<<<<<<<<<<<
 *         yield 'denseinfo'
 *         yield 'lat'
 */
  __Pyx_INCREF(__pyx_n_s_id);
  __pyx_r = __pyx_n_s_id;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7396, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7397
 *         """
 *         yield 'id'
 *         yield 'denseinfo'             # <<<<<<<<<<<<<<
 *         yield 'lat'
 *         yield 'lon'
 */
  __Pyx_INCREF(__pyx_n_s_denseinfo);
  __pyx_r = __pyx_n_s_denseinfo;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7397, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7398
 *         yield 'id'
 *         yield 'denseinfo'
 *         yield 'lat'             # <<<<<<<<<<<<<<
 *         yield 'lon'
 *         yield 'keys_vals'
 */
  __Pyx_INCREF(__pyx_n_s_lat);
  __pyx_r = __pyx_n_s_lat;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7398, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7399
 *         yield 'denseinfo'
 *         yield 'lat'
 *         yield 'lon'             # <<<<<<<<<<<<<<
 *         yield 'keys_vals'
 * 
 */
  __Pyx_INCREF(__pyx_n_s_lon);
  __pyx_r = __pyx_n_s_lon;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7399, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7400
 *         yield 'lat'
 *         yield 'lon'
 *         yield 'keys_vals'             # <<<<<<<<<<<<<<
 * 
 *     def Values(self):
 */
  __Pyx_INCREF(__pyx_n_s_keys_vals);
  __pyx_r = __pyx_n_s_keys_vals;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7400, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":7389
 *         yield 'keys_vals', self.keys_vals
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_10DenseNodes_56generator46(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":7402
 *         yield 'keys_vals'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_54Values[] = "\n        Iterator over the values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_54Values(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_54Values(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_46_Values(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_46_Values, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 7402, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_10DenseNodes_56generator46, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Values, __pyx_n_s_DenseNodes_Values, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 7402, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_10DenseNodes_56generator46(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7402, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7409
 *             iterator
 *         """
 *         yield self.id             # <<<<<<<<<<<<<<
 *         yield self.denseinfo
 *         yield self.lat
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7409, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7410
 *         """
 *         yield self.id
 *         yield self.denseinfo             # <<<<<<<<<<<<<<
 *         yield self.lat
 *         yield self.lon
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_denseinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7410, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7411
 *         yield self.id
 *         yield self.denseinfo
 *         yield self.lat             # <<<<<<<<<<<<<<
 *         yield self.lon
 *         yield self.keys_vals
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7411, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7412
 *         yield self.denseinfo
 *         yield self.lat
 *         yield self.lon             # <<<<<<<<<<<<<<
 *         yield self.keys_vals
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lon); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7412, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7413
 *         yield self.lat
 *         yield self.lon
 *         yield self.keys_vals             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_keys_vals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7413, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":7402
 *         yield 'keys_vals'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_10DenseNodes_59generator47(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":7417
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_10DenseNodes_57Setters[] = "\n        Iterator over functions to set the fields in a message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_57Setters(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_57Setters(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_47_Setters(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_47_Setters, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 7417, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_10DenseNodes_59generator47, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Setters, __pyx_n_s_DenseNodes_Setters, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 7417, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.Setters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7424
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_10DenseNodes_7Setters_1setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_7Setters_1setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_7Setters_setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":7425
 *         """
 *         def setter(value):
 *             self.id = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 7425, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_id, __pyx_v_value) < 0) __PYX_ERR(0, 7425, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7424
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7427
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.denseinfo = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_10DenseNodes_7Setters_3setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_7Setters_3setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_7Setters_2setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":7428
 *         yield setter
 *         def setter(value):
 *             self.denseinfo = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 7428, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_denseinfo, __pyx_v_value) < 0) __PYX_ERR(0, 7428, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7427
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.denseinfo = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7430
 *             self.denseinfo = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lat = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_10DenseNodes_7Setters_5setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_7Setters_5setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_7Setters_4setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":7431
 *         yield setter
 *         def setter(value):
 *             self.lat = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 7431, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lat, __pyx_v_value) < 0) __PYX_ERR(0, 7431, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7430
 *             self.denseinfo = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lat = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7433
 *             self.lat = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lon = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_10DenseNodes_7Setters_7setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_7Setters_7setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_7Setters_6setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":7434
 *         yield setter
 *         def setter(value):
 *             self.lon = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 7434, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lon, __pyx_v_value) < 0) __PYX_ERR(0, 7434, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7433
 *             self.lat = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lon = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7436
 *             self.lon = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys_vals = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_10DenseNodes_7Setters_9setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_7Setters_9setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_7Setters_8setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":7437
 *         yield setter
 *         def setter(value):
 *             self.keys_vals = value             # <<<<<<<<<<<<<<
 *         yield setter
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 7437, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_keys_vals, __pyx_v_value) < 0) __PYX_ERR(0, 7437, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7436
 *             self.lon = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys_vals = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7417
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

static PyObject *__pyx_gb_12pyrosm_proto_10DenseNodes_59generator47(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7417, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7424
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_10DenseNodes_7Setters_1setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_setter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7426
 *         def setter(value):
 *             self.id = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.denseinfo = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7426, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7427
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.denseinfo = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_10DenseNodes_7Setters_3setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7429
 *         def setter(value):
 *             self.denseinfo = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.lat = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7429, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7430
 *             self.denseinfo = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lat = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_10DenseNodes_7Setters_5setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7432
 *         def setter(value):
 *             self.lat = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.lon = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7432, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7433
 *             self.lat = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lon = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_10DenseNodes_7Setters_7setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7435
 *         def setter(value):
 *             self.lon = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.keys_vals = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7435, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7436
 *             self.lon = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys_vals = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_10DenseNodes_7Setters_9setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7438
 *         def setter(value):
 *             self.keys_vals = value
 *         yield setter             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 7438, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":7417
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

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

/* "pyrosm_proto.pxd":414
 *     cdef uint64_t __field_bitmap0
 * 
 *     cdef public bint _is_present_in_parent             # <<<<<<<<<<<<<<
 *     cdef bytes _cached_serialization
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_21_is_present_in_parent___get__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_present_in_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 414, __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("pyrosm_proto.DenseNodes._is_present_in_parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_10DenseNodes_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_10DenseNodes_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_10DenseNodes_21_is_present_in_parent_2__set__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_10DenseNodes_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 414, __pyx_L1_error)
  __pyx_v_self->_is_present_in_parent = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes._is_present_in_parent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_61__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_61__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_12pyrosm_proto_10DenseNodes_60__reduce_cython__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__154, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_63__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_10DenseNodes_63__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_12pyrosm_proto_10DenseNodes_62__setstate_cython__(((struct __pyx_obj_12pyrosm_proto_DenseNodes *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_12pyrosm_proto_10DenseNodes_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_DenseNodes *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__155, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.DenseNodes.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7445
 * cdef class Way:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_3Way_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_3Way_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way___cinit__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static int __pyx_pf_12pyrosm_proto_3Way___cinit__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrosm_proto.pyx":7446
 * 
 *     def __cinit__(self):
 *         self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

  /* "pyrosm_proto.pyx":7445
 * cdef class Way:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

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

/* "pyrosm_proto.pyx":7448
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._keys is not None:
 */

/* Python wrapper */
static void __pyx_pw_12pyrosm_proto_3Way_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrosm_proto_3Way_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrosm_proto_3Way_2__dealloc__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static void __pyx_pf_12pyrosm_proto_3Way_2__dealloc__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrosm_proto.pyx":7450
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         if self._vals is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_keys) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":7451
 *         # Remove any references to self from child messages or repeated fields
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7450
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         if self._vals is not None:
 */
  }

  /* "pyrosm_proto.pyx":7452
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         if self._info is not None:
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_vals) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":7453
 *             self._keys._listener = <PyObject *>null_listener
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7452
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         if self._info is not None:
 */
  }

  /* "pyrosm_proto.pyx":7454
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         if self._refs is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":7455
 *             self._vals._listener = <PyObject *>null_listener
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._refs is not None:
 *             self._refs._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7454
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         if self._refs is not None:
 */
  }

  /* "pyrosm_proto.pyx":7456
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 *         if self._refs is not None:             # <<<<<<<<<<<<<<
 *             self._refs._listener = <PyObject *>null_listener
 * 
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_refs) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":7457
 *             self._info._listener = <PyObject *>null_listener
 *         if self._refs is not None:
 *             self._refs._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, **kwargs):
 */
    __pyx_v_self->_refs->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7456
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 *         if self._refs is not None:             # <<<<<<<<<<<<<<
 *             self._refs._listener = <PyObject *>null_listener
 * 
 */
  }

  /* "pyrosm_proto.pyx":7448
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._keys is not None:
 */

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

/* "pyrosm_proto.pyx":7459
 *             self._refs._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_3Way_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_3Way_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_4__init__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), __pyx_v_kwargs);

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

static int __pyx_pf_12pyrosm_proto_3Way_4__init__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_field_name = NULL;
  PyObject *__pyx_v_field_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrosm_proto.pyx":7460
 * 
 *     def __init__(self, **kwargs):
 *         self.reset()             # <<<<<<<<<<<<<<
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7461
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 7461, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":7462
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('info',):
 */
    __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7462, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7462, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 7462, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7462, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 7462, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7462, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 7462, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 7462, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7462, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7462, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7462, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 7462, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 7462, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":7463
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "pyrosm_proto.pyx":7464
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('info',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('keys','vals','refs',):
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_info, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 7464, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_13 = (__pyx_t_1 != 0);
          if (__pyx_t_13) {

            /* "pyrosm_proto.pyx":7465
 *                 try:
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)             # <<<<<<<<<<<<<<
 *                     elif field_name in ('keys','vals','refs',):
 *                         getattr(self, field_name).extend(field_value)
 */
            __pyx_t_7 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7465, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7465, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_7 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_7)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7465, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":7464
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('info',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('keys','vals','refs',):
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":7466
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('keys','vals','refs',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_keys, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 7466, __pyx_L8_error)
          if (!__pyx_t_1) {
          } else {
            __pyx_t_13 = __pyx_t_1;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_vals, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 7466, __pyx_L8_error)
          if (!__pyx_t_1) {
          } else {
            __pyx_t_13 = __pyx_t_1;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_refs, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 7466, __pyx_L8_error)
          __pyx_t_13 = __pyx_t_1;
          __pyx_L17_bool_binop_done:;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_1 = (__pyx_t_13 != 0);
          if (__pyx_t_1) {

            /* "pyrosm_proto.pyx":7467
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('keys','vals','refs',):
 *                         getattr(self, field_name).extend(field_value)             # <<<<<<<<<<<<<<
 *                     else:
 *                         setattr(self, field_name, field_value)
 */
            __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7467, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_extend); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7467, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
              __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
              if (likely(__pyx_t_6)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_7, function);
              }
            }
            __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7467, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":7466
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('keys','vals','refs',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":7469
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 *                         setattr(self, field_name, field_value)             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 */
          /*else*/ {
            __pyx_t_14 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name, __pyx_v_field_value); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 7469, __pyx_L8_error)
          }
          __pyx_L16:;

          /* "pyrosm_proto.pyx":7463
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L15_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrosm_proto.pyx":7470
 *                     else:
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return
 */
        __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_15) {
          __Pyx_AddTraceback("pyrosm_proto.Way.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 7470, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_6);

          /* "pyrosm_proto.pyx":7471
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))             # <<<<<<<<<<<<<<
 *         return
 * 
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7471, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_field_name);
          __Pyx_GIVEREF(__pyx_v_field_name);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_field_name);
          __pyx_t_16 = __Pyx_PyString_Format(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 7471, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7471, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 7471, __pyx_L10_except_error)
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;

        /* "pyrosm_proto.pyx":7463
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L15_try_end:;
      }

      /* "pyrosm_proto.pyx":7462
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('info',):
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":7461
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  }

  /* "pyrosm_proto.pyx":7472
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7459
 *             self._refs._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("pyrosm_proto.Way.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XDECREF(__pyx_v_field_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7474
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'id',
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_3Way_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_6__str__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_6__str__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_messages = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyrosm_proto.pyx":7475
 * 
 *     def __str__(self):
 *         fields = [             # <<<<<<<<<<<<<<
 *                           'id',
 *                           'keys',
 */
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_id);
  __Pyx_INCREF(__pyx_n_s_keys);
  __Pyx_GIVEREF(__pyx_n_s_keys);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_keys);
  __Pyx_INCREF(__pyx_n_s_vals);
  __Pyx_GIVEREF(__pyx_n_s_vals);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_vals);
  __Pyx_INCREF(__pyx_n_s_refs);
  __Pyx_GIVEREF(__pyx_n_s_refs);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_refs);
  __pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7480
 *                           'vals',
 *                           'refs',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]             # <<<<<<<<<<<<<<
 *         messages = [
 *                             'info',]
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7480, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7480, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7480, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7480, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7480, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 7480, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7481
 *                           'refs',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = [             # <<<<<<<<<<<<<<
 *                             'info',]
 *         for message in messages:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_info);
  __Pyx_GIVEREF(__pyx_n_s_info);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_info);
  __pyx_v_messages = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7483
 *         messages = [
 *                             'info',]
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  __pyx_t_1 = __pyx_v_messages; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7483, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":7484
 *                             'info',]
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))             # <<<<<<<<<<<<<<
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 7484, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":7485
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    __pyx_t_4 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7485, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 7485, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 7485, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7485, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 7485, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7485, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 7485, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":7486
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))             # <<<<<<<<<<<<<<
 *             components.append('}')
 *         return '\n'.join(components)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7486, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_line);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7486, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 7486, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":7485
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":7487
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 *             components.append('}')             # <<<<<<<<<<<<<<
 *         return '\n'.join(components)
 * 
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_kp_s__2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 7487, __pyx_L1_error)

    /* "pyrosm_proto.pyx":7483
 *         messages = [
 *                             'info',]
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7488
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 *         return '\n'.join(components)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7474
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'id',
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.Way.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_messages);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7490
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

static PyObject *__pyx_pw_12pyrosm_proto_3Way_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_3Way_reset(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("reset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7490, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_3Way_9reset)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7490, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7493
 *         # reset values and populate defaults
 * 
 *         self.__field_bitmap0 = 0             # <<<<<<<<<<<<<<
 * 
 *         self._id = 0
 */
  __pyx_v_self->__pyx___field_bitmap0 = 0;

  /* "pyrosm_proto.pyx":7495
 *         self.__field_bitmap0 = 0
 * 
 *         self._id = 0             # <<<<<<<<<<<<<<
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_id = 0;

  /* "pyrosm_proto.pyx":7496
 * 
 *         self._id = 0
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         self._keys = Uint32List.__new__(Uint32List)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_keys) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":7497
 *         self._id = 0
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._keys = Uint32List.__new__(Uint32List)
 *         self._keys._listener = <PyObject *>self
 */
    __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7496
 * 
 *         self._id = 0
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         self._keys = Uint32List.__new__(Uint32List)
 */
  }

  /* "pyrosm_proto.pyx":7498
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 *         self._keys = Uint32List.__new__(Uint32List)             # <<<<<<<<<<<<<<
 *         self._keys._listener = <PyObject *>self
 *         if self._vals is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Uint32List)))) __PYX_ERR(0, 7498, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_keys);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys));
  __pyx_v_self->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7499
 *             self._keys._listener = <PyObject *>null_listener
 *         self._keys = Uint32List.__new__(Uint32List)
 *         self._keys._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":7500
 *         self._keys = Uint32List.__new__(Uint32List)
 *         self._keys._listener = <PyObject *>self
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         self._vals = Uint32List.__new__(Uint32List)
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_vals) != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":7501
 *         self._keys._listener = <PyObject *>self
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._vals = Uint32List.__new__(Uint32List)
 *         self._vals._listener = <PyObject *>self
 */
    __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7500
 *         self._keys = Uint32List.__new__(Uint32List)
 *         self._keys._listener = <PyObject *>self
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         self._vals = Uint32List.__new__(Uint32List)
 */
  }

  /* "pyrosm_proto.pyx":7502
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 *         self._vals = Uint32List.__new__(Uint32List)             # <<<<<<<<<<<<<<
 *         self._vals._listener = <PyObject *>self
 *         if self._info is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Uint32List)))) __PYX_ERR(0, 7502, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_vals);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_vals));
  __pyx_v_self->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7503
 *             self._vals._listener = <PyObject *>null_listener
 *         self._vals = Uint32List.__new__(Uint32List)
 *         self._vals._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":7504
 *         self._vals = Uint32List.__new__(Uint32List)
 *         self._vals._listener = <PyObject *>self
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = None
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":7505
 *         self._vals._listener = <PyObject *>self
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._info = None
 *         if self._refs is not None:
 */
    __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7504
 *         self._vals = Uint32List.__new__(Uint32List)
 *         self._vals._listener = <PyObject *>self
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = None
 */
  }

  /* "pyrosm_proto.pyx":7506
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = None             # <<<<<<<<<<<<<<
 *         if self._refs is not None:
 *             self._refs._listener = <PyObject *>null_listener
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_info);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
  __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)Py_None);

  /* "pyrosm_proto.pyx":7507
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = None
 *         if self._refs is not None:             # <<<<<<<<<<<<<<
 *             self._refs._listener = <PyObject *>null_listener
 *         self._refs = Int64List.__new__(Int64List)
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_refs) != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":7508
 *         self._info = None
 *         if self._refs is not None:
 *             self._refs._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._refs = Int64List.__new__(Int64List)
 *         self._refs._listener = <PyObject *>self
 */
    __pyx_v_self->_refs->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7507
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = None
 *         if self._refs is not None:             # <<<<<<<<<<<<<<
 *             self._refs._listener = <PyObject *>null_listener
 *         self._refs = Int64List.__new__(Int64List)
 */
  }

  /* "pyrosm_proto.pyx":7509
 *         if self._refs is not None:
 *             self._refs._listener = <PyObject *>null_listener
 *         self._refs = Int64List.__new__(Int64List)             # <<<<<<<<<<<<<<
 *         self._refs._listener = <PyObject *>self
 *         return
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int64List)))) __PYX_ERR(0, 7509, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_refs);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_refs));
  __pyx_v_self->_refs = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7510
 *             self._refs._listener = <PyObject *>null_listener
 *         self._refs = Int64List.__new__(Int64List)
 *         self._refs._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_v_self->_refs->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":7511
 *         self._refs = Int64List.__new__(Int64List)
 *         self._refs._listener = <PyObject *>self
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7490
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

  /* 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_WriteUnraisable("pyrosm_proto.Way.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_3Way_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_8reset(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_8reset(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_3Way_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7490, __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("pyrosm_proto.Way.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7515
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._id
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_3Way_2id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_2id___get__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_2id___get__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":7516
 *     @property
 *     def id(self):
 *         return self._id             # <<<<<<<<<<<<<<
 * 
 *     @id.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7515
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._id
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Way.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7519
 * 
 *     @id.setter
 *     def id(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         self._id = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_3Way_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_3Way_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_2id_2__set__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_3Way_2id_2__set__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":7520
 *     @id.setter
 *     def id(self, value):
 *         self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *         self._id = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

  /* "pyrosm_proto.pyx":7521
 *     def id(self, value):
 *         self.__field_bitmap0 |= 1
 *         self._id = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7521, __pyx_L1_error)
  __pyx_v_self->_id = __pyx_t_1;

  /* "pyrosm_proto.pyx":7522
 *         self.__field_bitmap0 |= 1
 *         self._id = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7519
 * 
 *     @id.setter
 *     def id(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         self._id = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7525
 * 
 *     @property
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self._keys
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_4keys_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_3Way_4keys_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_4keys___get__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_4keys___get__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":7526
 *     @property
 *     def keys(self):
 *         return self._keys             # <<<<<<<<<<<<<<
 * 
 *     @keys.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_keys));
  __pyx_r = ((PyObject *)__pyx_v_self->_keys);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7525
 * 
 *     @property
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self._keys
 * 
 */

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

/* "pyrosm_proto.pyx":7529
 * 
 *     @keys.setter
 *     def keys(self, value):             # <<<<<<<<<<<<<<
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_3Way_4keys_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_3Way_4keys_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_4keys_2__set__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_3Way_4keys_2__set__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  uint32_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":7530
 *     @keys.setter
 *     def keys(self, value):
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_keys) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":7531
 *     def keys(self, value):
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7530
 *     @keys.setter
 *     def keys(self, value):
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":7533
 *             self._keys._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":7534
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":7535
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint32_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 7535, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":7536
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":7534
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":7537
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":7534
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":7540
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._keys = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":7541
 *         cdef int i
 *         if memview_available == 1:
 *             self._keys = Uint32List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._keys.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 7541, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 7541, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_keys);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys));
    __pyx_v_self->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":7542
 *         if memview_available == 1:
 *             self._keys = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._keys.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 7542, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7542, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":7543
 *             self._keys = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._keys.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._keys = Uint32List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 7543, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 7543, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_keys->__pyx_vtab)->append(__pyx_v_self->_keys, (*((uint32_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":7544
 *             for i in range(memview.size):
 *                 self._keys.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._keys = Uint32List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7540
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._keys = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":7545
 *                 self._keys.append(memview[i])
 *             return
 *         self._keys = Uint32List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._keys.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 7545, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_keys);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys));
  __pyx_v_self->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":7546
 *             return
 *         self._keys = Uint32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._keys.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 7546, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 7546, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7546, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 7546, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7546, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 7546, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":7547
 *         self._keys = Uint32List(listener=self)
 *         for val in value:
 *             self._keys.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_uint32_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7547, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_keys->__pyx_vtab)->append(__pyx_v_self->_keys, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":7546
 *             return
 *         self._keys = Uint32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._keys.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":7548
 *         for val in value:
 *             self._keys.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7529
 * 
 *     @keys.setter
 *     def keys(self, value):             # <<<<<<<<<<<<<<
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.Way.keys.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7551
 * 
 *     @property
 *     def vals(self):             # <<<<<<<<<<<<<<
 *         return self._vals
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_4vals_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_3Way_4vals_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_4vals___get__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_4vals___get__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":7552
 *     @property
 *     def vals(self):
 *         return self._vals             # <<<<<<<<<<<<<<
 * 
 *     @vals.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_vals));
  __pyx_r = ((PyObject *)__pyx_v_self->_vals);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7551
 * 
 *     @property
 *     def vals(self):             # <<<<<<<<<<<<<<
 *         return self._vals
 * 
 */

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

/* "pyrosm_proto.pyx":7555
 * 
 *     @vals.setter
 *     def vals(self, value):             # <<<<<<<<<<<<<<
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_3Way_4vals_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_3Way_4vals_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_4vals_2__set__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_3Way_4vals_2__set__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  uint32_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":7556
 *     @vals.setter
 *     def vals(self, value):
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_vals) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":7557
 *     def vals(self, value):
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7556
 *     @vals.setter
 *     def vals(self, value):
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":7559
 *             self._vals._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":7560
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":7561
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint32_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 7561, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":7562
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":7560
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":7563
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":7560
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":7566
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._vals = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":7567
 *         cdef int i
 *         if memview_available == 1:
 *             self._vals = Uint32List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._vals.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 7567, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 7567, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_vals);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_vals));
    __pyx_v_self->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":7568
 *         if memview_available == 1:
 *             self._vals = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._vals.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 7568, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7568, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":7569
 *             self._vals = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._vals.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._vals = Uint32List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 7569, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 7569, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_vals->__pyx_vtab)->append(__pyx_v_self->_vals, (*((uint32_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7569, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":7570
 *             for i in range(memview.size):
 *                 self._vals.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._vals = Uint32List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7566
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._vals = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":7571
 *                 self._vals.append(memview[i])
 *             return
 *         self._vals = Uint32List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._vals.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 7571, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_vals);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_vals));
  __pyx_v_self->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":7572
 *             return
 *         self._vals = Uint32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._vals.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 7572, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 7572, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7572, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 7572, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7572, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 7572, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":7573
 *         self._vals = Uint32List(listener=self)
 *         for val in value:
 *             self._vals.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_uint32_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7573, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_vals->__pyx_vtab)->append(__pyx_v_self->_vals, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":7572
 *             return
 *         self._vals = Uint32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._vals.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":7574
 *         for val in value:
 *             self._vals.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7555
 * 
 *     @vals.setter
 *     def vals(self, value):             # <<<<<<<<<<<<<<
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.Way.vals.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7577
 * 
 *     @property
 *     def info(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._info is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_4info_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_3Way_4info_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_4info___get__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_4info___get__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":7579
 *     def info(self):
 *         # lazy init sub messages
 *         if self._info is None:             # <<<<<<<<<<<<<<
 *             self._info = Info.__new__(Info)
 *             self._info.reset()
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_info) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":7580
 *         # lazy init sub messages
 *         if self._info is None:
 *             self._info = Info.__new__(Info)             # <<<<<<<<<<<<<<
 *             self._info.reset()
 *             self._info._listener = <PyObject *>self
 */
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_Info(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7580, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __Pyx_GOTREF(__pyx_v_self->_info);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
    __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":7581
 *         if self._info is None:
 *             self._info = Info.__new__(Info)
 *             self._info.reset()             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>self
 *         return self._info
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->reset(__pyx_v_self->_info, 0);

    /* "pyrosm_proto.pyx":7582
 *             self._info = Info.__new__(Info)
 *             self._info.reset()
 *             self._info._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return self._info
 * 
 */
    __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":7579
 *     def info(self):
 *         # lazy init sub messages
 *         if self._info is None:             # <<<<<<<<<<<<<<
 *             self._info = Info.__new__(Info)
 *             self._info.reset()
 */
  }

  /* "pyrosm_proto.pyx":7583
 *             self._info.reset()
 *             self._info._listener = <PyObject *>self
 *         return self._info             # <<<<<<<<<<<<<<
 * 
 *     @info.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_info));
  __pyx_r = ((PyObject *)__pyx_v_self->_info);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7577
 * 
 *     @property
 *     def info(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._info is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Way.info.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7586
 * 
 *     @info.setter
 *     def info(self, value):             # <<<<<<<<<<<<<<
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_3Way_4info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_3Way_4info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_4info_2__set__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_3Way_4info_2__set__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":7587
 *     @info.setter
 *     def info(self, value):
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = value
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":7588
 *     def info(self, value):
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._info = value
 *         self._info._listener = <PyObject *>self
 */
    __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7587
 *     @info.setter
 *     def info(self, value):
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = value
 */
  }

  /* "pyrosm_proto.pyx":7589
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = value             # <<<<<<<<<<<<<<
 *         self._info._listener = <PyObject *>self
 *         self._Modified()
 */
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_12pyrosm_proto_Info))))) __PYX_ERR(0, 7589, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_info);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
  __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":7590
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = value
 *         self._info._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":7591
 *         self._info = value
 *         self._info._listener = <PyObject *>self
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7586
 * 
 *     @info.setter
 *     def info(self, value):             # <<<<<<<<<<<<<<
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Way.info.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7594
 * 
 *     @property
 *     def refs(self):             # <<<<<<<<<<<<<<
 *         return self._refs
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_4refs_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_3Way_4refs_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_4refs___get__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_4refs___get__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":7595
 *     @property
 *     def refs(self):
 *         return self._refs             # <<<<<<<<<<<<<<
 * 
 *     @refs.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_refs));
  __pyx_r = ((PyObject *)__pyx_v_self->_refs);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7594
 * 
 *     @property
 *     def refs(self):             # <<<<<<<<<<<<<<
 *         return self._refs
 * 
 */

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

/* "pyrosm_proto.pyx":7598
 * 
 *     @refs.setter
 *     def refs(self, value):             # <<<<<<<<<<<<<<
 *         if self._refs is not None:
 *             self._refs._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_3Way_4refs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_3Way_4refs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_4refs_2__set__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_3Way_4refs_2__set__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int64_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":7599
 *     @refs.setter
 *     def refs(self, value):
 *         if self._refs is not None:             # <<<<<<<<<<<<<<
 *             self._refs._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_refs) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":7600
 *     def refs(self, value):
 *         if self._refs is not None:
 *             self._refs._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_refs->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7599
 *     @refs.setter
 *     def refs(self, value):
 *         if self._refs is not None:             # <<<<<<<<<<<<<<
 *             self._refs._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":7602
 *             self._refs._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":7603
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":7604
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_int64_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 7604, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":7605
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":7603
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":7606
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":7603
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":7609
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._refs = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":7610
 *         cdef int i
 *         if memview_available == 1:
 *             self._refs = Int64List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._refs.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 7610, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int64_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 7610, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_refs);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_refs));
    __pyx_v_self->_refs = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":7611
 *         if memview_available == 1:
 *             self._refs = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._refs.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 7611, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int64_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7611, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":7612
 *             self._refs = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._refs.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._refs = Int64List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 7612, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 7612, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_refs->__pyx_vtab)->append(__pyx_v_self->_refs, (*((int64_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":7613
 *             for i in range(memview.size):
 *                 self._refs.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._refs = Int64List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7609
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._refs = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":7614
 *                 self._refs.append(memview[i])
 *             return
 *         self._refs = Int64List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._refs.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 7614, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_refs);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_refs));
  __pyx_v_self->_refs = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":7615
 *             return
 *         self._refs = Int64List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._refs.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 7615, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 7615, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7615, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 7615, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7615, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 7615, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":7616
 *         self._refs = Int64List(listener=self)
 *         for val in value:
 *             self._refs.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_int64_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7616, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_refs->__pyx_vtab)->append(__pyx_v_self->_refs, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":7615
 *             return
 *         self._refs = Int64List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._refs.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":7617
 *         for val in value:
 *             self._refs.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7598
 * 
 *     @refs.setter
 *     def refs(self, value):             # <<<<<<<<<<<<<<
 *         if self._refs is not None:
 *             self._refs._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.Way.refs.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7620
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

static int __pyx_f_12pyrosm_proto_3Way__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, int __pyx_v_cache) {
  int __pyx_v_current_offset;
  int64_t __pyx_v_key;
  int64_t __pyx_v_field_size;
  int64_t __pyx_v_keys_marker;
  uint32_t __pyx_v_keys_elt;
  int64_t __pyx_v_vals_marker;
  uint32_t __pyx_v_vals_elt;
  int64_t __pyx_v_refs_marker;
  int64_t __pyx_v_refs_elt;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_protobuf_deserialize", 0);

  /* "pyrosm_proto.pyx":7621
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):
 *         cdef int current_offset = 0             # <<<<<<<<<<<<<<
 *         cdef int64_t key
 *         cdef int64_t field_size
 */
  __pyx_v_current_offset = 0;

  /* "pyrosm_proto.pyx":7630
 *         cdef int64_t refs_marker
 *         cdef int64_t refs_elt
 *         while current_offset < size:             # <<<<<<<<<<<<<<
 *             key = get_varint64(memory, &current_offset)
 *             # id
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_current_offset < __pyx_v_size) != 0);
    if (!__pyx_t_1) break;

    /* "pyrosm_proto.pyx":7631
 *         cdef int64_t refs_elt
 *         while current_offset < size:
 *             key = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # id
 *             if key == 8:
 */
    __pyx_v_key = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

    /* "pyrosm_proto.pyx":7633
 *             key = get_varint64(memory, &current_offset)
 *             # id
 *             if key == 8:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 self._id = get_varint64(memory, &current_offset)
 */
    switch (__pyx_v_key) {
      case 8:

      /* "pyrosm_proto.pyx":7634
 *             # id
 *             if key == 8:
 *                 self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *                 self._id = get_varint64(memory, &current_offset)
 *             # keys
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

      /* "pyrosm_proto.pyx":7635
 *             if key == 8:
 *                 self.__field_bitmap0 |= 1
 *                 self._id = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # keys
 *             elif key == 18:
 */
      __pyx_v_self->_id = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":7633
 *             key = get_varint64(memory, &current_offset)
 *             # id
 *             if key == 8:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 self._id = get_varint64(memory, &current_offset)
 */
      break;
      case 18:

      /* "pyrosm_proto.pyx":7638
 *             # keys
 *             elif key == 18:
 *                 keys_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 keys_marker += current_offset
 * 
 */
      __pyx_v_keys_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":7639
 *             elif key == 18:
 *                 keys_marker = get_varint64(memory, &current_offset)
 *                 keys_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>keys_marker:
 */
      __pyx_v_keys_marker = (__pyx_v_keys_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":7641
 *                 keys_marker += current_offset
 * 
 *                 while current_offset < <int>keys_marker:             # <<<<<<<<<<<<<<
 *                     keys_elt = get_varint32(memory, &current_offset)
 *                     self._keys._append(keys_elt)
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_current_offset < ((int)__pyx_v_keys_marker)) != 0);
        if (!__pyx_t_1) break;

        /* "pyrosm_proto.pyx":7642
 * 
 *                 while current_offset < <int>keys_marker:
 *                     keys_elt = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._keys._append(keys_elt)
 *             # vals
 */
        __pyx_v_keys_elt = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":7643
 *                 while current_offset < <int>keys_marker:
 *                     keys_elt = get_varint32(memory, &current_offset)
 *                     self._keys._append(keys_elt)             # <<<<<<<<<<<<<<
 *             # vals
 *             elif key == 26:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_keys->__pyx_vtab)->_append(__pyx_v_self->_keys, __pyx_v_keys_elt);
      }

      /* "pyrosm_proto.pyx":7637
 *                 self._id = get_varint64(memory, &current_offset)
 *             # keys
 *             elif key == 18:             # <<<<<<<<<<<<<<
 *                 keys_marker = get_varint64(memory, &current_offset)
 *                 keys_marker += current_offset
 */
      break;
      case 26:

      /* "pyrosm_proto.pyx":7646
 *             # vals
 *             elif key == 26:
 *                 vals_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 vals_marker += current_offset
 * 
 */
      __pyx_v_vals_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":7647
 *             elif key == 26:
 *                 vals_marker = get_varint64(memory, &current_offset)
 *                 vals_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>vals_marker:
 */
      __pyx_v_vals_marker = (__pyx_v_vals_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":7649
 *                 vals_marker += current_offset
 * 
 *                 while current_offset < <int>vals_marker:             # <<<<<<<<<<<<<<
 *                     vals_elt = get_varint32(memory, &current_offset)
 *                     self._vals._append(vals_elt)
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_current_offset < ((int)__pyx_v_vals_marker)) != 0);
        if (!__pyx_t_1) break;

        /* "pyrosm_proto.pyx":7650
 * 
 *                 while current_offset < <int>vals_marker:
 *                     vals_elt = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._vals._append(vals_elt)
 *             # info
 */
        __pyx_v_vals_elt = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":7651
 *                 while current_offset < <int>vals_marker:
 *                     vals_elt = get_varint32(memory, &current_offset)
 *                     self._vals._append(vals_elt)             # <<<<<<<<<<<<<<
 *             # info
 *             elif key == 34:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_vals->__pyx_vtab)->_append(__pyx_v_self->_vals, __pyx_v_vals_elt);
      }

      /* "pyrosm_proto.pyx":7645
 *                     self._keys._append(keys_elt)
 *             # vals
 *             elif key == 26:             # <<<<<<<<<<<<<<
 *                 vals_marker = get_varint64(memory, &current_offset)
 *                 vals_marker += current_offset
 */
      break;
      case 34:

      /* "pyrosm_proto.pyx":7654
 *             # info
 *             elif key == 34:
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 if self._info is None:
 *                     self._info = Info.__new__(Info)
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":7655
 *             elif key == 34:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._info is None:             # <<<<<<<<<<<<<<
 *                     self._info = Info.__new__(Info)
 *                     self._info._listener = <PyObject *>self
 */
      __pyx_t_1 = (((PyObject *)__pyx_v_self->_info) == Py_None);
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "pyrosm_proto.pyx":7656
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._info is None:
 *                     self._info = Info.__new__(Info)             # <<<<<<<<<<<<<<
 *                     self._info._listener = <PyObject *>self
 *                 self._info.reset()
 */
        __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_Info(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7656, __pyx_L1_error)
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
        __Pyx_GOTREF(__pyx_v_self->_info);
        __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
        __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyrosm_proto.pyx":7657
 *                 if self._info is None:
 *                     self._info = Info.__new__(Info)
 *                     self._info._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *                 self._info.reset()
 *                 if cache:
 */
        __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_self);

        /* "pyrosm_proto.pyx":7655
 *             elif key == 34:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._info is None:             # <<<<<<<<<<<<<<
 *                     self._info = Info.__new__(Info)
 *                     self._info._listener = <PyObject *>self
 */
      }

      /* "pyrosm_proto.pyx":7658
 *                     self._info = Info.__new__(Info)
 *                     self._info._listener = <PyObject *>self
 *                 self._info.reset()             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     self._info._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->reset(__pyx_v_self->_info, 0);

      /* "pyrosm_proto.pyx":7659
 *                     self._info._listener = <PyObject *>self
 *                 self._info.reset()
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._info._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._info._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      __pyx_t_2 = (__pyx_v_cache != 0);
      if (__pyx_t_2) {

        /* "pyrosm_proto.pyx":7660
 *                 self._info.reset()
 *                 if cache:
 *                     self._info._cached_serialization = bytes(memory[current_offset:current_offset+field_size])             # <<<<<<<<<<<<<<
 *                 current_offset += self._info._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *             # refs
 */
        __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7660, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7660, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_self->_info->_cached_serialization);
        __Pyx_DECREF(__pyx_v_self->_info->_cached_serialization);
        __pyx_v_self->_info->_cached_serialization = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyrosm_proto.pyx":7659
 *                     self._info._listener = <PyObject *>self
 *                 self._info.reset()
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._info._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._info._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      }

      /* "pyrosm_proto.pyx":7661
 *                 if cache:
 *                     self._info._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._info._protobuf_deserialize(memory+current_offset, <int>field_size, cache)             # <<<<<<<<<<<<<<
 *             # refs
 *             elif key == 66:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self->_info, (__pyx_v_memory + __pyx_v_current_offset), ((int)__pyx_v_field_size), __pyx_v_cache));

      /* "pyrosm_proto.pyx":7653
 *                     self._vals._append(vals_elt)
 *             # info
 *             elif key == 34:             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._info is None:
 */
      break;
      case 66:

      /* "pyrosm_proto.pyx":7664
 *             # refs
 *             elif key == 66:
 *                 refs_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 refs_marker += current_offset
 * 
 */
      __pyx_v_refs_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":7665
 *             elif key == 66:
 *                 refs_marker = get_varint64(memory, &current_offset)
 *                 refs_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>refs_marker:
 */
      __pyx_v_refs_marker = (__pyx_v_refs_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":7667
 *                 refs_marker += current_offset
 * 
 *                 while current_offset < <int>refs_marker:             # <<<<<<<<<<<<<<
 *                     refs_elt = get_signed_varint64(memory, &current_offset)
 *                     self._refs._append(refs_elt)
 */
      while (1) {
        __pyx_t_2 = ((__pyx_v_current_offset < ((int)__pyx_v_refs_marker)) != 0);
        if (!__pyx_t_2) break;

        /* "pyrosm_proto.pyx":7668
 * 
 *                 while current_offset < <int>refs_marker:
 *                     refs_elt = get_signed_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._refs._append(refs_elt)
 *             # Unknown field - need to skip proper number of bytes
 */
        __pyx_v_refs_elt = __pyx_f_12pyrobuf_util_get_signed_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":7669
 *                 while current_offset < <int>refs_marker:
 *                     refs_elt = get_signed_varint64(memory, &current_offset)
 *                     self._refs._append(refs_elt)             # <<<<<<<<<<<<<<
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_refs->__pyx_vtab)->_append(__pyx_v_self->_refs, __pyx_v_refs_elt);
      }

      /* "pyrosm_proto.pyx":7663
 *                 current_offset += self._info._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *             # refs
 *             elif key == 66:             # <<<<<<<<<<<<<<
 *                 refs_marker = get_varint64(memory, &current_offset)
 *                 refs_marker += current_offset
 */
      break;
      default:

      /* "pyrosm_proto.pyx":7672
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)             # <<<<<<<<<<<<<<
 * 
 *         self._is_present_in_parent = True
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        if (unlikely(!(__pyx_f_12pyrobuf_util_skip_generic(__pyx_v_memory, (&__pyx_v_current_offset), __pyx_v_size, (__pyx_v_key & 0x7)) != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 7672, __pyx_L1_error)
        }
      }
      #endif
      break;
    }
  }

  /* "pyrosm_proto.pyx":7674
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)
 * 
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 * 
 *         return current_offset
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":7676
 *         self._is_present_in_parent = True
 * 
 *         return current_offset             # <<<<<<<<<<<<<<
 * 
 *     cpdef void Clear(self):
 */
  __pyx_r = __pyx_v_current_offset;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7620
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pyrosm_proto.Way._protobuf_deserialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7678
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

static PyObject *__pyx_pw_12pyrosm_proto_3Way_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_3Way_Clear(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7678, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_3Way_11Clear)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7678, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7680
 *     cpdef void Clear(self):
 *         """Clears all data that was set in the message."""
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7681
 *         """Clears all data that was set in the message."""
 *         self.reset()
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void ClearField(self, field_name):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7678
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Way.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_10Clear[] = "Clears all data that was set in the message.";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Clear (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_10Clear(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_10Clear(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_3Way_Clear(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7678, __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("pyrosm_proto.Way.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7683
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':
 */

static PyObject *__pyx_pw_12pyrosm_proto_3Way_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static void __pyx_f_12pyrosm_proto_3Way_ClearField(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("ClearField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ClearField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_3Way_13ClearField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7683, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7685
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_id, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7685, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":7686
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':
 *             self.__field_bitmap0 &= ~1             # <<<<<<<<<<<<<<
 *             self._id = 0
 *         elif field_name == 'keys':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~1));

    /* "pyrosm_proto.pyx":7687
 *         if field_name == 'id':
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0             # <<<<<<<<<<<<<<
 *         elif field_name == 'keys':
 *             self._keys._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_id = 0;

    /* "pyrosm_proto.pyx":7685
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":7688
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0
 *         elif field_name == 'keys':             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *             self._keys = Uint32List.__new__(Uint32List)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_keys, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7688, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":7689
 *             self._id = 0
 *         elif field_name == 'keys':
 *             self._keys._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._keys = Uint32List.__new__(Uint32List)
 *             self._keys._listener = <PyObject *>self
 */
    __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7690
 *         elif field_name == 'keys':
 *             self._keys._listener = <PyObject *>null_listener
 *             self._keys = Uint32List.__new__(Uint32List)             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>self
 *         elif field_name == 'vals':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Uint32List)))) __PYX_ERR(0, 7690, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_keys);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys));
    __pyx_v_self->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7691
 *             self._keys._listener = <PyObject *>null_listener
 *             self._keys = Uint32List.__new__(Uint32List)
 *             self._keys._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'vals':
 *             self._vals._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":7688
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0
 *         elif field_name == 'keys':             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *             self._keys = Uint32List.__new__(Uint32List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":7692
 *             self._keys = Uint32List.__new__(Uint32List)
 *             self._keys._listener = <PyObject *>self
 *         elif field_name == 'vals':             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *             self._vals = Uint32List.__new__(Uint32List)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_vals, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7692, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":7693
 *             self._keys._listener = <PyObject *>self
 *         elif field_name == 'vals':
 *             self._vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._vals = Uint32List.__new__(Uint32List)
 *             self._vals._listener = <PyObject *>self
 */
    __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7694
 *         elif field_name == 'vals':
 *             self._vals._listener = <PyObject *>null_listener
 *             self._vals = Uint32List.__new__(Uint32List)             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>self
 *         elif field_name == 'info':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Uint32List)))) __PYX_ERR(0, 7694, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_vals);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_vals));
    __pyx_v_self->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7695
 *             self._vals._listener = <PyObject *>null_listener
 *             self._vals = Uint32List.__new__(Uint32List)
 *             self._vals._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'info':
 *             if self._info is not None:
 */
    __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":7692
 *             self._keys = Uint32List.__new__(Uint32List)
 *             self._keys._listener = <PyObject *>self
 *         elif field_name == 'vals':             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *             self._vals = Uint32List.__new__(Uint32List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":7696
 *             self._vals = Uint32List.__new__(Uint32List)
 *             self._vals._listener = <PyObject *>self
 *         elif field_name == 'info':             # <<<<<<<<<<<<<<
 *             if self._info is not None:
 *                 self._info._listener = <PyObject *>null_listener
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_info, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7696, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":7697
 *             self._vals._listener = <PyObject *>self
 *         elif field_name == 'info':
 *             if self._info is not None:             # <<<<<<<<<<<<<<
 *                 self._info._listener = <PyObject *>null_listener
 *             self._info = None
 */
    __pyx_t_5 = (((PyObject *)__pyx_v_self->_info) != Py_None);
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "pyrosm_proto.pyx":7698
 *         elif field_name == 'info':
 *             if self._info is not None:
 *                 self._info._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._info = None
 *         elif field_name == 'refs':
 */
      __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

      /* "pyrosm_proto.pyx":7697
 *             self._vals._listener = <PyObject *>self
 *         elif field_name == 'info':
 *             if self._info is not None:             # <<<<<<<<<<<<<<
 *                 self._info._listener = <PyObject *>null_listener
 *             self._info = None
 */
    }

    /* "pyrosm_proto.pyx":7699
 *             if self._info is not None:
 *                 self._info._listener = <PyObject *>null_listener
 *             self._info = None             # <<<<<<<<<<<<<<
 *         elif field_name == 'refs':
 *             self._refs._listener = <PyObject *>null_listener
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->_info);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
    __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)Py_None);

    /* "pyrosm_proto.pyx":7696
 *             self._vals = Uint32List.__new__(Uint32List)
 *             self._vals._listener = <PyObject *>self
 *         elif field_name == 'info':             # <<<<<<<<<<<<<<
 *             if self._info is not None:
 *                 self._info._listener = <PyObject *>null_listener
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":7700
 *                 self._info._listener = <PyObject *>null_listener
 *             self._info = None
 *         elif field_name == 'refs':             # <<<<<<<<<<<<<<
 *             self._refs._listener = <PyObject *>null_listener
 *             self._refs = Int64List.__new__(Int64List)
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_refs, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 7700, __pyx_L1_error)
  if (likely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":7701
 *             self._info = None
 *         elif field_name == 'refs':
 *             self._refs._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._refs = Int64List.__new__(Int64List)
 *             self._refs._listener = <PyObject *>self
 */
    __pyx_v_self->_refs->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":7702
 *         elif field_name == 'refs':
 *             self._refs._listener = <PyObject *>null_listener
 *             self._refs = Int64List.__new__(Int64List)             # <<<<<<<<<<<<<<
 *             self._refs._listener = <PyObject *>self
 *         else:
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int64List)))) __PYX_ERR(0, 7702, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_refs);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_refs));
    __pyx_v_self->_refs = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7703
 *             self._refs._listener = <PyObject *>null_listener
 *             self._refs = Int64List.__new__(Int64List)
 *             self._refs._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 */
    __pyx_v_self->_refs->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":7700
 *                 self._info._listener = <PyObject *>null_listener
 *             self._info = None
 *         elif field_name == 'refs':             # <<<<<<<<<<<<<<
 *             self._refs._listener = <PyObject *>null_listener
 *             self._refs = Int64List.__new__(Int64List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":7705
 *             self._refs._listener = <PyObject *>self
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 7705, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":7707
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void CopyFrom(self, Way other_msg):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7683
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Way.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_12ClearField[] = "Clears the contents of a given field.";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ClearField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_12ClearField(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_12ClearField(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ClearField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_3Way_ClearField(__pyx_v_self, __pyx_v_field_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7683, __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("pyrosm_proto.Way.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7709
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, Way other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_3Way_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_3Way_CopyFrom(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CopyFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7709, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_3Way_15CopyFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7709, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7716
 *             other_msg (Way): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":7717
 *         """
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 *         self.reset()
 *         self.MergeFrom(other_msg)
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7716
 *             other_msg (Way): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  }

  /* "pyrosm_proto.pyx":7718
 *         if self is other_msg:
 *             return
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self.MergeFrom(other_msg)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7719
 *             return
 *         self.reset()
 *         self.MergeFrom(other_msg)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint HasField(self, field_name) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->MergeFrom(__pyx_v_self, __pyx_v_other_msg, 0);

  /* "pyrosm_proto.pyx":7709
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, Way other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Way.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_14CopyFrom[] = "\n        Copies the content of the specified message into the current message.\n\n        Params:\n            other_msg (Way): Message to copy into the current one.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CopyFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_Way, 1, "other_msg", 0))) __PYX_ERR(0, 7709, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_14CopyFrom(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_14CopyFrom(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_3Way_CopyFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7709, __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("pyrosm_proto.Way.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7721
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_3Way_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static int __pyx_f_12pyrosm_proto_3Way_HasField(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("HasField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_HasField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7721, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_3Way_17HasField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7721, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7721, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7728
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'info':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_id, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7728, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":7729
 *         """
 *         if field_name == 'id':
 *             return self.__field_bitmap0 & 1 == 1             # <<<<<<<<<<<<<<
 *         if field_name == 'info':
 *             return self._info is not None and self._info._is_present_in_parent
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7728
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'info':
 */
  }

  /* "pyrosm_proto.pyx":7730
 *         if field_name == 'id':
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'info':             # <<<<<<<<<<<<<<
 *             return self._info is not None and self._info._is_present_in_parent
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_info, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7730, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":7731
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'info':
 *             return self._info is not None and self._info._is_present_in_parent             # <<<<<<<<<<<<<<
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_info) != Py_None);
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_5 = __pyx_t_7;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->_info->_is_present_in_parent != 0);
    __pyx_t_5 = __pyx_t_7;
    __pyx_L5_bool_binop_done:;
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7730
 *         if field_name == 'id':
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'info':             # <<<<<<<<<<<<<<
 *             return self._info is not None and self._info._is_present_in_parent
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  }

  /* "pyrosm_proto.pyx":7732
 *         if field_name == 'info':
 *             return self._info is not None and self._info._is_present_in_parent
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint IsInitialized(self):
 */
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_singular, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 7732, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7721
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

  /* 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("pyrosm_proto.Way.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_16HasField[] = "\n        Checks if a certain field is set for the message.\n\n        Params:\n            field_name (str): The name of the field to check.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_16HasField(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_16HasField(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("HasField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_3Way_HasField(__pyx_v_self, __pyx_v_field_name, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7721, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.Way.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7734
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

static PyObject *__pyx_pw_12pyrosm_proto_3Way_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_12pyrosm_proto_3Way_IsInitialized(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_IsInitialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7734, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_3Way_19IsInitialized)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7734, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7734, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7744
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             return False
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 */
  __pyx_t_5 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":7745
 * 
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False             # <<<<<<<<<<<<<<
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             return False
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7744
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             return False
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 */
  }

  /* "pyrosm_proto.pyx":7746
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_self->_info->_is_present_in_parent != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->IsInitialized(__pyx_v_self->_info, 0) != 0)) != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":7747
 *             return False
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         return True
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7746
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  }

  /* "pyrosm_proto.pyx":7749
 *             return False
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef void MergeFrom(self, Way other_msg):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7734
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

  /* 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_WriteUnraisable("pyrosm_proto.Way.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_18IsInitialized[] = "\n        Checks if the message is initialized.\n\n        Returns:\n            bool: True if the message is initialized (i.e. all of its required\n                fields are set).\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsInitialized (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_18IsInitialized(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_18IsInitialized(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_12pyrosm_proto_3Way_IsInitialized(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7734, __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("pyrosm_proto.Way.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7751
 *         return True
 * 
 *     cpdef void MergeFrom(self, Way other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_3Way_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_3Way_MergeFrom(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int64_t __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7751, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_3Way_21MergeFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7751, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7760
 *         cdef int i
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":7761
 * 
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7760
 *         cdef int i
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "pyrosm_proto.pyx":7764
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._id = other_msg._id
 *             self.__field_bitmap0 |= 1
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":7765
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._id = other_msg._id             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 1
 *         self._keys.extend(other_msg._keys)
 */
    __pyx_t_7 = __pyx_v_other_msg->_id;
    __pyx_v_self->_id = __pyx_t_7;

    /* "pyrosm_proto.pyx":7766
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._id = other_msg._id
 *             self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *         self._keys.extend(other_msg._keys)
 *         self._vals.extend(other_msg._vals)
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

    /* "pyrosm_proto.pyx":7764
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._id = other_msg._id
 *             self.__field_bitmap0 |= 1
 */
  }

  /* "pyrosm_proto.pyx":7767
 *             self._id = other_msg._id
 *             self.__field_bitmap0 |= 1
 *         self._keys.extend(other_msg._keys)             # <<<<<<<<<<<<<<
 *         self._vals.extend(other_msg._vals)
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_keys);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_keys->__pyx_vtab)->extend(__pyx_v_self->_keys, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7767, __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;

  /* "pyrosm_proto.pyx":7768
 *             self.__field_bitmap0 |= 1
 *         self._keys.extend(other_msg._keys)
 *         self._vals.extend(other_msg._vals)             # <<<<<<<<<<<<<<
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:
 *             if self._info is None:
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_other_msg->_vals);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_vals->__pyx_vtab)->extend(__pyx_v_self->_vals, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7768, __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;

  /* "pyrosm_proto.pyx":7769
 *         self._keys.extend(other_msg._keys)
 *         self._vals.extend(other_msg._vals)
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             if self._info is None:
 *                 self._info = Info.__new__(Info)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_other_msg->_info) != Py_None);
  __pyx_t_8 = (__pyx_t_5 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_other_msg->_info->_is_present_in_parent != 0);
  __pyx_t_6 = __pyx_t_8;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":7770
 *         self._vals.extend(other_msg._vals)
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:
 *             if self._info is None:             # <<<<<<<<<<<<<<
 *                 self._info = Info.__new__(Info)
 *                 self._info.reset()
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_info) == Py_None);
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (__pyx_t_8) {

      /* "pyrosm_proto.pyx":7771
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:
 *             if self._info is None:
 *                 self._info = Info.__new__(Info)             # <<<<<<<<<<<<<<
 *                 self._info.reset()
 *                 self._info._listener = <PyObject *>self
 */
      __pyx_t_1 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_Info(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7771, __pyx_L1_error)
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
      __Pyx_GOTREF(__pyx_v_self->_info);
      __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
      __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyrosm_proto.pyx":7772
 *             if self._info is None:
 *                 self._info = Info.__new__(Info)
 *                 self._info.reset()             # <<<<<<<<<<<<<<
 *                 self._info._listener = <PyObject *>self
 *             self._info.MergeFrom(other_msg._info)
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->reset(__pyx_v_self->_info, 0);

      /* "pyrosm_proto.pyx":7773
 *                 self._info = Info.__new__(Info)
 *                 self._info.reset()
 *                 self._info._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *             self._info.MergeFrom(other_msg._info)
 *         self._refs.extend(other_msg._refs)
 */
      __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_self);

      /* "pyrosm_proto.pyx":7770
 *         self._vals.extend(other_msg._vals)
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:
 *             if self._info is None:             # <<<<<<<<<<<<<<
 *                 self._info = Info.__new__(Info)
 *                 self._info.reset()
 */
    }

    /* "pyrosm_proto.pyx":7774
 *                 self._info.reset()
 *                 self._info._listener = <PyObject *>self
 *             self._info.MergeFrom(other_msg._info)             # <<<<<<<<<<<<<<
 *         self._refs.extend(other_msg._refs)
 * 
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_info);
    __Pyx_INCREF(__pyx_t_1);
    ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->MergeFrom(__pyx_v_self->_info, ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_t_1), 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7769
 *         self._keys.extend(other_msg._keys)
 *         self._vals.extend(other_msg._vals)
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             if self._info is None:
 *                 self._info = Info.__new__(Info)
 */
  }

  /* "pyrosm_proto.pyx":7775
 *                 self._info._listener = <PyObject *>self
 *             self._info.MergeFrom(other_msg._info)
 *         self._refs.extend(other_msg._refs)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_refs);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_refs->__pyx_vtab)->extend(__pyx_v_self->_refs, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7775, __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;

  /* "pyrosm_proto.pyx":7777
 *         self._refs.extend(other_msg._refs)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7751
 *         return True
 * 
 *     cpdef void MergeFrom(self, Way other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Way.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_20MergeFrom[] = "\n        Merges the contents of the specified message into the current message.\n\n        Params:\n            other_msg: Message to merge into the current message.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_Way, 1, "other_msg", 0))) __PYX_ERR(0, 7751, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_20MergeFrom(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_other_msg));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_20MergeFrom(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_3Way_MergeFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7751, __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("pyrosm_proto.Way.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7779
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_3Way_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_3Way_MergeFromString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_3Way_MergeFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  unsigned char const *__pyx_t_10;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7779, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_3Way_23MergeFromString)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7779, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7779, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7779, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7779, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7779, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7793
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, False)
 */
  __pyx_t_7 = (__pyx_v_size != Py_None);
  if ((__pyx_t_7 != 0)) {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7793, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_8;
  } else {
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7793, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_9;
  }
  __pyx_v_length = __pyx_t_5;

  /* "pyrosm_proto.pyx":7795
 *         length = size if size is not None else len(data)
 * 
 *         buf = self._protobuf_deserialize(data, length, False)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_10 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 7795, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_10, __pyx_v_length, 0);

  /* "pyrosm_proto.pyx":7797
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  __pyx_t_7 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "pyrosm_proto.pyx":7798
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_GIVEREF(__pyx_v_size);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_size);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Truncated_message_got_s_expected, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7798, __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, 7798, __pyx_L1_error)

    /* "pyrosm_proto.pyx":7797
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  }

  /* "pyrosm_proto.pyx":7800
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7802
 *         self._Modified()
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7779
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.Way.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_22MergeFromString[] = "\n        Merges serialized protocol buffer data into this message.\n\n        Params:\n            data (bytes): a string of binary data.\n            size (int): optional - the length of the data string\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "MergeFromString") < 0)) __PYX_ERR(0, 7779, __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_data = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MergeFromString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7779, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_22MergeFromString(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), __pyx_v_data, __pyx_v_size);

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_22MergeFromString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_3Way_MergeFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_Way->MergeFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7779, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Way.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7804
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_3Way_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_3Way_ParseFromString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_3Way_ParseFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_reset = ((int)1);
  int __pyx_v_cache = ((int)0);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  unsigned char const *__pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_reset = __pyx_optional_args->reset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cache = __pyx_optional_args->cache;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7804, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_3Way_25ParseFromString)) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7804, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7804, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7804, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7804, __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(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7804, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_size);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 3+__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, 7804, __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, 7804, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7820
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         if reset:
 */
  __pyx_t_9 = (__pyx_v_size != Py_None);
  if ((__pyx_t_9 != 0)) {
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7820, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7820, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_11;
  }
  __pyx_v_length = __pyx_t_7;

  /* "pyrosm_proto.pyx":7822
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_9 = (__pyx_v_reset != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":7823
 * 
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":7822
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":7825
 *             self.reset()
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_12 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 7825, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_12, __pyx_v_length, __pyx_v_cache);

  /* "pyrosm_proto.pyx":7827
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  __pyx_t_9 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "pyrosm_proto.pyx":7828
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message")             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s_Truncated_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Truncated_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7828, __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, 7828, __pyx_L1_error)

    /* "pyrosm_proto.pyx":7827
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  }

  /* "pyrosm_proto.pyx":7830
 *             raise DecodeError("Truncated message")
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7832
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  __pyx_t_9 = (__pyx_v_cache != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":7833
 * 
 *         if cache:
 *             self._cached_serialization = data             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) __PYX_ERR(0, 7833, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":7832
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  }

  /* "pyrosm_proto.pyx":7835
 *             self._cached_serialization = data
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7804
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.Way.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_24ParseFromString[] = "\n        Populate the message class from a string of protobuf encoded binary data.\n\n        Params:\n            data (bytes): a string of binary data\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n            cache (bool): optional - whether to cache serialized data\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_v_reset;
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,&__pyx_n_s_cache,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromString") < 0)) __PYX_ERR(0, 7804, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    if (values[2]) {
      __pyx_v_reset = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7804, __pyx_L3_error)
    } else {
      __pyx_v_reset = ((int)1);
    }
    if (values[3]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7804, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromString", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7804, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_24ParseFromString(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset, __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_24ParseFromString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_3Way_ParseFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.reset = __pyx_v_reset;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_Way->ParseFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7804, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Way.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7838
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_3Way_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FromString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_26FromString(((PyTypeObject*)__pyx_v_cls), ((PyObject *)__pyx_v_s));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("FromString", 0);

  /* "pyrosm_proto.pyx":7839
 *     @classmethod
 *     def FromString(cls, s):
 *         message = cls()             # <<<<<<<<<<<<<<
 *         message.MergeFromString(s)
 *         return message
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7840
 *     def FromString(cls, s):
 *         message = cls()
 *         message.MergeFromString(s)             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7840, __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;

  /* "pyrosm_proto.pyx":7841
 *         message = cls()
 *         message.MergeFromString(s)
 *         return message             # <<<<<<<<<<<<<<
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7838
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Way.FromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7843
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # id
 */

static void __pyx_f_12pyrosm_proto_3Way__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_cache) {
  Py_ssize_t __pyx_v_length;
  uint32_t __pyx_v_keys_elt;
  PyObject *__pyx_v_keys_buf = 0;
  uint32_t __pyx_v_vals_elt;
  PyObject *__pyx_v_vals_buf = 0;
  PyObject *__pyx_v_info_buf = 0;
  int64_t __pyx_v_refs_elt;
  PyObject *__pyx_v_refs_buf = 0;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  uint32_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int64_t __pyx_t_9;
  __Pyx_RefNannySetupContext("_protobuf_serialize", 0);
  __Pyx_INCREF(__pyx_v_buf);

  /* "pyrosm_proto.pyx":7846
 *         cdef ssize_t length
 *         # id
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(8, buf)
 *             set_varint64(self._id, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":7847
 *         # id
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(8, buf)             # <<<<<<<<<<<<<<
 *             set_varint64(self._id, buf)
 *         # keys
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(8, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7848
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(8, buf)
 *             set_varint64(self._id, buf)             # <<<<<<<<<<<<<<
 *         # keys
 *         cdef uint32_t keys_elt
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_v_self->_id, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7846
 *         cdef ssize_t length
 *         # id
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(8, buf)
 *             set_varint64(self._id, buf)
 */
  }

  /* "pyrosm_proto.pyx":7851
 *         # keys
 *         cdef uint32_t keys_elt
 *         cdef bytearray keys_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._keys)
 *         if length > 0:
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_keys_buf = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyrosm_proto.pyx":7852
 *         cdef uint32_t keys_elt
 *         cdef bytearray keys_buf = bytearray()
 *         length = len(self._keys)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(18, buf)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_keys);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7852, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_length = __pyx_t_3;

  /* "pyrosm_proto.pyx":7853
 *         cdef bytearray keys_buf = bytearray()
 *         length = len(self._keys)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(18, buf)
 *             for keys_elt in self._keys:
 */
  __pyx_t_1 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":7854
 *         length = len(self._keys)
 *         if length > 0:
 *             set_varint64(18, buf)             # <<<<<<<<<<<<<<
 *             for keys_elt in self._keys:
 *                 set_varint32(keys_elt, keys_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(18, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7855
 *         if length > 0:
 *             set_varint64(18, buf)
 *             for keys_elt in self._keys:             # <<<<<<<<<<<<<<
 *                 set_varint32(keys_elt, keys_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_keys))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_keys))) {
      __pyx_t_2 = ((PyObject *)__pyx_v_self->_keys); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self->_keys)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7855, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7855, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7855, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7855, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7855, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 7855, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_6 = __Pyx_PyInt_As_uint32_t(__pyx_t_5); if (unlikely((__pyx_t_6 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7855, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_keys_elt = __pyx_t_6;

      /* "pyrosm_proto.pyx":7856
 *             set_varint64(18, buf)
 *             for keys_elt in self._keys:
 *                 set_varint32(keys_elt, keys_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(keys_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_keys_elt, __pyx_v_keys_buf));

      /* "pyrosm_proto.pyx":7855
 *         if length > 0:
 *             set_varint64(18, buf)
 *             for keys_elt in self._keys:             # <<<<<<<<<<<<<<
 *                 set_varint32(keys_elt, keys_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":7858
 *                 set_varint32(keys_elt, keys_buf)
 * 
 *             set_varint64(len(keys_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += keys_buf
 *         # vals
 */
    __pyx_t_3 = PyByteArray_GET_SIZE(__pyx_v_keys_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7858, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7859
 * 
 *             set_varint64(len(keys_buf), buf)
 *             buf += keys_buf             # <<<<<<<<<<<<<<
 *         # vals
 *         cdef uint32_t vals_elt
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_keys_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":7853
 *         cdef bytearray keys_buf = bytearray()
 *         length = len(self._keys)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(18, buf)
 *             for keys_elt in self._keys:
 */
  }

  /* "pyrosm_proto.pyx":7862
 *         # vals
 *         cdef uint32_t vals_elt
 *         cdef bytearray vals_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._vals)
 *         if length > 0:
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_vals_buf = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyrosm_proto.pyx":7863
 *         cdef uint32_t vals_elt
 *         cdef bytearray vals_buf = bytearray()
 *         length = len(self._vals)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(26, buf)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_vals);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7863, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_length = __pyx_t_3;

  /* "pyrosm_proto.pyx":7864
 *         cdef bytearray vals_buf = bytearray()
 *         length = len(self._vals)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(26, buf)
 *             for vals_elt in self._vals:
 */
  __pyx_t_1 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":7865
 *         length = len(self._vals)
 *         if length > 0:
 *             set_varint64(26, buf)             # <<<<<<<<<<<<<<
 *             for vals_elt in self._vals:
 *                 set_varint32(vals_elt, vals_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(26, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7866
 *         if length > 0:
 *             set_varint64(26, buf)
 *             for vals_elt in self._vals:             # <<<<<<<<<<<<<<
 *                 set_varint32(vals_elt, vals_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_vals))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_vals))) {
      __pyx_t_2 = ((PyObject *)__pyx_v_self->_vals); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self->_vals)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7866, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7866, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7866, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7866, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7866, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 7866, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_6 = __Pyx_PyInt_As_uint32_t(__pyx_t_5); if (unlikely((__pyx_t_6 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7866, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_vals_elt = __pyx_t_6;

      /* "pyrosm_proto.pyx":7867
 *             set_varint64(26, buf)
 *             for vals_elt in self._vals:
 *                 set_varint32(vals_elt, vals_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(vals_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_vals_elt, __pyx_v_vals_buf));

      /* "pyrosm_proto.pyx":7866
 *         if length > 0:
 *             set_varint64(26, buf)
 *             for vals_elt in self._vals:             # <<<<<<<<<<<<<<
 *                 set_varint32(vals_elt, vals_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":7869
 *                 set_varint32(vals_elt, vals_buf)
 * 
 *             set_varint64(len(vals_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += vals_buf
 *         # info
 */
    __pyx_t_3 = PyByteArray_GET_SIZE(__pyx_v_vals_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7869, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7870
 * 
 *             set_varint64(len(vals_buf), buf)
 *             buf += vals_buf             # <<<<<<<<<<<<<<
 *         # info
 *         cdef bytearray info_buf
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_vals_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":7864
 *         cdef bytearray vals_buf = bytearray()
 *         length = len(self._vals)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(26, buf)
 *             for vals_elt in self._vals:
 */
  }

  /* "pyrosm_proto.pyx":7873
 *         # info
 *         cdef bytearray info_buf
 *         if self._info is not None and self._info._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             set_varint64(34, buf)
 *             if self._info._cached_serialization is not None:
 */
  __pyx_t_7 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_1 = __pyx_t_8;
    goto __pyx_L11_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_self->_info->_is_present_in_parent != 0);
  __pyx_t_1 = __pyx_t_8;
  __pyx_L11_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":7874
 *         cdef bytearray info_buf
 *         if self._info is not None and self._info._is_present_in_parent:
 *             set_varint64(34, buf)             # <<<<<<<<<<<<<<
 *             if self._info._cached_serialization is not None:
 *                 set_varint64(len(self._info._cached_serialization), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(34, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7875
 *         if self._info is not None and self._info._is_present_in_parent:
 *             set_varint64(34, buf)
 *             if self._info._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(self._info._cached_serialization), buf)
 *                 buf += self._info._cached_serialization
 */
    __pyx_t_1 = (__pyx_v_self->_info->_cached_serialization != ((PyObject*)Py_None));
    __pyx_t_8 = (__pyx_t_1 != 0);
    if (__pyx_t_8) {

      /* "pyrosm_proto.pyx":7876
 *             set_varint64(34, buf)
 *             if self._info._cached_serialization is not None:
 *                 set_varint64(len(self._info._cached_serialization), buf)             # <<<<<<<<<<<<<<
 *                 buf += self._info._cached_serialization
 *             else:
 */
      __pyx_t_2 = __pyx_v_self->_info->_cached_serialization;
      __Pyx_INCREF(__pyx_t_2);
      if (unlikely(__pyx_t_2 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(0, 7876, __pyx_L1_error)
      }
      __pyx_t_3 = PyBytes_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7876, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

      /* "pyrosm_proto.pyx":7877
 *             if self._info._cached_serialization is not None:
 *                 set_varint64(len(self._info._cached_serialization), buf)
 *                 buf += self._info._cached_serialization             # <<<<<<<<<<<<<<
 *             else:
 *                 info_buf = bytearray()
 */
      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_self->_info->_cached_serialization); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7877, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":7875
 *         if self._info is not None and self._info._is_present_in_parent:
 *             set_varint64(34, buf)
 *             if self._info._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(self._info._cached_serialization), buf)
 *                 buf += self._info._cached_serialization
 */
      goto __pyx_L13;
    }

    /* "pyrosm_proto.pyx":7879
 *                 buf += self._info._cached_serialization
 *             else:
 *                 info_buf = bytearray()             # <<<<<<<<<<<<<<
 *                 self._info._protobuf_serialize(info_buf, cache)
 *                 set_varint64(len(info_buf), buf)
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_info_buf = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":7880
 *             else:
 *                 info_buf = bytearray()
 *                 self._info._protobuf_serialize(info_buf, cache)             # <<<<<<<<<<<<<<
 *                 set_varint64(len(info_buf), buf)
 *                 buf += info_buf
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->_protobuf_serialize(__pyx_v_self->_info, __pyx_v_info_buf, __pyx_v_cache);

      /* "pyrosm_proto.pyx":7881
 *                 info_buf = bytearray()
 *                 self._info._protobuf_serialize(info_buf, cache)
 *                 set_varint64(len(info_buf), buf)             # <<<<<<<<<<<<<<
 *                 buf += info_buf
 *                 if cache:
 */
      __pyx_t_3 = PyByteArray_GET_SIZE(__pyx_v_info_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7881, __pyx_L1_error)
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

      /* "pyrosm_proto.pyx":7882
 *                 self._info._protobuf_serialize(info_buf, cache)
 *                 set_varint64(len(info_buf), buf)
 *                 buf += info_buf             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     self._info._cached_serialization = bytes(info_buf)
 */
      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_info_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7882, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":7883
 *                 set_varint64(len(info_buf), buf)
 *                 buf += info_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._info._cached_serialization = bytes(info_buf)
 *         # refs
 */
      __pyx_t_8 = (__pyx_v_cache != 0);
      if (__pyx_t_8) {

        /* "pyrosm_proto.pyx":7884
 *                 buf += info_buf
 *                 if cache:
 *                     self._info._cached_serialization = bytes(info_buf)             # <<<<<<<<<<<<<<
 *         # refs
 *         cdef int64_t refs_elt
 */
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_info_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7884, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_v_self->_info->_cached_serialization);
        __Pyx_DECREF(__pyx_v_self->_info->_cached_serialization);
        __pyx_v_self->_info->_cached_serialization = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyrosm_proto.pyx":7883
 *                 set_varint64(len(info_buf), buf)
 *                 buf += info_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._info._cached_serialization = bytes(info_buf)
 *         # refs
 */
      }
    }
    __pyx_L13:;

    /* "pyrosm_proto.pyx":7873
 *         # info
 *         cdef bytearray info_buf
 *         if self._info is not None and self._info._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             set_varint64(34, buf)
 *             if self._info._cached_serialization is not None:
 */
  }

  /* "pyrosm_proto.pyx":7887
 *         # refs
 *         cdef int64_t refs_elt
 *         cdef bytearray refs_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._refs)
 *         if length > 0:
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_refs_buf = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyrosm_proto.pyx":7888
 *         cdef int64_t refs_elt
 *         cdef bytearray refs_buf = bytearray()
 *         length = len(self._refs)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(66, buf)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_refs);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7888, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_length = __pyx_t_3;

  /* "pyrosm_proto.pyx":7889
 *         cdef bytearray refs_buf = bytearray()
 *         length = len(self._refs)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(66, buf)
 *             for refs_elt in self._refs:
 */
  __pyx_t_8 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":7890
 *         length = len(self._refs)
 *         if length > 0:
 *             set_varint64(66, buf)             # <<<<<<<<<<<<<<
 *             for refs_elt in self._refs:
 *                 set_signed_varint64(refs_elt, refs_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(66, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7891
 *         if length > 0:
 *             set_varint64(66, buf)
 *             for refs_elt in self._refs:             # <<<<<<<<<<<<<<
 *                 set_signed_varint64(refs_elt, refs_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_refs))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_refs))) {
      __pyx_t_2 = ((PyObject *)__pyx_v_self->_refs); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self->_refs)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7891, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7891, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7891, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7891, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7891, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7891, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 7891, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_t_5); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7891, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_refs_elt = __pyx_t_9;

      /* "pyrosm_proto.pyx":7892
 *             set_varint64(66, buf)
 *             for refs_elt in self._refs:
 *                 set_signed_varint64(refs_elt, refs_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(refs_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_signed_varint64(__pyx_v_refs_elt, __pyx_v_refs_buf));

      /* "pyrosm_proto.pyx":7891
 *         if length > 0:
 *             set_varint64(66, buf)
 *             for refs_elt in self._refs:             # <<<<<<<<<<<<<<
 *                 set_signed_varint64(refs_elt, refs_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":7894
 *                 set_signed_varint64(refs_elt, refs_buf)
 * 
 *             set_varint64(len(refs_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += refs_buf
 * 
 */
    __pyx_t_3 = PyByteArray_GET_SIZE(__pyx_v_refs_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7894, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

    /* "pyrosm_proto.pyx":7895
 * 
 *             set_varint64(len(refs_buf), buf)
 *             buf += refs_buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef void _Modified(self):
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_refs_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":7889
 *         cdef bytearray refs_buf = bytearray()
 *         length = len(self._refs)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(66, buf)
 *             for refs_elt in self._refs:
 */
  }

  /* "pyrosm_proto.pyx":7843
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # id
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("pyrosm_proto.Way._protobuf_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_keys_buf);
  __Pyx_XDECREF(__pyx_v_vals_buf);
  __Pyx_XDECREF(__pyx_v_info_buf);
  __Pyx_XDECREF(__pyx_v_refs_buf);
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_RefNannyFinishContext();
}

/* "pyrosm_proto.pyx":7897
 *             buf += refs_buf
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

static PyObject *__pyx_pw_12pyrosm_proto_3Way_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_3Way__Modified(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Modified); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_3Way_29_Modified)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7897, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7898
 * 
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":7899
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()             # <<<<<<<<<<<<<<
 *         self._cached_serialization = None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_listener), __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7899, __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;

  /* "pyrosm_proto.pyx":7900
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
  __Pyx_DECREF(__pyx_v_self->_cached_serialization);
  __pyx_v_self->_cached_serialization = ((PyObject*)Py_None);

  /* "pyrosm_proto.pyx":7897
 *             buf += refs_buf
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Way._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_3Way_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_Modified (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_28_Modified(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_28_Modified(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_3Way__Modified(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7897, __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("pyrosm_proto.Way._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7902
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_3Way_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_3Way_SerializeToString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_3Way_SerializeToString *__pyx_optional_args) {
  int __pyx_v_cache = ((int)0);
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_out = 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;
  int __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cache = __pyx_optional_args->cache;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7902, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_3Way_31SerializeToString)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7902, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7902, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 7902, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7911
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 */
  __pyx_t_6 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":7912
 * 
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             raise Exception("Message Way is missing required field: info")
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7912, __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, 7912, __pyx_L1_error)

    /* "pyrosm_proto.pyx":7911
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 */
  }

  /* "pyrosm_proto.pyx":7913
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():             # <<<<<<<<<<<<<<
 *             raise Exception("Message Way is missing required field: info")
 * 
 */
  __pyx_t_7 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_self->_info->_is_present_in_parent != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_8 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->IsInitialized(__pyx_v_self->_info, 0) != 0)) != 0);
  __pyx_t_6 = __pyx_t_8;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":7914
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             raise Exception("Message Way is missing required field: info")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__156, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7914, __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, 7914, __pyx_L1_error)

    /* "pyrosm_proto.pyx":7913
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():             # <<<<<<<<<<<<<<
 *             raise Exception("Message Way is missing required field: info")
 * 
 */
  }

  /* "pyrosm_proto.pyx":7916
 *             raise Exception("Message Way is missing required field: info")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_6 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_8 = (__pyx_t_6 != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":7917
 * 
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7916
 *             raise Exception("Message Way is missing required field: info")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":7919
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7920
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)             # <<<<<<<<<<<<<<
 *         cdef bytes out = bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, __pyx_v_cache);

  /* "pyrosm_proto.pyx":7921
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7923
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  __pyx_t_8 = (__pyx_v_cache != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":7924
 * 
 *         if cache:
 *             self._cached_serialization = out             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = __pyx_v_out;

    /* "pyrosm_proto.pyx":7923
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  }

  /* "pyrosm_proto.pyx":7926
 *             self._cached_serialization = out
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializePartialToString(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7902
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.Way.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_30SerializeToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cache,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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SerializeToString") < 0)) __PYX_ERR(0, 7902, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7902, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("SerializeToString", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7902, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_30SerializeToString(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), __pyx_v_cache);

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_30SerializeToString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_12pyrosm_proto_3Way_SerializeToString __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_Way->SerializeToString(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7902, __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("pyrosm_proto.Way.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7928
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_3Way_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_3Way_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_buf = 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;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_3Way_33SerializePartialToString)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7928, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 7928, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":7935
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_5 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":7936
 *         """
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":7935
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":7938
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7939
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)             # <<<<<<<<<<<<<<
 *         return bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, 0);

  /* "pyrosm_proto.pyx":7940
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *     def SetInParent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7928
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.Way.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_32SerializePartialToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_32SerializePartialToString(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_3Way_SerializePartialToString(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7928, __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("pyrosm_proto.Way.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7942
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_34SetInParent[] = "\n        Mark this an present in the parent.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_34SetInParent(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_34SetInParent(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent", 0);

  /* "pyrosm_proto.pyx":7946
 *         Mark this an present in the parent.
 *         """
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":7942
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7948
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_36ParseFromJson[] = "\n        Populate the message class from a json string.\n\n        Params:\n            data (str): a json string\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromJson (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromJson") < 0)) __PYX_ERR(0, 7948, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    __pyx_v_reset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromJson", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7948, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_36ParseFromJson(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("ParseFromJson", 0);
  __Pyx_INCREF(__pyx_v_size);

  /* "pyrosm_proto.pyx":7957
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":7958
 *         """
 *         if size is None:
 *             size = len(data)             # <<<<<<<<<<<<<<
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7958, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":7957
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  }

  /* "pyrosm_proto.pyx":7959
 *         if size is None:
 *             size = len(data)
 *         d = json.loads(data[:size])             # <<<<<<<<<<<<<<
 *         self.ParseFromDict(d, reset)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_json); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_d = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":7960
 *             size = len(data)
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToJson(self, **kwargs):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7960, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7960, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7960, __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_d);
    __Pyx_GIVEREF(__pyx_v_d);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_d);
    __Pyx_INCREF(__pyx_v_reset);
    __Pyx_GIVEREF(__pyx_v_reset);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_reset);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7960, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":7948
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrosm_proto.Way.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7962
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_38SerializeToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializeToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializeToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_38SerializeToJson(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializeToJson", 0);

  /* "pyrosm_proto.pyx":7969
 *             str: a json formatted string
 *         """
 *         d = self.SerializeToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7970
 *         """
 *         d = self.SerializeToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToJson(self, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7962
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Way.SerializeToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7972
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_40SerializePartialToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializePartialToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializePartialToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_40SerializePartialToJson(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), __pyx_v_kwargs);

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToJson", 0);

  /* "pyrosm_proto.pyx":7979
 *             str: a json formatted string
 *         """
 *         d = self.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":7980
 *         """
 *         d = self.SerializePartialToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromDict(self, d, reset=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7972
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Way.SerializePartialToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":7982
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_42ParseFromDict[] = "\n        Populate the message class from a Python dictionary.\n\n        Params:\n            d (dict): a Python dictionary representing the message\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,&__pyx_n_s_reset,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 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_reset);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromDict") < 0)) __PYX_ERR(0, 7982, __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_d = values[0];
    __pyx_v_reset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromDict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7982, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_42ParseFromDict(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), __pyx_v_d, __pyx_v_reset);

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset) {
  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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("ParseFromDict", 0);

  /* "pyrosm_proto.pyx":7990
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reset); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 7990, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":7991
 *         """
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         assert type(d) == dict
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":7990
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":7993
 *             self.reset()
 * 
 *         assert type(d) == dict             # <<<<<<<<<<<<<<
 *         try:
 *             self.id = d["id"]
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_d)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7993, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 7993, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 7993, __pyx_L1_error)
    }
  }
  #endif

  /* "pyrosm_proto.pyx":7994
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.id = d["id"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":7995
 *         assert type(d) == dict
 *         try:
 *             self.id = d["id"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7995, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id, __pyx_t_2) < 0) __PYX_ERR(0, 7995, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":7994
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.id = d["id"]
 *         except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":7996
 *         try:
 *             self.id = d["id"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":7994
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.id = d["id"]
 *         except KeyError:
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":7998
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.keys = d["keys"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":7999
 *             pass
 *         try:
 *             self.keys = d["keys"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7999, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys, __pyx_t_2) < 0) __PYX_ERR(0, 7999, __pyx_L10_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":7998
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.keys = d["keys"]
 *         except KeyError:
 */
    }
    __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_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8000
 *         try:
 *             self.keys = d["keys"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    goto __pyx_L12_except_error;
    __pyx_L12_except_error:;

    /* "pyrosm_proto.pyx":7998
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.keys = d["keys"]
 *         except KeyError:
 */
    __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:;
  }

  /* "pyrosm_proto.pyx":8002
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.vals = d["vals"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":8003
 *             pass
 *         try:
 *             self.vals = d["vals"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_vals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8003, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vals, __pyx_t_2) < 0) __PYX_ERR(0, 8003, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":8002
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.vals = d["vals"]
 *         except KeyError:
 */
    }
    __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_L21_try_end;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8004
 *         try:
 *             self.vals = d["vals"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L17_exception_handled;
    }
    goto __pyx_L18_except_error;
    __pyx_L18_except_error:;

    /* "pyrosm_proto.pyx":8002
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.vals = d["vals"]
 *         except KeyError:
 */
    __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_L17_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_L21_try_end:;
  }

  /* "pyrosm_proto.pyx":8006
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.info.ParseFromDict(d["info"])
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":8007
 *             pass
 *         try:
 *             self.info.ParseFromDict(d["info"])             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8007, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8007, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8007, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8007, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":8006
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.info.ParseFromDict(d["info"])
 *         except KeyError:
 */
    }
    __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_L27_try_end;
    __pyx_L22_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":8008
 *         try:
 *             self.info.ParseFromDict(d["info"])
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L23_exception_handled;
    }
    goto __pyx_L24_except_error;
    __pyx_L24_except_error:;

    /* "pyrosm_proto.pyx":8006
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.info.ParseFromDict(d["info"])
 *         except KeyError:
 */
    __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_L23_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_L27_try_end:;
  }

  /* "pyrosm_proto.pyx":8010
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.refs = d["refs"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":8011
 *             pass
 *         try:
 *             self.refs = d["refs"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_refs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8011, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_refs, __pyx_t_2) < 0) __PYX_ERR(0, 8011, __pyx_L28_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":8010
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.refs = d["refs"]
 *         except KeyError:
 */
    }
    __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_L33_try_end;
    __pyx_L28_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":8012
 *         try:
 *             self.refs = d["refs"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L29_exception_handled;
    }
    goto __pyx_L30_except_error;
    __pyx_L30_except_error:;

    /* "pyrosm_proto.pyx":8010
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.refs = d["refs"]
 *         except KeyError:
 */
    __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_L29_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_L33_try_end:;
  }

  /* "pyrosm_proto.pyx":8015
 *             pass
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Way *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8016
 * 
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 * 
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrosm_proto.pyx":8017
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")             # <<<<<<<<<<<<<<
 * 
 *         return
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8017, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 8017, __pyx_L1_error)

    /* "pyrosm_proto.pyx":8016
 * 
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 * 
 */
  }

  /* "pyrosm_proto.pyx":8019
 *             raise Exception("required field 'id' not initialized and does not have default")
 * 
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":7982
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.Way.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8021
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_44SerializeToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_44SerializeToDict(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_info_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("SerializeToDict", 0);

  /* "pyrosm_proto.pyx":8028
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8029
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":8030
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8030, __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, 8030, __pyx_L1_error)

    /* "pyrosm_proto.pyx":8029
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 */
  }

  /* "pyrosm_proto.pyx":8031
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8032
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id             # <<<<<<<<<<<<<<
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_id, __pyx_t_1) < 0)) __PYX_ERR(0, 8032, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8031
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8033
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 *         if len(self.keys) > 0:             # <<<<<<<<<<<<<<
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8033, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8034
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)             # <<<<<<<<<<<<<<
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_keys, __pyx_t_4) < 0)) __PYX_ERR(0, 8034, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":8033
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 *         if len(self.keys) > 0:             # <<<<<<<<<<<<<<
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8035
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:             # <<<<<<<<<<<<<<
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializeToDict()
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8035, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8036
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)             # <<<<<<<<<<<<<<
 *         info_dict = self.info.SerializeToDict()
 *         if info_dict != {}:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_vals, __pyx_t_1) < 0)) __PYX_ERR(0, 8036, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8035
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:             # <<<<<<<<<<<<<<
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializeToDict()
 */
  }

  /* "pyrosm_proto.pyx":8037
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializeToDict()             # <<<<<<<<<<<<<<
 *         if info_dict != {}:
 *             out["info"] = info_dict
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_info_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8038
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializeToDict()
 *         if info_dict != {}:             # <<<<<<<<<<<<<<
 *             out["info"] = info_dict
 *         if len(self.refs) > 0:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_info_dict, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8038, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 8038, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8039
 *         info_dict = self.info.SerializeToDict()
 *         if info_dict != {}:
 *             out["info"] = info_dict             # <<<<<<<<<<<<<<
 *         if len(self.refs) > 0:
 *             out["refs"] = list(self.refs)
 */
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_info, __pyx_v_info_dict) < 0)) __PYX_ERR(0, 8039, __pyx_L1_error)

    /* "pyrosm_proto.pyx":8038
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializeToDict()
 *         if info_dict != {}:             # <<<<<<<<<<<<<<
 *             out["info"] = info_dict
 *         if len(self.refs) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8040
 *         if info_dict != {}:
 *             out["info"] = info_dict
 *         if len(self.refs) > 0:             # <<<<<<<<<<<<<<
 *             out["refs"] = list(self.refs)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_refs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8040, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8041
 *             out["info"] = info_dict
 *         if len(self.refs) > 0:
 *             out["refs"] = list(self.refs)             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_refs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_refs, __pyx_t_1) < 0)) __PYX_ERR(0, 8041, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8040
 *         if info_dict != {}:
 *             out["info"] = info_dict
 *         if len(self.refs) > 0:             # <<<<<<<<<<<<<<
 *             out["refs"] = list(self.refs)
 * 
 */
  }

  /* "pyrosm_proto.pyx":8043
 *             out["refs"] = list(self.refs)
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8021
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.Way.SerializeToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_info_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8045
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_46SerializePartialToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_46SerializePartialToDict(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_info_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToDict", 0);

  /* "pyrosm_proto.pyx":8052
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8053
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8054
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id             # <<<<<<<<<<<<<<
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_id, __pyx_t_1) < 0)) __PYX_ERR(0, 8054, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8053
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8055
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 *         if len(self.keys) > 0:             # <<<<<<<<<<<<<<
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8055, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8056
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)             # <<<<<<<<<<<<<<
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_keys, __pyx_t_4) < 0)) __PYX_ERR(0, 8056, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":8055
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 *         if len(self.keys) > 0:             # <<<<<<<<<<<<<<
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8057
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:             # <<<<<<<<<<<<<<
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializePartialToDict()
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8058
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)             # <<<<<<<<<<<<<<
 *         info_dict = self.info.SerializePartialToDict()
 *         if info_dict != {}:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_vals, __pyx_t_1) < 0)) __PYX_ERR(0, 8058, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8057
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:             # <<<<<<<<<<<<<<
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializePartialToDict()
 */
  }

  /* "pyrosm_proto.pyx":8059
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         if info_dict != {}:
 *             out["info"] = info_dict
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_info_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8060
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializePartialToDict()
 *         if info_dict != {}:             # <<<<<<<<<<<<<<
 *             out["info"] = info_dict
 *         if len(self.refs) > 0:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_info_dict, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8060, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 8060, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8061
 *         info_dict = self.info.SerializePartialToDict()
 *         if info_dict != {}:
 *             out["info"] = info_dict             # <<<<<<<<<<<<<<
 *         if len(self.refs) > 0:
 *             out["refs"] = list(self.refs)
 */
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_info, __pyx_v_info_dict) < 0)) __PYX_ERR(0, 8061, __pyx_L1_error)

    /* "pyrosm_proto.pyx":8060
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializePartialToDict()
 *         if info_dict != {}:             # <<<<<<<<<<<<<<
 *             out["info"] = info_dict
 *         if len(self.refs) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8062
 *         if info_dict != {}:
 *             out["info"] = info_dict
 *         if len(self.refs) > 0:             # <<<<<<<<<<<<<<
 *             out["refs"] = list(self.refs)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_refs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8062, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8063
 *             out["info"] = info_dict
 *         if len(self.refs) > 0:
 *             out["refs"] = list(self.refs)             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_refs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_refs, __pyx_t_1) < 0)) __PYX_ERR(0, 8063, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8062
 *         if info_dict != {}:
 *             out["info"] = info_dict
 *         if len(self.refs) > 0:             # <<<<<<<<<<<<<<
 *             out["refs"] = list(self.refs)
 * 
 */
  }

  /* "pyrosm_proto.pyx":8065
 *             out["refs"] = list(self.refs)
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def Items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8045
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.Way.SerializePartialToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_info_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_3Way_50generator48(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":8067
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_48Items[] = "\n        Iterator over the field names and values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_48Items(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_48Items(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_48_Items(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_48_Items, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 8067, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_3Way_50generator48, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Items, __pyx_n_s_Way_Items, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 8067, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way.Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_3Way_50generator48(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8067, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8074
 *             iterator
 *         """
 *         yield 'id', self.id             # <<<<<<<<<<<<<<
 *         yield 'keys', self.keys
 *         yield 'vals', self.vals
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_id);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8074, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8075
 *         """
 *         yield 'id', self.id
 *         yield 'keys', self.keys             # <<<<<<<<<<<<<<
 *         yield 'vals', self.vals
 *         yield 'info', self.info
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_keys);
  __Pyx_GIVEREF(__pyx_n_s_keys);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_keys);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8075, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8076
 *         yield 'id', self.id
 *         yield 'keys', self.keys
 *         yield 'vals', self.vals             # <<<<<<<<<<<<<<
 *         yield 'info', self.info
 *         yield 'refs', self.refs
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_vals);
  __Pyx_GIVEREF(__pyx_n_s_vals);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_vals);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8076, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8077
 *         yield 'keys', self.keys
 *         yield 'vals', self.vals
 *         yield 'info', self.info             # <<<<<<<<<<<<<<
 *         yield 'refs', self.refs
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_info);
  __Pyx_GIVEREF(__pyx_n_s_info);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_info);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8077, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8078
 *         yield 'vals', self.vals
 *         yield 'info', self.info
 *         yield 'refs', self.refs             # <<<<<<<<<<<<<<
 * 
 *     def Fields(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_refs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_refs);
  __Pyx_GIVEREF(__pyx_n_s_refs);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_refs);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8078, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":8067
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_3Way_53generator49(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":8080
 *         yield 'refs', self.refs
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_51Fields[] = "\n        Iterator over the field names of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_51Fields(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_49_Fields(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_49_Fields, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 8080, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_3Way_53generator49, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Fields, __pyx_n_s_Way_Fields, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 8080, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way.Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_3Way_53generator49(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8080, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8087
 *             iterator
 *         """
 *         yield 'id'             # <<<<<<<<<<<<<<
 *         yield 'keys'
 *         yield 'vals'
 */
  __Pyx_INCREF(__pyx_n_s_id);
  __pyx_r = __pyx_n_s_id;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8087, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8088
 *         """
 *         yield 'id'
 *         yield 'keys'             # <<<<<<<<<<<<<<
 *         yield 'vals'
 *         yield 'info'
 */
  __Pyx_INCREF(__pyx_n_s_keys);
  __pyx_r = __pyx_n_s_keys;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8088, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8089
 *         yield 'id'
 *         yield 'keys'
 *         yield 'vals'             # <<<<<<<<<<<<<<
 *         yield 'info'
 *         yield 'refs'
 */
  __Pyx_INCREF(__pyx_n_s_vals);
  __pyx_r = __pyx_n_s_vals;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8089, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8090
 *         yield 'keys'
 *         yield 'vals'
 *         yield 'info'             # <<<<<<<<<<<<<<
 *         yield 'refs'
 * 
 */
  __Pyx_INCREF(__pyx_n_s_info);
  __pyx_r = __pyx_n_s_info;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8090, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8091
 *         yield 'vals'
 *         yield 'info'
 *         yield 'refs'             # <<<<<<<<<<<<<<
 * 
 *     def Values(self):
 */
  __Pyx_INCREF(__pyx_n_s_refs);
  __pyx_r = __pyx_n_s_refs;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8091, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":8080
 *         yield 'refs', self.refs
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_3Way_56generator50(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":8093
 *         yield 'refs'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_54Values[] = "\n        Iterator over the values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_54Values(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_54Values(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_50_Values(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_50_Values, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 8093, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_3Way_56generator50, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Values, __pyx_n_s_Way_Values, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 8093, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way.Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_3Way_56generator50(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8093, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8100
 *             iterator
 *         """
 *         yield self.id             # <<<<<<<<<<<<<<
 *         yield self.keys
 *         yield self.vals
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8100, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8101
 *         """
 *         yield self.id
 *         yield self.keys             # <<<<<<<<<<<<<<
 *         yield self.vals
 *         yield self.info
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8101, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8102
 *         yield self.id
 *         yield self.keys
 *         yield self.vals             # <<<<<<<<<<<<<<
 *         yield self.info
 *         yield self.refs
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8102, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8103
 *         yield self.keys
 *         yield self.vals
 *         yield self.info             # <<<<<<<<<<<<<<
 *         yield self.refs
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8103, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8104
 *         yield self.vals
 *         yield self.info
 *         yield self.refs             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_refs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8104, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":8093
 *         yield 'refs'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_3Way_59generator51(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":8108
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_3Way_57Setters[] = "\n        Iterator over functions to set the fields in a message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_3Way_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_57Setters(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_57Setters(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_51_Setters(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_51_Setters, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 8108, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_3Way_59generator51, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Setters, __pyx_n_s_Way_Setters, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 8108, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way.Setters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8115
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_3Way_7Setters_1setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_7Setters_1setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_3Way_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_7Setters_setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":8116
 *         """
 *         def setter(value):
 *             self.id = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 8116, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_id, __pyx_v_value) < 0) __PYX_ERR(0, 8116, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8115
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8118
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_3Way_7Setters_3setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_7Setters_3setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_3Way_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_7Setters_2setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":8119
 *         yield setter
 *         def setter(value):
 *             self.keys = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 8119, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_keys, __pyx_v_value) < 0) __PYX_ERR(0, 8119, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8118
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8121
 *             self.keys = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.vals = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_3Way_7Setters_5setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_7Setters_5setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_3Way_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_7Setters_4setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":8122
 *         yield setter
 *         def setter(value):
 *             self.vals = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 8122, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_vals, __pyx_v_value) < 0) __PYX_ERR(0, 8122, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8121
 *             self.keys = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.vals = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8124
 *             self.vals = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.info = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_3Way_7Setters_7setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_7Setters_7setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_3Way_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_7Setters_6setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":8125
 *         yield setter
 *         def setter(value):
 *             self.info = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 8125, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_info, __pyx_v_value) < 0) __PYX_ERR(0, 8125, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8124
 *             self.vals = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.info = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8127
 *             self.info = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.refs = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_3Way_7Setters_9setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_7Setters_9setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_3Way_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_7Setters_8setter(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":8128
 *         yield setter
 *         def setter(value):
 *             self.refs = value             # <<<<<<<<<<<<<<
 *         yield setter
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 8128, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_refs, __pyx_v_value) < 0) __PYX_ERR(0, 8128, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8127
 *             self.info = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.refs = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8108
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

static PyObject *__pyx_gb_12pyrosm_proto_3Way_59generator51(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8108, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8115
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_3Way_7Setters_1setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_setter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8117
 *         def setter(value):
 *             self.id = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.keys = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8117, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8118
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_3Way_7Setters_3setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8120
 *         def setter(value):
 *             self.keys = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.vals = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8120, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8121
 *             self.keys = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.vals = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_3Way_7Setters_5setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8123
 *         def setter(value):
 *             self.vals = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.info = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8123, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8124
 *             self.vals = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.info = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_3Way_7Setters_7setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8126
 *         def setter(value):
 *             self.info = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.refs = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8126, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8127
 *             self.info = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.refs = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_3Way_7Setters_9setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8129
 *         def setter(value):
 *             self.refs = value
 *         yield setter             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8129, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":8108
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

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

/* "pyrosm_proto.pxd":450
 *     cdef uint64_t __field_bitmap0
 * 
 *     cdef public bint _is_present_in_parent             # <<<<<<<<<<<<<<
 *     cdef bytes _cached_serialization
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_3Way_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_21_is_present_in_parent___get__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

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

static PyObject *__pyx_pf_12pyrosm_proto_3Way_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_present_in_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 450, __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("pyrosm_proto.Way._is_present_in_parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_3Way_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_3Way_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_3Way_21_is_present_in_parent_2__set__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_12pyrosm_proto_3Way_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 450, __pyx_L1_error)
  __pyx_v_self->_is_present_in_parent = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Way._is_present_in_parent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_61__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_3Way_61__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_12pyrosm_proto_3Way_60__reduce_cython__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_3Way_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__167, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Way.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_3Way_63__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_3Way_63__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_12pyrosm_proto_3Way_62__setstate_cython__(((struct __pyx_obj_12pyrosm_proto_Way *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_3Way_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Way *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__168, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Way.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8136
 * cdef class Relation:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_8Relation_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_8Relation_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation___cinit__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrosm_proto_8Relation___cinit__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrosm_proto.pyx":8137
 * 
 *     def __cinit__(self):
 *         self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

  /* "pyrosm_proto.pyx":8136
 * cdef class Relation:
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._listener = <PyObject *>null_listener
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8139
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._keys is not None:
 */

/* Python wrapper */
static void __pyx_pw_12pyrosm_proto_8Relation_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrosm_proto_8Relation_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrosm_proto_8Relation_2__dealloc__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrosm_proto_8Relation_2__dealloc__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrosm_proto.pyx":8141
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         if self._vals is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_keys) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8142
 *         # Remove any references to self from child messages or repeated fields
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8141
 *     def __dealloc__(self):
 *         # Remove any references to self from child messages or repeated fields
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         if self._vals is not None:
 */
  }

  /* "pyrosm_proto.pyx":8143
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         if self._info is not None:
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_vals) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":8144
 *             self._keys._listener = <PyObject *>null_listener
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8143
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         if self._info is not None:
 */
  }

  /* "pyrosm_proto.pyx":8145
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         if self._roles_sid is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8146
 *             self._vals._listener = <PyObject *>null_listener
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._roles_sid is not None:
 *             self._roles_sid._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8145
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         if self._roles_sid is not None:
 */
  }

  /* "pyrosm_proto.pyx":8147
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 *         if self._roles_sid is not None:             # <<<<<<<<<<<<<<
 *             self._roles_sid._listener = <PyObject *>null_listener
 *         if self._memids is not None:
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_roles_sid) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":8148
 *             self._info._listener = <PyObject *>null_listener
 *         if self._roles_sid is not None:
 *             self._roles_sid._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._memids is not None:
 *             self._memids._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_roles_sid->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8147
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 *         if self._roles_sid is not None:             # <<<<<<<<<<<<<<
 *             self._roles_sid._listener = <PyObject *>null_listener
 *         if self._memids is not None:
 */
  }

  /* "pyrosm_proto.pyx":8149
 *         if self._roles_sid is not None:
 *             self._roles_sid._listener = <PyObject *>null_listener
 *         if self._memids is not None:             # <<<<<<<<<<<<<<
 *             self._memids._listener = <PyObject *>null_listener
 *         if self._types is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_memids) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8150
 *             self._roles_sid._listener = <PyObject *>null_listener
 *         if self._memids is not None:
 *             self._memids._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         if self._types is not None:
 *             self._types._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_memids->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8149
 *         if self._roles_sid is not None:
 *             self._roles_sid._listener = <PyObject *>null_listener
 *         if self._memids is not None:             # <<<<<<<<<<<<<<
 *             self._memids._listener = <PyObject *>null_listener
 *         if self._types is not None:
 */
  }

  /* "pyrosm_proto.pyx":8151
 *         if self._memids is not None:
 *             self._memids._listener = <PyObject *>null_listener
 *         if self._types is not None:             # <<<<<<<<<<<<<<
 *             self._types._listener = <PyObject *>null_listener
 * 
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_self->_types) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":8152
 *             self._memids._listener = <PyObject *>null_listener
 *         if self._types is not None:
 *             self._types._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, **kwargs):
 */
    __pyx_v_self->_types->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8151
 *         if self._memids is not None:
 *             self._memids._listener = <PyObject *>null_listener
 *         if self._types is not None:             # <<<<<<<<<<<<<<
 *             self._types._listener = <PyObject *>null_listener
 * 
 */
  }

  /* "pyrosm_proto.pyx":8139
 *         self._listener = <PyObject *>null_listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # Remove any references to self from child messages or repeated fields
 *         if self._keys is not None:
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrosm_proto.pyx":8154
 *             self._types._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_8Relation_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrosm_proto_8Relation_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_4__init__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrosm_proto_8Relation_4__init__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_field_name = NULL;
  PyObject *__pyx_v_field_value = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrosm_proto.pyx":8155
 * 
 *     def __init__(self, **kwargs):
 *         self.reset()             # <<<<<<<<<<<<<<
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8156
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 8156, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":8157
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('info',):
 */
    __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8157, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 8157, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8157, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 8157, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8157, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 8157, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 8157, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8157, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8157, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8157, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 8157, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 8157, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "pyrosm_proto.pyx":8158
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "pyrosm_proto.pyx":8159
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('info',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('keys','vals','roles_sid','memids','types',):
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_info, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 8159, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_13 = (__pyx_t_1 != 0);
          if (__pyx_t_13) {

            /* "pyrosm_proto.pyx":8160
 *                 try:
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)             # <<<<<<<<<<<<<<
 *                     elif field_name in ('keys','vals','roles_sid','memids','types',):
 *                         getattr(self, field_name).extend(field_value)
 */
            __pyx_t_7 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8160, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8160, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_7 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_7)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8160, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":8159
 *             for field_name, field_value in kwargs.items():
 *                 try:
 *                     if field_name in ('info',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('keys','vals','roles_sid','memids','types',):
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":8161
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('keys','vals','roles_sid','memids','types',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
          __Pyx_INCREF(__pyx_v_field_name);
          __pyx_t_2 = __pyx_v_field_name;
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_keys, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 8161, __pyx_L8_error)
          if (!__pyx_t_1) {
          } else {
            __pyx_t_13 = __pyx_t_1;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_vals, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 8161, __pyx_L8_error)
          if (!__pyx_t_1) {
          } else {
            __pyx_t_13 = __pyx_t_1;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_roles_sid, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 8161, __pyx_L8_error)
          if (!__pyx_t_1) {
          } else {
            __pyx_t_13 = __pyx_t_1;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_memids, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 8161, __pyx_L8_error)
          if (!__pyx_t_1) {
          } else {
            __pyx_t_13 = __pyx_t_1;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_types, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 8161, __pyx_L8_error)
          __pyx_t_13 = __pyx_t_1;
          __pyx_L17_bool_binop_done:;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_1 = (__pyx_t_13 != 0);
          if (__pyx_t_1) {

            /* "pyrosm_proto.pyx":8162
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('keys','vals','roles_sid','memids','types',):
 *                         getattr(self, field_name).extend(field_value)             # <<<<<<<<<<<<<<
 *                     else:
 *                         setattr(self, field_name, field_value)
 */
            __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8162, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_extend); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8162, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
              __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
              if (likely(__pyx_t_6)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_7, function);
              }
            }
            __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_field_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_field_value);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8162, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyrosm_proto.pyx":8161
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 *                     elif field_name in ('keys','vals','roles_sid','memids','types',):             # <<<<<<<<<<<<<<
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 */
            goto __pyx_L16;
          }

          /* "pyrosm_proto.pyx":8164
 *                         getattr(self, field_name).extend(field_value)
 *                     else:
 *                         setattr(self, field_name, field_value)             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 */
          /*else*/ {
            __pyx_t_14 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_field_name, __pyx_v_field_value); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 8164, __pyx_L8_error)
          }
          __pyx_L16:;

          /* "pyrosm_proto.pyx":8158
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L15_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrosm_proto.pyx":8165
 *                     else:
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return
 */
        __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_15) {
          __Pyx_AddTraceback("pyrosm_proto.Relation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 8165, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_6);

          /* "pyrosm_proto.pyx":8166
 *                         setattr(self, field_name, field_value)
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))             # <<<<<<<<<<<<<<
 *         return
 * 
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8166, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_field_name);
          __Pyx_GIVEREF(__pyx_v_field_name);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_field_name);
          __pyx_t_16 = __Pyx_PyString_Format(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 8166, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8166, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 8166, __pyx_L10_except_error)
        }
        goto __pyx_L10_except_error;
        __pyx_L10_except_error:;

        /* "pyrosm_proto.pyx":8158
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():
 *                 try:             # <<<<<<<<<<<<<<
 *                     if field_name in ('info',):
 *                         getattr(self, field_name).MergeFrom(field_value)
 */
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L15_try_end:;
      }

      /* "pyrosm_proto.pyx":8157
 *         self.reset()
 *         if kwargs:
 *             for field_name, field_value in kwargs.items():             # <<<<<<<<<<<<<<
 *                 try:
 *                     if field_name in ('info',):
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":8156
 *     def __init__(self, **kwargs):
 *         self.reset()
 *         if kwargs:             # <<<<<<<<<<<<<<
 *             for field_name, field_value in kwargs.items():
 *                 try:
 */
  }

  /* "pyrosm_proto.pyx":8167
 *                 except AttributeError:
 *                     raise ValueError('Protocol message has no "%s" field.' % (field_name,))
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8154
 *             self._types._listener = <PyObject *>null_listener
 * 
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         self.reset()
 *         if kwargs:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("pyrosm_proto.Relation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XDECREF(__pyx_v_field_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8169
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'id',
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_6__str__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_6__str__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_components = NULL;
  PyObject *__pyx_v_messages = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pyrosm_proto.pyx":8170
 * 
 *     def __str__(self):
 *         fields = [             # <<<<<<<<<<<<<<
 *                           'id',
 *                           'keys',
 */
  __pyx_t_1 = PyList_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_id);
  __Pyx_INCREF(__pyx_n_s_keys);
  __Pyx_GIVEREF(__pyx_n_s_keys);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_keys);
  __Pyx_INCREF(__pyx_n_s_vals);
  __Pyx_GIVEREF(__pyx_n_s_vals);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_vals);
  __Pyx_INCREF(__pyx_n_s_roles_sid);
  __Pyx_GIVEREF(__pyx_n_s_roles_sid);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_roles_sid);
  __Pyx_INCREF(__pyx_n_s_memids);
  __Pyx_GIVEREF(__pyx_n_s_memids);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_memids);
  __Pyx_INCREF(__pyx_n_s_types);
  __Pyx_GIVEREF(__pyx_n_s_types);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_types);
  __pyx_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8177
 *                           'memids',
 *                           'types',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]             # <<<<<<<<<<<<<<
 *         messages = [
 *                             'info',]
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8177, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_field); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8177, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_field, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8177, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 8177, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8178
 *                           'types',]
 *         components = ['{0}: {1}'.format(field, getattr(self, field)) for field in fields]
 *         messages = [             # <<<<<<<<<<<<<<
 *                             'info',]
 *         for message in messages:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_info);
  __Pyx_GIVEREF(__pyx_n_s_info);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_info);
  __pyx_v_messages = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8180
 *         messages = [
 *                             'info',]
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  __pyx_t_1 = __pyx_v_messages; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8180, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8181
 *                             'info',]
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))             # <<<<<<<<<<<<<<
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_message) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 8181, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8182
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    __pyx_t_4 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8182, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 8182, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 8182, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8182, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 8182, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8182, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 8182, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":8183
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))             # <<<<<<<<<<<<<<
 *             components.append('}')
 *         return '\n'.join(components)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_line);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 8183, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":8182
 *         for message in messages:
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):             # <<<<<<<<<<<<<<
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":8184
 *             for line in str(getattr(self, message)).split('\n'):
 *                 components.append('  {0}'.format(line))
 *             components.append('}')             # <<<<<<<<<<<<<<
 *         return '\n'.join(components)
 * 
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_components, __pyx_kp_s__2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 8184, __pyx_L1_error)

    /* "pyrosm_proto.pyx":8180
 *         messages = [
 *                             'info',]
 *         for message in messages:             # <<<<<<<<<<<<<<
 *             components.append('{0}: {{'.format(message))
 *             for line in str(getattr(self, message)).split('\n'):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8185
 *                 components.append('  {0}'.format(line))
 *             components.append('}')
 *         return '\n'.join(components)             # <<<<<<<<<<<<<<
 * 
 *     cpdef void reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8169
 *         return
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         fields = [
 *                           'id',
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.Relation.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XDECREF(__pyx_v_messages);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8187
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

static PyObject *__pyx_pw_12pyrosm_proto_8Relation_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_8Relation_reset(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("reset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_8Relation_9reset)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8187, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":8190
 *         # reset values and populate defaults
 * 
 *         self.__field_bitmap0 = 0             # <<<<<<<<<<<<<<
 * 
 *         self._id = 0
 */
  __pyx_v_self->__pyx___field_bitmap0 = 0;

  /* "pyrosm_proto.pyx":8192
 *         self.__field_bitmap0 = 0
 * 
 *         self._id = 0             # <<<<<<<<<<<<<<
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_id = 0;

  /* "pyrosm_proto.pyx":8193
 * 
 *         self._id = 0
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         self._keys = Uint32List.__new__(Uint32List)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_keys) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":8194
 *         self._id = 0
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._keys = Uint32List.__new__(Uint32List)
 *         self._keys._listener = <PyObject *>self
 */
    __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8193
 * 
 *         self._id = 0
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         self._keys = Uint32List.__new__(Uint32List)
 */
  }

  /* "pyrosm_proto.pyx":8195
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 *         self._keys = Uint32List.__new__(Uint32List)             # <<<<<<<<<<<<<<
 *         self._keys._listener = <PyObject *>self
 *         if self._vals is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Uint32List)))) __PYX_ERR(0, 8195, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_keys);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys));
  __pyx_v_self->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8196
 *             self._keys._listener = <PyObject *>null_listener
 *         self._keys = Uint32List.__new__(Uint32List)
 *         self._keys._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":8197
 *         self._keys = Uint32List.__new__(Uint32List)
 *         self._keys._listener = <PyObject *>self
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         self._vals = Uint32List.__new__(Uint32List)
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_vals) != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":8198
 *         self._keys._listener = <PyObject *>self
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._vals = Uint32List.__new__(Uint32List)
 *         self._vals._listener = <PyObject *>self
 */
    __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8197
 *         self._keys = Uint32List.__new__(Uint32List)
 *         self._keys._listener = <PyObject *>self
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         self._vals = Uint32List.__new__(Uint32List)
 */
  }

  /* "pyrosm_proto.pyx":8199
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 *         self._vals = Uint32List.__new__(Uint32List)             # <<<<<<<<<<<<<<
 *         self._vals._listener = <PyObject *>self
 *         if self._info is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Uint32List)))) __PYX_ERR(0, 8199, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_vals);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_vals));
  __pyx_v_self->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8200
 *             self._vals._listener = <PyObject *>null_listener
 *         self._vals = Uint32List.__new__(Uint32List)
 *         self._vals._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":8201
 *         self._vals = Uint32List.__new__(Uint32List)
 *         self._vals._listener = <PyObject *>self
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = None
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":8202
 *         self._vals._listener = <PyObject *>self
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._info = None
 *         if self._roles_sid is not None:
 */
    __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8201
 *         self._vals = Uint32List.__new__(Uint32List)
 *         self._vals._listener = <PyObject *>self
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = None
 */
  }

  /* "pyrosm_proto.pyx":8203
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = None             # <<<<<<<<<<<<<<
 *         if self._roles_sid is not None:
 *             self._roles_sid._listener = <PyObject *>null_listener
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_info);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
  __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)Py_None);

  /* "pyrosm_proto.pyx":8204
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = None
 *         if self._roles_sid is not None:             # <<<<<<<<<<<<<<
 *             self._roles_sid._listener = <PyObject *>null_listener
 *         self._roles_sid = Int32List.__new__(Int32List)
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_roles_sid) != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":8205
 *         self._info = None
 *         if self._roles_sid is not None:
 *             self._roles_sid._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._roles_sid = Int32List.__new__(Int32List)
 *         self._roles_sid._listener = <PyObject *>self
 */
    __pyx_v_self->_roles_sid->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8204
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = None
 *         if self._roles_sid is not None:             # <<<<<<<<<<<<<<
 *             self._roles_sid._listener = <PyObject *>null_listener
 *         self._roles_sid = Int32List.__new__(Int32List)
 */
  }

  /* "pyrosm_proto.pyx":8206
 *         if self._roles_sid is not None:
 *             self._roles_sid._listener = <PyObject *>null_listener
 *         self._roles_sid = Int32List.__new__(Int32List)             # <<<<<<<<<<<<<<
 *         self._roles_sid._listener = <PyObject *>self
 *         if self._memids is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int32List)))) __PYX_ERR(0, 8206, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_roles_sid);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_roles_sid));
  __pyx_v_self->_roles_sid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8207
 *             self._roles_sid._listener = <PyObject *>null_listener
 *         self._roles_sid = Int32List.__new__(Int32List)
 *         self._roles_sid._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._memids is not None:
 *             self._memids._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_roles_sid->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":8208
 *         self._roles_sid = Int32List.__new__(Int32List)
 *         self._roles_sid._listener = <PyObject *>self
 *         if self._memids is not None:             # <<<<<<<<<<<<<<
 *             self._memids._listener = <PyObject *>null_listener
 *         self._memids = Int64List.__new__(Int64List)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_self->_memids) != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":8209
 *         self._roles_sid._listener = <PyObject *>self
 *         if self._memids is not None:
 *             self._memids._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._memids = Int64List.__new__(Int64List)
 *         self._memids._listener = <PyObject *>self
 */
    __pyx_v_self->_memids->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8208
 *         self._roles_sid = Int32List.__new__(Int32List)
 *         self._roles_sid._listener = <PyObject *>self
 *         if self._memids is not None:             # <<<<<<<<<<<<<<
 *             self._memids._listener = <PyObject *>null_listener
 *         self._memids = Int64List.__new__(Int64List)
 */
  }

  /* "pyrosm_proto.pyx":8210
 *         if self._memids is not None:
 *             self._memids._listener = <PyObject *>null_listener
 *         self._memids = Int64List.__new__(Int64List)             # <<<<<<<<<<<<<<
 *         self._memids._listener = <PyObject *>self
 *         if self._types is not None:
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int64List)))) __PYX_ERR(0, 8210, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_memids);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_memids));
  __pyx_v_self->_memids = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8211
 *             self._memids._listener = <PyObject *>null_listener
 *         self._memids = Int64List.__new__(Int64List)
 *         self._memids._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         if self._types is not None:
 *             self._types._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_memids->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":8212
 *         self._memids = Int64List.__new__(Int64List)
 *         self._memids._listener = <PyObject *>self
 *         if self._types is not None:             # <<<<<<<<<<<<<<
 *             self._types._listener = <PyObject *>null_listener
 *         self._types = Int32List.__new__(Int32List)
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_types) != Py_None);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":8213
 *         self._memids._listener = <PyObject *>self
 *         if self._types is not None:
 *             self._types._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._types = Int32List.__new__(Int32List)
 *         self._types._listener = <PyObject *>self
 */
    __pyx_v_self->_types->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8212
 *         self._memids = Int64List.__new__(Int64List)
 *         self._memids._listener = <PyObject *>self
 *         if self._types is not None:             # <<<<<<<<<<<<<<
 *             self._types._listener = <PyObject *>null_listener
 *         self._types = Int32List.__new__(Int32List)
 */
  }

  /* "pyrosm_proto.pyx":8214
 *         if self._types is not None:
 *             self._types._listener = <PyObject *>null_listener
 *         self._types = Int32List.__new__(Int32List)             # <<<<<<<<<<<<<<
 *         self._types._listener = <PyObject *>self
 *         return
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int32List)))) __PYX_ERR(0, 8214, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_types);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_types));
  __pyx_v_self->_types = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8215
 *             self._types._listener = <PyObject *>null_listener
 *         self._types = Int32List.__new__(Int32List)
 *         self._types._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_v_self->_types->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":8216
 *         self._types = Int32List.__new__(Int32List)
 *         self._types._listener = <PyObject *>self
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8187
 *         return '\n'.join(components)
 * 
 *     cpdef void reset(self):             # <<<<<<<<<<<<<<
 *         # reset values and populate defaults
 * 
 */

  /* 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_WriteUnraisable("pyrosm_proto.Relation.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_8reset(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_8reset(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("reset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_8Relation_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8187, __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("pyrosm_proto.Relation.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8220
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._id
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_2id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_2id___get__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_2id___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":8221
 *     @property
 *     def id(self):
 *         return self._id             # <<<<<<<<<<<<<<
 * 
 *     @id.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8220
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._id
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Relation.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8224
 * 
 *     @id.setter
 *     def id(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         self._id = value
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_8Relation_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_8Relation_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_2id_2__set__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrosm_proto_8Relation_2id_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int64_t __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":8225
 *     @id.setter
 *     def id(self, value):
 *         self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *         self._id = value
 *         self._Modified()
 */
  __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

  /* "pyrosm_proto.pyx":8226
 *     def id(self, value):
 *         self.__field_bitmap0 |= 1
 *         self._id = value             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 8226, __pyx_L1_error)
  __pyx_v_self->_id = __pyx_t_1;

  /* "pyrosm_proto.pyx":8227
 *         self.__field_bitmap0 |= 1
 *         self._id = value
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8224
 * 
 *     @id.setter
 *     def id(self, value):             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 1
 *         self._id = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8230
 * 
 *     @property
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self._keys
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_4keys_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_4keys_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_4keys___get__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_4keys___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":8231
 *     @property
 *     def keys(self):
 *         return self._keys             # <<<<<<<<<<<<<<
 * 
 *     @keys.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_keys));
  __pyx_r = ((PyObject *)__pyx_v_self->_keys);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8230
 * 
 *     @property
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self._keys
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8234
 * 
 *     @keys.setter
 *     def keys(self, value):             # <<<<<<<<<<<<<<
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_8Relation_4keys_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_8Relation_4keys_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_4keys_2__set__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrosm_proto_8Relation_4keys_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  uint32_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":8235
 *     @keys.setter
 *     def keys(self, value):
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_keys) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8236
 *     def keys(self, value):
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8235
 *     @keys.setter
 *     def keys(self, value):
 *         if self._keys is not None:             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":8238
 *             self._keys._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":8239
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":8240
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint32_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 8240, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":8241
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":8239
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":8242
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":8239
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":8245
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._keys = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8246
 *         cdef int i
 *         if memview_available == 1:
 *             self._keys = Uint32List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._keys.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 8246, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 8246, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_keys);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys));
    __pyx_v_self->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":8247
 *         if memview_available == 1:
 *             self._keys = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._keys.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 8247, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 8247, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":8248
 *             self._keys = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._keys.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._keys = Uint32List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 8248, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 8248, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_keys->__pyx_vtab)->append(__pyx_v_self->_keys, (*((uint32_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":8249
 *             for i in range(memview.size):
 *                 self._keys.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._keys = Uint32List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":8245
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._keys = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":8250
 *                 self._keys.append(memview[i])
 *             return
 *         self._keys = Uint32List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._keys.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 8250, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_keys);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys));
  __pyx_v_self->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":8251
 *             return
 *         self._keys = Uint32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._keys.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 8251, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 8251, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8251, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 8251, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8251, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 8251, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":8252
 *         self._keys = Uint32List(listener=self)
 *         for val in value:
 *             self._keys.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_uint32_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 8252, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_keys->__pyx_vtab)->append(__pyx_v_self->_keys, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":8251
 *             return
 *         self._keys = Uint32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._keys.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":8253
 *         for val in value:
 *             self._keys.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8234
 * 
 *     @keys.setter
 *     def keys(self, value):             # <<<<<<<<<<<<<<
 *         if self._keys is not None:
 *             self._keys._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.Relation.keys.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8256
 * 
 *     @property
 *     def vals(self):             # <<<<<<<<<<<<<<
 *         return self._vals
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_4vals_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_4vals_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_4vals___get__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_4vals___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":8257
 *     @property
 *     def vals(self):
 *         return self._vals             # <<<<<<<<<<<<<<
 * 
 *     @vals.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_vals));
  __pyx_r = ((PyObject *)__pyx_v_self->_vals);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8256
 * 
 *     @property
 *     def vals(self):             # <<<<<<<<<<<<<<
 *         return self._vals
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8260
 * 
 *     @vals.setter
 *     def vals(self, value):             # <<<<<<<<<<<<<<
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_8Relation_4vals_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_8Relation_4vals_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_4vals_2__set__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrosm_proto_8Relation_4vals_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  uint32_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":8261
 *     @vals.setter
 *     def vals(self, value):
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_vals) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8262
 *     def vals(self, value):
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8261
 *     @vals.setter
 *     def vals(self, value):
 *         if self._vals is not None:             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":8264
 *             self._vals._listener = <PyObject *>null_listener
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":8265
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":8266
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint32_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 8266, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":8267
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":8265
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":8268
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":8265
 *         cdef uint32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":8271
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._vals = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8272
 *         cdef int i
 *         if memview_available == 1:
 *             self._vals = Uint32List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._vals.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 8272, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 8272, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_vals);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_vals));
    __pyx_v_self->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":8273
 *         if memview_available == 1:
 *             self._vals = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._vals.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 8273, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 8273, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":8274
 *             self._vals = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._vals.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._vals = Uint32List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 8274, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 8274, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_vals->__pyx_vtab)->append(__pyx_v_self->_vals, (*((uint32_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":8275
 *             for i in range(memview.size):
 *                 self._vals.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._vals = Uint32List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":8271
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._vals = Uint32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":8276
 *                 self._vals.append(memview[i])
 *             return
 *         self._vals = Uint32List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._vals.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 8276, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_vals);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_vals));
  __pyx_v_self->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":8277
 *             return
 *         self._vals = Uint32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._vals.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 8277, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 8277, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8277, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 8277, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8277, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 8277, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":8278
 *         self._vals = Uint32List(listener=self)
 *         for val in value:
 *             self._vals.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_uint32_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 8278, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_vals->__pyx_vtab)->append(__pyx_v_self->_vals, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":8277
 *             return
 *         self._vals = Uint32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._vals.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":8279
 *         for val in value:
 *             self._vals.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8260
 * 
 *     @vals.setter
 *     def vals(self, value):             # <<<<<<<<<<<<<<
 *         if self._vals is not None:
 *             self._vals._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.Relation.vals.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8282
 * 
 *     @property
 *     def info(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._info is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_4info_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_4info_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_4info___get__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_4info___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":8284
 *     def info(self):
 *         # lazy init sub messages
 *         if self._info is None:             # <<<<<<<<<<<<<<
 *             self._info = Info.__new__(Info)
 *             self._info.reset()
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_info) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8285
 *         # lazy init sub messages
 *         if self._info is None:
 *             self._info = Info.__new__(Info)             # <<<<<<<<<<<<<<
 *             self._info.reset()
 *             self._info._listener = <PyObject *>self
 */
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_Info(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8285, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __Pyx_GOTREF(__pyx_v_self->_info);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
    __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrosm_proto.pyx":8286
 *         if self._info is None:
 *             self._info = Info.__new__(Info)
 *             self._info.reset()             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>self
 *         return self._info
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->reset(__pyx_v_self->_info, 0);

    /* "pyrosm_proto.pyx":8287
 *             self._info = Info.__new__(Info)
 *             self._info.reset()
 *             self._info._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         return self._info
 * 
 */
    __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":8284
 *     def info(self):
 *         # lazy init sub messages
 *         if self._info is None:             # <<<<<<<<<<<<<<
 *             self._info = Info.__new__(Info)
 *             self._info.reset()
 */
  }

  /* "pyrosm_proto.pyx":8288
 *             self._info.reset()
 *             self._info._listener = <PyObject *>self
 *         return self._info             # <<<<<<<<<<<<<<
 * 
 *     @info.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_info));
  __pyx_r = ((PyObject *)__pyx_v_self->_info);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8282
 * 
 *     @property
 *     def info(self):             # <<<<<<<<<<<<<<
 *         # lazy init sub messages
 *         if self._info is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Relation.info.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8291
 * 
 *     @info.setter
 *     def info(self, value):             # <<<<<<<<<<<<<<
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_8Relation_4info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_8Relation_4info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_4info_2__set__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrosm_proto_8Relation_4info_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":8292
 *     @info.setter
 *     def info(self, value):
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = value
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8293
 *     def info(self, value):
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         self._info = value
 *         self._info._listener = <PyObject *>self
 */
    __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8292
 *     @info.setter
 *     def info(self, value):
 *         if self._info is not None:             # <<<<<<<<<<<<<<
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = value
 */
  }

  /* "pyrosm_proto.pyx":8294
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = value             # <<<<<<<<<<<<<<
 *         self._info._listener = <PyObject *>self
 *         self._Modified()
 */
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_12pyrosm_proto_Info))))) __PYX_ERR(0, 8294, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_info);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
  __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyrosm_proto.pyx":8295
 *             self._info._listener = <PyObject *>null_listener
 *         self._info = value
 *         self._info._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_self);

  /* "pyrosm_proto.pyx":8296
 *         self._info = value
 *         self._info._listener = <PyObject *>self
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8291
 * 
 *     @info.setter
 *     def info(self, value):             # <<<<<<<<<<<<<<
 *         if self._info is not None:
 *             self._info._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Relation.info.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8299
 * 
 *     @property
 *     def roles_sid(self):             # <<<<<<<<<<<<<<
 *         return self._roles_sid
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_9roles_sid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_9roles_sid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_9roles_sid___get__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_9roles_sid___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":8300
 *     @property
 *     def roles_sid(self):
 *         return self._roles_sid             # <<<<<<<<<<<<<<
 * 
 *     @roles_sid.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_roles_sid));
  __pyx_r = ((PyObject *)__pyx_v_self->_roles_sid);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8299
 * 
 *     @property
 *     def roles_sid(self):             # <<<<<<<<<<<<<<
 *         return self._roles_sid
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8303
 * 
 *     @roles_sid.setter
 *     def roles_sid(self, value):             # <<<<<<<<<<<<<<
 *         if self._roles_sid is not None:
 *             self._roles_sid._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_8Relation_9roles_sid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_8Relation_9roles_sid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_9roles_sid_2__set__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrosm_proto_8Relation_9roles_sid_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int32_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":8304
 *     @roles_sid.setter
 *     def roles_sid(self, value):
 *         if self._roles_sid is not None:             # <<<<<<<<<<<<<<
 *             self._roles_sid._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_roles_sid) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8305
 *     def roles_sid(self, value):
 *         if self._roles_sid is not None:
 *             self._roles_sid._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_roles_sid->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8304
 *     @roles_sid.setter
 *     def roles_sid(self, value):
 *         if self._roles_sid is not None:             # <<<<<<<<<<<<<<
 *             self._roles_sid._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":8307
 *             self._roles_sid._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":8308
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":8309
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_int32_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 8309, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":8310
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":8308
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":8311
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":8308
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":8314
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._roles_sid = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8315
 *         cdef int i
 *         if memview_available == 1:
 *             self._roles_sid = Int32List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._roles_sid.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 8315, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int32_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 8315, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_roles_sid);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_roles_sid));
    __pyx_v_self->_roles_sid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":8316
 *         if memview_available == 1:
 *             self._roles_sid = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._roles_sid.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 8316, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int32_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 8316, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":8317
 *             self._roles_sid = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._roles_sid.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._roles_sid = Int32List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 8317, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 8317, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_roles_sid->__pyx_vtab)->append(__pyx_v_self->_roles_sid, (*((int32_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8317, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":8318
 *             for i in range(memview.size):
 *                 self._roles_sid.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._roles_sid = Int32List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":8314
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._roles_sid = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":8319
 *                 self._roles_sid.append(memview[i])
 *             return
 *         self._roles_sid = Int32List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._roles_sid.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 8319, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_roles_sid);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_roles_sid));
  __pyx_v_self->_roles_sid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":8320
 *             return
 *         self._roles_sid = Int32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._roles_sid.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 8320, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 8320, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8320, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 8320, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8320, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 8320, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":8321
 *         self._roles_sid = Int32List(listener=self)
 *         for val in value:
 *             self._roles_sid.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_int32_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 8321, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_roles_sid->__pyx_vtab)->append(__pyx_v_self->_roles_sid, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":8320
 *             return
 *         self._roles_sid = Int32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._roles_sid.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":8322
 *         for val in value:
 *             self._roles_sid.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8303
 * 
 *     @roles_sid.setter
 *     def roles_sid(self, value):             # <<<<<<<<<<<<<<
 *         if self._roles_sid is not None:
 *             self._roles_sid._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.Relation.roles_sid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8325
 * 
 *     @property
 *     def memids(self):             # <<<<<<<<<<<<<<
 *         return self._memids
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_6memids_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_6memids_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_6memids___get__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_6memids___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":8326
 *     @property
 *     def memids(self):
 *         return self._memids             # <<<<<<<<<<<<<<
 * 
 *     @memids.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_memids));
  __pyx_r = ((PyObject *)__pyx_v_self->_memids);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8325
 * 
 *     @property
 *     def memids(self):             # <<<<<<<<<<<<<<
 *         return self._memids
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8329
 * 
 *     @memids.setter
 *     def memids(self, value):             # <<<<<<<<<<<<<<
 *         if self._memids is not None:
 *             self._memids._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_8Relation_6memids_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_8Relation_6memids_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_6memids_2__set__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrosm_proto_8Relation_6memids_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int64_t __pyx_t_17;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":8330
 *     @memids.setter
 *     def memids(self, value):
 *         if self._memids is not None:             # <<<<<<<<<<<<<<
 *             self._memids._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_memids) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8331
 *     def memids(self, value):
 *         if self._memids is not None:
 *             self._memids._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_memids->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8330
 *     @memids.setter
 *     def memids(self, value):
 *         if self._memids is not None:             # <<<<<<<<<<<<<<
 *             self._memids._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":8333
 *             self._memids._listener = <PyObject *>null_listener
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":8334
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":8335
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_int64_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 8335, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":8336
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":8334
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":8337
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":8334
 *         cdef int64_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":8340
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._memids = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8341
 *         cdef int i
 *         if memview_available == 1:
 *             self._memids = Int64List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._memids.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 8341, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int64_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 8341, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_memids);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_memids));
    __pyx_v_self->_memids = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":8342
 *         if memview_available == 1:
 *             self._memids = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._memids.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 8342, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int64_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 8342, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":8343
 *             self._memids = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._memids.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._memids = Int64List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 8343, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 8343, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_memids->__pyx_vtab)->append(__pyx_v_self->_memids, (*((int64_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":8344
 *             for i in range(memview.size):
 *                 self._memids.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._memids = Int64List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":8340
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._memids = Int64List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":8345
 *                 self._memids.append(memview[i])
 *             return
 *         self._memids = Int64List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             self._memids.append(val)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 8345, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_memids);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_memids));
  __pyx_v_self->_memids = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":8346
 *             return
 *         self._memids = Int64List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._memids.append(val)
 *         self._Modified()
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 8346, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 8346, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8346, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 8346, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8346, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 8346, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":8347
 *         self._memids = Int64List(listener=self)
 *         for val in value:
 *             self._memids.append(val)             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    __pyx_t_17 = __Pyx_PyInt_As_int64_t(__pyx_v_val); if (unlikely((__pyx_t_17 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 8347, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_memids->__pyx_vtab)->append(__pyx_v_self->_memids, __pyx_t_17, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8347, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":8346
 *             return
 *         self._memids = Int64List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             self._memids.append(val)
 *         self._Modified()
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":8348
 *         for val in value:
 *             self._memids.append(val)
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8329
 * 
 *     @memids.setter
 *     def memids(self, value):             # <<<<<<<<<<<<<<
 *         if self._memids is not None:
 *             self._memids._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrosm_proto.Relation.memids.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8351
 * 
 *     @property
 *     def types(self):             # <<<<<<<<<<<<<<
 *         return self._types
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_5types_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_5types_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_5types___get__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_5types___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrosm_proto.pyx":8352
 *     @property
 *     def types(self):
 *         return self._types             # <<<<<<<<<<<<<<
 * 
 *     @types.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_types));
  __pyx_r = ((PyObject *)__pyx_v_self->_types);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8351
 * 
 *     @property
 *     def types(self):             # <<<<<<<<<<<<<<
 *         return self._types
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8355
 * 
 *     @types.setter
 *     def types(self, value):             # <<<<<<<<<<<<<<
 *         if self._types is not None:
 *             self._types._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_8Relation_5types_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_8Relation_5types_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_5types_2__set__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrosm_proto_8Relation_5types_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value) {
  __Pyx_memviewslice __pyx_v_memview = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_memview_available;
  int __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  PyObject *__pyx_t_17 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "pyrosm_proto.pyx":8356
 *     @types.setter
 *     def types(self, value):
 *         if self._types is not None:             # <<<<<<<<<<<<<<
 *             self._types._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_types) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8357
 *     def types(self, value):
 *         if self._types is not None:
 *             self._types._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 */
    __pyx_v_self->_types->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8356
 *     @types.setter
 *     def types(self, value):
 *         if self._types is not None:             # <<<<<<<<<<<<<<
 *             self._types._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 */
  }

  /* "pyrosm_proto.pyx":8359
 *             self._types._listener = <PyObject *>null_listener
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0             # <<<<<<<<<<<<<<
 *         try:
 *             memview = value
 */
  __pyx_v_memview_available = 0;

  /* "pyrosm_proto.pyx":8360
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":8361
 *         cdef int memview_available = 0
 *         try:
 *             memview = value             # <<<<<<<<<<<<<<
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):
 */
      __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_int32_t(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 8361, __pyx_L4_error)
      __pyx_v_memview = __pyx_t_6;
      __pyx_t_6.memview = NULL;
      __pyx_t_6.data = NULL;

      /* "pyrosm_proto.pyx":8362
 *         try:
 *             memview = value
 *             memview_available = 1             # <<<<<<<<<<<<<<
 *         except (TypeError, NameError, ValueError):
 *             pass
 */
      __pyx_v_memview_available = 1;

      /* "pyrosm_proto.pyx":8360
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);

    /* "pyrosm_proto.pyx":8363
 *             memview = value
 *             memview_available = 1
 *         except (TypeError, NameError, ValueError):             # <<<<<<<<<<<<<<
 *             pass
 *         cdef int i
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":8360
 *         cdef int32_t[:] memview
 *         cdef int memview_available = 0
 *         try:             # <<<<<<<<<<<<<<
 *             memview = value
 *             memview_available = 1
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":8366
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._types = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  __pyx_t_2 = ((__pyx_v_memview_available == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8367
 *         cdef int i
 *         if memview_available == 1:
 *             self._types = Int32List(memview.size, listener=self)             # <<<<<<<<<<<<<<
 *             for i in range(memview.size):
 *                 self._types.append(memview[i])
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 8367, __pyx_L1_error) }
    __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int32_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 8367, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GIVEREF(__pyx_t_10);
    __Pyx_GOTREF(__pyx_v_self->_types);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_types));
    __pyx_v_self->_types = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "pyrosm_proto.pyx":8368
 *         if memview_available == 1:
 *             self._types = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):             # <<<<<<<<<<<<<<
 *                 self._types.append(memview[i])
 *             return
 */
    if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 8368, __pyx_L1_error) }
    __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_memview, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_int32_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_t_9); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 8368, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_12; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pyrosm_proto.pyx":8369
 *             self._types = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 *                 self._types.append(memview[i])             # <<<<<<<<<<<<<<
 *             return
 *         self._types = Int32List(listener=self)
 */
      if (unlikely(!__pyx_v_memview.memview)) { __Pyx_RaiseUnboundLocalError("memview"); __PYX_ERR(0, 8369, __pyx_L1_error) }
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_memview.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_memview.shape[0])) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        __PYX_ERR(0, 8369, __pyx_L1_error)
      }
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_types->__pyx_vtab)->append(__pyx_v_self->_types, (*((int32_t *) ( /* dim=0 */ (__pyx_v_memview.data + __pyx_t_13 * __pyx_v_memview.strides[0]) ))), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8369, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "pyrosm_proto.pyx":8370
 *             for i in range(memview.size):
 *                 self._types.append(memview[i])
 *             return             # <<<<<<<<<<<<<<
 *         self._types = Int32List(listener=self)
 *         for val in value:
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":8366
 *             pass
 *         cdef int i
 *         if memview_available == 1:             # <<<<<<<<<<<<<<
 *             self._types = Int32List(memview.size, listener=self)
 *             for i in range(memview.size):
 */
  }

  /* "pyrosm_proto.pyx":8371
 *                 self._types.append(memview[i])
 *             return
 *         self._types = Int32List(listener=self)             # <<<<<<<<<<<<<<
 *         for val in value:
 *             if val == 0:
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_listener, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 8371, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_GOTREF(__pyx_v_self->_types);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_types));
  __pyx_v_self->_types = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":8372
 *             return
 *         self._types = Int32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             if val == 0:
 *                 self._types.append(_RelationMemberType_NODE)
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_10 = __pyx_v_value; __Pyx_INCREF(__pyx_t_10); __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 8372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 8372, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_10))) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 8372, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8372, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_15); __Pyx_INCREF(__pyx_t_9); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 8372, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8372, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_16(__pyx_t_10);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 8372, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":8373
 *         self._types = Int32List(listener=self)
 *         for val in value:
 *             if val == 0:             # <<<<<<<<<<<<<<
 *                 self._types.append(_RelationMemberType_NODE)
 * 
 */
    __pyx_t_9 = __Pyx_PyInt_EqObjC(__pyx_v_val, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 8373, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_2) {

      /* "pyrosm_proto.pyx":8374
 *         for val in value:
 *             if val == 0:
 *                 self._types.append(_RelationMemberType_NODE)             # <<<<<<<<<<<<<<
 * 
 *             elif val == 1:
 */
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_types->__pyx_vtab)->append(__pyx_v_self->_types, __pyx_e_12pyrosm_proto__RelationMemberType_NODE, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8374, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "pyrosm_proto.pyx":8373
 *         self._types = Int32List(listener=self)
 *         for val in value:
 *             if val == 0:             # <<<<<<<<<<<<<<
 *                 self._types.append(_RelationMemberType_NODE)
 * 
 */
      goto __pyx_L15;
    }

    /* "pyrosm_proto.pyx":8376
 *                 self._types.append(_RelationMemberType_NODE)
 * 
 *             elif val == 1:             # <<<<<<<<<<<<<<
 *                 self._types.append(_RelationMemberType_WAY)
 * 
 */
    __pyx_t_9 = __Pyx_PyInt_EqObjC(__pyx_v_val, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 8376, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_2) {

      /* "pyrosm_proto.pyx":8377
 * 
 *             elif val == 1:
 *                 self._types.append(_RelationMemberType_WAY)             # <<<<<<<<<<<<<<
 * 
 *             elif val == 2:
 */
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_types->__pyx_vtab)->append(__pyx_v_self->_types, __pyx_e_12pyrosm_proto__RelationMemberType_WAY, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "pyrosm_proto.pyx":8376
 *                 self._types.append(_RelationMemberType_NODE)
 * 
 *             elif val == 1:             # <<<<<<<<<<<<<<
 *                 self._types.append(_RelationMemberType_WAY)
 * 
 */
      goto __pyx_L15;
    }

    /* "pyrosm_proto.pyx":8379
 *                 self._types.append(_RelationMemberType_WAY)
 * 
 *             elif val == 2:             # <<<<<<<<<<<<<<
 *                 self._types.append(_RelationMemberType_RELATION)
 * 
 */
    __pyx_t_9 = __Pyx_PyInt_EqObjC(__pyx_v_val, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 8379, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (likely(__pyx_t_2)) {

      /* "pyrosm_proto.pyx":8380
 * 
 *             elif val == 2:
 *                 self._types.append(_RelationMemberType_RELATION)             # <<<<<<<<<<<<<<
 * 
 *             else:
 */
      __pyx_t_9 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_types->__pyx_vtab)->append(__pyx_v_self->_types, __pyx_e_12pyrosm_proto__RelationMemberType_RELATION, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8380, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "pyrosm_proto.pyx":8379
 *                 self._types.append(_RelationMemberType_WAY)
 * 
 *             elif val == 2:             # <<<<<<<<<<<<<<
 *                 self._types.append(_RelationMemberType_RELATION)
 * 
 */
      goto __pyx_L15;
    }

    /* "pyrosm_proto.pyx":8383
 * 
 *             else:
 *                 raise ValueError("{} not a valid value for enum RelationMemberType".format(val))             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
    /*else*/ {
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_not_a_valid_value_for_enum_Rela, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8383, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_17 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_17)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_17);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_9 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_17, __pyx_v_val) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_val);
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8383, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8383, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(0, 8383, __pyx_L1_error)
    }
    __pyx_L15:;

    /* "pyrosm_proto.pyx":8372
 *             return
 *         self._types = Int32List(listener=self)
 *         for val in value:             # <<<<<<<<<<<<<<
 *             if val == 0:
 *                 self._types.append(_RelationMemberType_NODE)
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pyrosm_proto.pyx":8384
 *             else:
 *                 raise ValueError("{} not a valid value for enum RelationMemberType".format(val))
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8355
 * 
 *     @types.setter
 *     def types(self, value):             # <<<<<<<<<<<<<<
 *         if self._types is not None:
 *             self._types._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("pyrosm_proto.Relation.types.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_memview, 1);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8387
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

static int __pyx_f_12pyrosm_proto_8Relation__protobuf_deserialize(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, unsigned char const *__pyx_v_memory, int __pyx_v_size, int __pyx_v_cache) {
  int __pyx_v_current_offset;
  int64_t __pyx_v_key;
  int64_t __pyx_v_field_size;
  int64_t __pyx_v_keys_marker;
  uint32_t __pyx_v_keys_elt;
  int64_t __pyx_v_vals_marker;
  uint32_t __pyx_v_vals_elt;
  int64_t __pyx_v_roles_sid_marker;
  int32_t __pyx_v_roles_sid_elt;
  int64_t __pyx_v_memids_marker;
  int64_t __pyx_v_memids_elt;
  int64_t __pyx_v_types_marker;
  int32_t __pyx_v_types_elt;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_protobuf_deserialize", 0);

  /* "pyrosm_proto.pyx":8388
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):
 *         cdef int current_offset = 0             # <<<<<<<<<<<<<<
 *         cdef int64_t key
 *         cdef int64_t field_size
 */
  __pyx_v_current_offset = 0;

  /* "pyrosm_proto.pyx":8401
 *         cdef int64_t types_marker
 *         cdef int32_t types_elt
 *         while current_offset < size:             # <<<<<<<<<<<<<<
 *             key = get_varint64(memory, &current_offset)
 *             # id
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_current_offset < __pyx_v_size) != 0);
    if (!__pyx_t_1) break;

    /* "pyrosm_proto.pyx":8402
 *         cdef int32_t types_elt
 *         while current_offset < size:
 *             key = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # id
 *             if key == 8:
 */
    __pyx_v_key = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

    /* "pyrosm_proto.pyx":8404
 *             key = get_varint64(memory, &current_offset)
 *             # id
 *             if key == 8:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 self._id = get_varint64(memory, &current_offset)
 */
    switch (__pyx_v_key) {
      case 8:

      /* "pyrosm_proto.pyx":8405
 *             # id
 *             if key == 8:
 *                 self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *                 self._id = get_varint64(memory, &current_offset)
 *             # keys
 */
      __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

      /* "pyrosm_proto.pyx":8406
 *             if key == 8:
 *                 self.__field_bitmap0 |= 1
 *                 self._id = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *             # keys
 *             elif key == 18:
 */
      __pyx_v_self->_id = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":8404
 *             key = get_varint64(memory, &current_offset)
 *             # id
 *             if key == 8:             # <<<<<<<<<<<<<<
 *                 self.__field_bitmap0 |= 1
 *                 self._id = get_varint64(memory, &current_offset)
 */
      break;
      case 18:

      /* "pyrosm_proto.pyx":8409
 *             # keys
 *             elif key == 18:
 *                 keys_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 keys_marker += current_offset
 * 
 */
      __pyx_v_keys_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":8410
 *             elif key == 18:
 *                 keys_marker = get_varint64(memory, &current_offset)
 *                 keys_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>keys_marker:
 */
      __pyx_v_keys_marker = (__pyx_v_keys_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":8412
 *                 keys_marker += current_offset
 * 
 *                 while current_offset < <int>keys_marker:             # <<<<<<<<<<<<<<
 *                     keys_elt = get_varint32(memory, &current_offset)
 *                     self._keys._append(keys_elt)
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_current_offset < ((int)__pyx_v_keys_marker)) != 0);
        if (!__pyx_t_1) break;

        /* "pyrosm_proto.pyx":8413
 * 
 *                 while current_offset < <int>keys_marker:
 *                     keys_elt = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._keys._append(keys_elt)
 *             # vals
 */
        __pyx_v_keys_elt = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":8414
 *                 while current_offset < <int>keys_marker:
 *                     keys_elt = get_varint32(memory, &current_offset)
 *                     self._keys._append(keys_elt)             # <<<<<<<<<<<<<<
 *             # vals
 *             elif key == 26:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_keys->__pyx_vtab)->_append(__pyx_v_self->_keys, __pyx_v_keys_elt);
      }

      /* "pyrosm_proto.pyx":8408
 *                 self._id = get_varint64(memory, &current_offset)
 *             # keys
 *             elif key == 18:             # <<<<<<<<<<<<<<
 *                 keys_marker = get_varint64(memory, &current_offset)
 *                 keys_marker += current_offset
 */
      break;
      case 26:

      /* "pyrosm_proto.pyx":8417
 *             # vals
 *             elif key == 26:
 *                 vals_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 vals_marker += current_offset
 * 
 */
      __pyx_v_vals_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":8418
 *             elif key == 26:
 *                 vals_marker = get_varint64(memory, &current_offset)
 *                 vals_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>vals_marker:
 */
      __pyx_v_vals_marker = (__pyx_v_vals_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":8420
 *                 vals_marker += current_offset
 * 
 *                 while current_offset < <int>vals_marker:             # <<<<<<<<<<<<<<
 *                     vals_elt = get_varint32(memory, &current_offset)
 *                     self._vals._append(vals_elt)
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_current_offset < ((int)__pyx_v_vals_marker)) != 0);
        if (!__pyx_t_1) break;

        /* "pyrosm_proto.pyx":8421
 * 
 *                 while current_offset < <int>vals_marker:
 *                     vals_elt = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._vals._append(vals_elt)
 *             # info
 */
        __pyx_v_vals_elt = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":8422
 *                 while current_offset < <int>vals_marker:
 *                     vals_elt = get_varint32(memory, &current_offset)
 *                     self._vals._append(vals_elt)             # <<<<<<<<<<<<<<
 *             # info
 *             elif key == 34:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_vals->__pyx_vtab)->_append(__pyx_v_self->_vals, __pyx_v_vals_elt);
      }

      /* "pyrosm_proto.pyx":8416
 *                     self._keys._append(keys_elt)
 *             # vals
 *             elif key == 26:             # <<<<<<<<<<<<<<
 *                 vals_marker = get_varint64(memory, &current_offset)
 *                 vals_marker += current_offset
 */
      break;
      case 34:

      /* "pyrosm_proto.pyx":8425
 *             # info
 *             elif key == 34:
 *                 field_size = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 if self._info is None:
 *                     self._info = Info.__new__(Info)
 */
      __pyx_v_field_size = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":8426
 *             elif key == 34:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._info is None:             # <<<<<<<<<<<<<<
 *                     self._info = Info.__new__(Info)
 *                     self._info._listener = <PyObject *>self
 */
      __pyx_t_1 = (((PyObject *)__pyx_v_self->_info) == Py_None);
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "pyrosm_proto.pyx":8427
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._info is None:
 *                     self._info = Info.__new__(Info)             # <<<<<<<<<<<<<<
 *                     self._info._listener = <PyObject *>self
 *                 self._info.reset()
 */
        __pyx_t_3 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_Info(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8427, __pyx_L1_error)
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
        __Pyx_GOTREF(__pyx_v_self->_info);
        __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
        __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_t_3);
        __pyx_t_3 = 0;

        /* "pyrosm_proto.pyx":8428
 *                 if self._info is None:
 *                     self._info = Info.__new__(Info)
 *                     self._info._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *                 self._info.reset()
 *                 if cache:
 */
        __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_self);

        /* "pyrosm_proto.pyx":8426
 *             elif key == 34:
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._info is None:             # <<<<<<<<<<<<<<
 *                     self._info = Info.__new__(Info)
 *                     self._info._listener = <PyObject *>self
 */
      }

      /* "pyrosm_proto.pyx":8429
 *                     self._info = Info.__new__(Info)
 *                     self._info._listener = <PyObject *>self
 *                 self._info.reset()             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     self._info._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->reset(__pyx_v_self->_info, 0);

      /* "pyrosm_proto.pyx":8430
 *                     self._info._listener = <PyObject *>self
 *                 self._info.reset()
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._info._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._info._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      __pyx_t_2 = (__pyx_v_cache != 0);
      if (__pyx_t_2) {

        /* "pyrosm_proto.pyx":8431
 *                 self._info.reset()
 *                 if cache:
 *                     self._info._cached_serialization = bytes(memory[current_offset:current_offset+field_size])             # <<<<<<<<<<<<<<
 *                 current_offset += self._info._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *             # roles_sid
 */
        __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_memory) + __pyx_v_current_offset, (__pyx_v_current_offset + __pyx_v_field_size) - __pyx_v_current_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8431, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8431, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_self->_info->_cached_serialization);
        __Pyx_DECREF(__pyx_v_self->_info->_cached_serialization);
        __pyx_v_self->_info->_cached_serialization = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "pyrosm_proto.pyx":8430
 *                     self._info._listener = <PyObject *>self
 *                 self._info.reset()
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._info._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._info._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 */
      }

      /* "pyrosm_proto.pyx":8432
 *                 if cache:
 *                     self._info._cached_serialization = bytes(memory[current_offset:current_offset+field_size])
 *                 current_offset += self._info._protobuf_deserialize(memory+current_offset, <int>field_size, cache)             # <<<<<<<<<<<<<<
 *             # roles_sid
 *             elif key == 66:
 */
      __pyx_v_current_offset = (__pyx_v_current_offset + ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self->_info, (__pyx_v_memory + __pyx_v_current_offset), ((int)__pyx_v_field_size), __pyx_v_cache));

      /* "pyrosm_proto.pyx":8424
 *                     self._vals._append(vals_elt)
 *             # info
 *             elif key == 34:             # <<<<<<<<<<<<<<
 *                 field_size = get_varint64(memory, &current_offset)
 *                 if self._info is None:
 */
      break;
      case 66:

      /* "pyrosm_proto.pyx":8435
 *             # roles_sid
 *             elif key == 66:
 *                 roles_sid_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 roles_sid_marker += current_offset
 * 
 */
      __pyx_v_roles_sid_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":8436
 *             elif key == 66:
 *                 roles_sid_marker = get_varint64(memory, &current_offset)
 *                 roles_sid_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>roles_sid_marker:
 */
      __pyx_v_roles_sid_marker = (__pyx_v_roles_sid_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":8438
 *                 roles_sid_marker += current_offset
 * 
 *                 while current_offset < <int>roles_sid_marker:             # <<<<<<<<<<<<<<
 *                     roles_sid_elt = get_varint32(memory, &current_offset)
 *                     self._roles_sid._append(roles_sid_elt)
 */
      while (1) {
        __pyx_t_2 = ((__pyx_v_current_offset < ((int)__pyx_v_roles_sid_marker)) != 0);
        if (!__pyx_t_2) break;

        /* "pyrosm_proto.pyx":8439
 * 
 *                 while current_offset < <int>roles_sid_marker:
 *                     roles_sid_elt = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._roles_sid._append(roles_sid_elt)
 *             # memids
 */
        __pyx_v_roles_sid_elt = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":8440
 *                 while current_offset < <int>roles_sid_marker:
 *                     roles_sid_elt = get_varint32(memory, &current_offset)
 *                     self._roles_sid._append(roles_sid_elt)             # <<<<<<<<<<<<<<
 *             # memids
 *             elif key == 74:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_roles_sid->__pyx_vtab)->_append(__pyx_v_self->_roles_sid, __pyx_v_roles_sid_elt);
      }

      /* "pyrosm_proto.pyx":8434
 *                 current_offset += self._info._protobuf_deserialize(memory+current_offset, <int>field_size, cache)
 *             # roles_sid
 *             elif key == 66:             # <<<<<<<<<<<<<<
 *                 roles_sid_marker = get_varint64(memory, &current_offset)
 *                 roles_sid_marker += current_offset
 */
      break;
      case 74:

      /* "pyrosm_proto.pyx":8443
 *             # memids
 *             elif key == 74:
 *                 memids_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 memids_marker += current_offset
 * 
 */
      __pyx_v_memids_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":8444
 *             elif key == 74:
 *                 memids_marker = get_varint64(memory, &current_offset)
 *                 memids_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>memids_marker:
 */
      __pyx_v_memids_marker = (__pyx_v_memids_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":8446
 *                 memids_marker += current_offset
 * 
 *                 while current_offset < <int>memids_marker:             # <<<<<<<<<<<<<<
 *                     memids_elt = get_signed_varint64(memory, &current_offset)
 *                     self._memids._append(memids_elt)
 */
      while (1) {
        __pyx_t_2 = ((__pyx_v_current_offset < ((int)__pyx_v_memids_marker)) != 0);
        if (!__pyx_t_2) break;

        /* "pyrosm_proto.pyx":8447
 * 
 *                 while current_offset < <int>memids_marker:
 *                     memids_elt = get_signed_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._memids._append(memids_elt)
 *             # types
 */
        __pyx_v_memids_elt = __pyx_f_12pyrobuf_util_get_signed_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":8448
 *                 while current_offset < <int>memids_marker:
 *                     memids_elt = get_signed_varint64(memory, &current_offset)
 *                     self._memids._append(memids_elt)             # <<<<<<<<<<<<<<
 *             # types
 *             elif key == 82:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_memids->__pyx_vtab)->_append(__pyx_v_self->_memids, __pyx_v_memids_elt);
      }

      /* "pyrosm_proto.pyx":8442
 *                     self._roles_sid._append(roles_sid_elt)
 *             # memids
 *             elif key == 74:             # <<<<<<<<<<<<<<
 *                 memids_marker = get_varint64(memory, &current_offset)
 *                 memids_marker += current_offset
 */
      break;
      case 82:

      /* "pyrosm_proto.pyx":8451
 *             # types
 *             elif key == 82:
 *                 types_marker = get_varint64(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                 types_marker += current_offset
 * 
 */
      __pyx_v_types_marker = __pyx_f_12pyrobuf_util_get_varint64(__pyx_v_memory, (&__pyx_v_current_offset));

      /* "pyrosm_proto.pyx":8452
 *             elif key == 82:
 *                 types_marker = get_varint64(memory, &current_offset)
 *                 types_marker += current_offset             # <<<<<<<<<<<<<<
 * 
 *                 while current_offset < <int>types_marker:
 */
      __pyx_v_types_marker = (__pyx_v_types_marker + __pyx_v_current_offset);

      /* "pyrosm_proto.pyx":8454
 *                 types_marker += current_offset
 * 
 *                 while current_offset < <int>types_marker:             # <<<<<<<<<<<<<<
 *                     types_elt = get_varint32(memory, &current_offset)
 *                     self._types._append(types_elt)
 */
      while (1) {
        __pyx_t_2 = ((__pyx_v_current_offset < ((int)__pyx_v_types_marker)) != 0);
        if (!__pyx_t_2) break;

        /* "pyrosm_proto.pyx":8455
 * 
 *                 while current_offset < <int>types_marker:
 *                     types_elt = get_varint32(memory, &current_offset)             # <<<<<<<<<<<<<<
 *                     self._types._append(types_elt)
 *             # Unknown field - need to skip proper number of bytes
 */
        __pyx_v_types_elt = __pyx_f_12pyrobuf_util_get_varint32(__pyx_v_memory, (&__pyx_v_current_offset));

        /* "pyrosm_proto.pyx":8456
 *                 while current_offset < <int>types_marker:
 *                     types_elt = get_varint32(memory, &current_offset)
 *                     self._types._append(types_elt)             # <<<<<<<<<<<<<<
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 */
        ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_types->__pyx_vtab)->_append(__pyx_v_self->_types, __pyx_v_types_elt);
      }

      /* "pyrosm_proto.pyx":8450
 *                     self._memids._append(memids_elt)
 *             # types
 *             elif key == 82:             # <<<<<<<<<<<<<<
 *                 types_marker = get_varint64(memory, &current_offset)
 *                 types_marker += current_offset
 */
      break;
      default:

      /* "pyrosm_proto.pyx":8459
 *             # Unknown field - need to skip proper number of bytes
 *             else:
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)             # <<<<<<<<<<<<<<
 * 
 *         self._is_present_in_parent = True
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        if (unlikely(!(__pyx_f_12pyrobuf_util_skip_generic(__pyx_v_memory, (&__pyx_v_current_offset), __pyx_v_size, (__pyx_v_key & 0x7)) != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 8459, __pyx_L1_error)
        }
      }
      #endif
      break;
    }
  }

  /* "pyrosm_proto.pyx":8461
 *                 assert skip_generic(memory, &current_offset, size, key & 0x7)
 * 
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 * 
 *         return current_offset
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":8463
 *         self._is_present_in_parent = True
 * 
 *         return current_offset             # <<<<<<<<<<<<<<
 * 
 *     cpdef void Clear(self):
 */
  __pyx_r = __pyx_v_current_offset;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8387
 * 
 * 
 *     cdef int _protobuf_deserialize(self, const unsigned char *memory, int size, bint cache):             # <<<<<<<<<<<<<<
 *         cdef int current_offset = 0
 *         cdef int64_t key
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pyrosm_proto.Relation._protobuf_deserialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8465
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

static PyObject *__pyx_pw_12pyrosm_proto_8Relation_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_8Relation_Clear(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8465, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_8Relation_11Clear)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8465, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":8467
 *     cpdef void Clear(self):
 *         """Clears all data that was set in the message."""
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self._Modified()
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8468
 *         """Clears all data that was set in the message."""
 *         self.reset()
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void ClearField(self, field_name):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8465
 *         return current_offset
 * 
 *     cpdef void Clear(self):             # <<<<<<<<<<<<<<
 *         """Clears all data that was set in the message."""
 *         self.reset()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Relation.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_10Clear[] = "Clears all data that was set in the message.";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_11Clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Clear (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_10Clear(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_10Clear(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("Clear", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_8Relation_Clear(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8465, __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("pyrosm_proto.Relation.Clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8470
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':
 */

static PyObject *__pyx_pw_12pyrosm_proto_8Relation_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static void __pyx_f_12pyrosm_proto_8Relation_ClearField(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("ClearField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ClearField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8470, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_8Relation_13ClearField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8470, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":8472
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_id, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8472, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":8473
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':
 *             self.__field_bitmap0 &= ~1             # <<<<<<<<<<<<<<
 *             self._id = 0
 *         elif field_name == 'keys':
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 & (~1));

    /* "pyrosm_proto.pyx":8474
 *         if field_name == 'id':
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0             # <<<<<<<<<<<<<<
 *         elif field_name == 'keys':
 *             self._keys._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_id = 0;

    /* "pyrosm_proto.pyx":8472
 *     cpdef void ClearField(self, field_name):
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":8475
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0
 *         elif field_name == 'keys':             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *             self._keys = Uint32List.__new__(Uint32List)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_keys, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8475, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":8476
 *             self._id = 0
 *         elif field_name == 'keys':
 *             self._keys._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._keys = Uint32List.__new__(Uint32List)
 *             self._keys._listener = <PyObject *>self
 */
    __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8477
 *         elif field_name == 'keys':
 *             self._keys._listener = <PyObject *>null_listener
 *             self._keys = Uint32List.__new__(Uint32List)             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>self
 *         elif field_name == 'vals':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Uint32List)))) __PYX_ERR(0, 8477, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_keys);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_keys));
    __pyx_v_self->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8478
 *             self._keys._listener = <PyObject *>null_listener
 *             self._keys = Uint32List.__new__(Uint32List)
 *             self._keys._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'vals':
 *             self._vals._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_keys->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":8475
 *             self.__field_bitmap0 &= ~1
 *             self._id = 0
 *         elif field_name == 'keys':             # <<<<<<<<<<<<<<
 *             self._keys._listener = <PyObject *>null_listener
 *             self._keys = Uint32List.__new__(Uint32List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":8479
 *             self._keys = Uint32List.__new__(Uint32List)
 *             self._keys._listener = <PyObject *>self
 *         elif field_name == 'vals':             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *             self._vals = Uint32List.__new__(Uint32List)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_vals, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8479, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":8480
 *             self._keys._listener = <PyObject *>self
 *         elif field_name == 'vals':
 *             self._vals._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._vals = Uint32List.__new__(Uint32List)
 *             self._vals._listener = <PyObject *>self
 */
    __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8481
 *         elif field_name == 'vals':
 *             self._vals._listener = <PyObject *>null_listener
 *             self._vals = Uint32List.__new__(Uint32List)             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>self
 *         elif field_name == 'info':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Uint32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Uint32List)))) __PYX_ERR(0, 8481, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_vals);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_vals));
    __pyx_v_self->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8482
 *             self._vals._listener = <PyObject *>null_listener
 *             self._vals = Uint32List.__new__(Uint32List)
 *             self._vals._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'info':
 *             if self._info is not None:
 */
    __pyx_v_self->_vals->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":8479
 *             self._keys = Uint32List.__new__(Uint32List)
 *             self._keys._listener = <PyObject *>self
 *         elif field_name == 'vals':             # <<<<<<<<<<<<<<
 *             self._vals._listener = <PyObject *>null_listener
 *             self._vals = Uint32List.__new__(Uint32List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":8483
 *             self._vals = Uint32List.__new__(Uint32List)
 *             self._vals._listener = <PyObject *>self
 *         elif field_name == 'info':             # <<<<<<<<<<<<<<
 *             if self._info is not None:
 *                 self._info._listener = <PyObject *>null_listener
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_info, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8483, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":8484
 *             self._vals._listener = <PyObject *>self
 *         elif field_name == 'info':
 *             if self._info is not None:             # <<<<<<<<<<<<<<
 *                 self._info._listener = <PyObject *>null_listener
 *             self._info = None
 */
    __pyx_t_5 = (((PyObject *)__pyx_v_self->_info) != Py_None);
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "pyrosm_proto.pyx":8485
 *         elif field_name == 'info':
 *             if self._info is not None:
 *                 self._info._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._info = None
 *         elif field_name == 'roles_sid':
 */
      __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

      /* "pyrosm_proto.pyx":8484
 *             self._vals._listener = <PyObject *>self
 *         elif field_name == 'info':
 *             if self._info is not None:             # <<<<<<<<<<<<<<
 *                 self._info._listener = <PyObject *>null_listener
 *             self._info = None
 */
    }

    /* "pyrosm_proto.pyx":8486
 *             if self._info is not None:
 *                 self._info._listener = <PyObject *>null_listener
 *             self._info = None             # <<<<<<<<<<<<<<
 *         elif field_name == 'roles_sid':
 *             self._roles_sid._listener = <PyObject *>null_listener
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->_info);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
    __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)Py_None);

    /* "pyrosm_proto.pyx":8483
 *             self._vals = Uint32List.__new__(Uint32List)
 *             self._vals._listener = <PyObject *>self
 *         elif field_name == 'info':             # <<<<<<<<<<<<<<
 *             if self._info is not None:
 *                 self._info._listener = <PyObject *>null_listener
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":8487
 *                 self._info._listener = <PyObject *>null_listener
 *             self._info = None
 *         elif field_name == 'roles_sid':             # <<<<<<<<<<<<<<
 *             self._roles_sid._listener = <PyObject *>null_listener
 *             self._roles_sid = Int32List.__new__(Int32List)
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_roles_sid, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 8487, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":8488
 *             self._info = None
 *         elif field_name == 'roles_sid':
 *             self._roles_sid._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._roles_sid = Int32List.__new__(Int32List)
 *             self._roles_sid._listener = <PyObject *>self
 */
    __pyx_v_self->_roles_sid->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8489
 *         elif field_name == 'roles_sid':
 *             self._roles_sid._listener = <PyObject *>null_listener
 *             self._roles_sid = Int32List.__new__(Int32List)             # <<<<<<<<<<<<<<
 *             self._roles_sid._listener = <PyObject *>self
 *         elif field_name == 'memids':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int32List)))) __PYX_ERR(0, 8489, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_roles_sid);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_roles_sid));
    __pyx_v_self->_roles_sid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8490
 *             self._roles_sid._listener = <PyObject *>null_listener
 *             self._roles_sid = Int32List.__new__(Int32List)
 *             self._roles_sid._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'memids':
 *             self._memids._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_roles_sid->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":8487
 *                 self._info._listener = <PyObject *>null_listener
 *             self._info = None
 *         elif field_name == 'roles_sid':             # <<<<<<<<<<<<<<
 *             self._roles_sid._listener = <PyObject *>null_listener
 *             self._roles_sid = Int32List.__new__(Int32List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":8491
 *             self._roles_sid = Int32List.__new__(Int32List)
 *             self._roles_sid._listener = <PyObject *>self
 *         elif field_name == 'memids':             # <<<<<<<<<<<<<<
 *             self._memids._listener = <PyObject *>null_listener
 *             self._memids = Int64List.__new__(Int64List)
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_memids, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 8491, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":8492
 *             self._roles_sid._listener = <PyObject *>self
 *         elif field_name == 'memids':
 *             self._memids._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._memids = Int64List.__new__(Int64List)
 *             self._memids._listener = <PyObject *>self
 */
    __pyx_v_self->_memids->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8493
 *         elif field_name == 'memids':
 *             self._memids._listener = <PyObject *>null_listener
 *             self._memids = Int64List.__new__(Int64List)             # <<<<<<<<<<<<<<
 *             self._memids._listener = <PyObject *>self
 *         elif field_name == 'types':
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int64List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int64List)))) __PYX_ERR(0, 8493, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_memids);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_memids));
    __pyx_v_self->_memids = ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8494
 *             self._memids._listener = <PyObject *>null_listener
 *             self._memids = Int64List.__new__(Int64List)
 *             self._memids._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         elif field_name == 'types':
 *             self._types._listener = <PyObject *>null_listener
 */
    __pyx_v_self->_memids->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":8491
 *             self._roles_sid = Int32List.__new__(Int32List)
 *             self._roles_sid._listener = <PyObject *>self
 *         elif field_name == 'memids':             # <<<<<<<<<<<<<<
 *             self._memids._listener = <PyObject *>null_listener
 *             self._memids = Int64List.__new__(Int64List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":8495
 *             self._memids = Int64List.__new__(Int64List)
 *             self._memids._listener = <PyObject *>self
 *         elif field_name == 'types':             # <<<<<<<<<<<<<<
 *             self._types._listener = <PyObject *>null_listener
 *             self._types = Int32List.__new__(Int32List)
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_types, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 8495, __pyx_L1_error)
  if (likely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":8496
 *             self._memids._listener = <PyObject *>self
 *         elif field_name == 'types':
 *             self._types._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *             self._types = Int32List.__new__(Int32List)
 *             self._types._listener = <PyObject *>self
 */
    __pyx_v_self->_types->_listener = ((PyObject *)__pyx_v_12pyrobuf_list_null_listener);

    /* "pyrosm_proto.pyx":8497
 *         elif field_name == 'types':
 *             self._types._listener = <PyObject *>null_listener
 *             self._types = Int32List.__new__(Int32List)             # <<<<<<<<<<<<<<
 *             self._types._listener = <PyObject *>self
 *         else:
 */
    __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_12pyrobuf_list_Int32List), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_12pyrobuf_list_Int32List)))) __PYX_ERR(0, 8497, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_types);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_types));
    __pyx_v_self->_types = ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8498
 *             self._types._listener = <PyObject *>null_listener
 *             self._types = Int32List.__new__(Int32List)
 *             self._types._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 */
    __pyx_v_self->_types->_listener = ((PyObject *)__pyx_v_self);

    /* "pyrosm_proto.pyx":8495
 *             self._memids = Int64List.__new__(Int64List)
 *             self._memids._listener = <PyObject *>self
 *         elif field_name == 'types':             # <<<<<<<<<<<<<<
 *             self._types._listener = <PyObject *>null_listener
 *             self._types = Int32List.__new__(Int32List)
 */
    goto __pyx_L3;
  }

  /* "pyrosm_proto.pyx":8500
 *             self._types._listener = <PyObject *>self
 *         else:
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 8500, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "pyrosm_proto.pyx":8502
 *             raise ValueError('Protocol message has no "%s" field.' % field_name)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef void CopyFrom(self, Relation other_msg):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8470
 *         self._Modified()
 * 
 *     cpdef void ClearField(self, field_name):             # <<<<<<<<<<<<<<
 *         """Clears the contents of a given field."""
 *         if field_name == 'id':
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Relation.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_12ClearField[] = "Clears the contents of a given field.";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_13ClearField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ClearField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_12ClearField(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_12ClearField(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ClearField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_8Relation_ClearField(__pyx_v_self, __pyx_v_field_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8470, __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("pyrosm_proto.Relation.ClearField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8504
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, Relation other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_8Relation_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_8Relation_CopyFrom(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CopyFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8504, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_8Relation_15CopyFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":8511
 *             other_msg (Relation): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":8512
 *         """
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 *         self.reset()
 *         self.MergeFrom(other_msg)
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":8511
 *             other_msg (Relation): Message to copy into the current one.
 *         """
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 *         self.reset()
 */
  }

  /* "pyrosm_proto.pyx":8513
 *         if self is other_msg:
 *             return
 *         self.reset()             # <<<<<<<<<<<<<<
 *         self.MergeFrom(other_msg)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8514
 *             return
 *         self.reset()
 *         self.MergeFrom(other_msg)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint HasField(self, field_name) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->MergeFrom(__pyx_v_self, __pyx_v_other_msg, 0);

  /* "pyrosm_proto.pyx":8504
 *         self._Modified()
 * 
 *     cpdef void CopyFrom(self, Relation other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Copies the content of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Relation.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_14CopyFrom[] = "\n        Copies the content of the specified message into the current message.\n\n        Params:\n            other_msg (Relation): Message to copy into the current one.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_15CopyFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CopyFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_Relation, 1, "other_msg", 0))) __PYX_ERR(0, 8504, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_14CopyFrom(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_other_msg));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_14CopyFrom(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("CopyFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_8Relation_CopyFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8504, __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("pyrosm_proto.Relation.CopyFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8516
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_8Relation_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static int __pyx_f_12pyrosm_proto_8Relation_HasField(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_field_name, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("HasField", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_HasField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8516, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_8Relation_17HasField)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8516, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8516, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":8523
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'info':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_id, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8523, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":8524
 *         """
 *         if field_name == 'id':
 *             return self.__field_bitmap0 & 1 == 1             # <<<<<<<<<<<<<<
 *         if field_name == 'info':
 *             return self._info is not None and self._info._is_present_in_parent
 */
    __pyx_r = ((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1);
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":8523
 *             field_name (str): The name of the field to check.
 *         """
 *         if field_name == 'id':             # <<<<<<<<<<<<<<
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'info':
 */
  }

  /* "pyrosm_proto.pyx":8525
 *         if field_name == 'id':
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'info':             # <<<<<<<<<<<<<<
 *             return self._info is not None and self._info._is_present_in_parent
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_field_name, __pyx_n_s_info, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8525, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":8526
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'info':
 *             return self._info is not None and self._info._is_present_in_parent             # <<<<<<<<<<<<<<
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_info) != Py_None);
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_5 = __pyx_t_7;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->_info->_is_present_in_parent != 0);
    __pyx_t_5 = __pyx_t_7;
    __pyx_L5_bool_binop_done:;
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":8525
 *         if field_name == 'id':
 *             return self.__field_bitmap0 & 1 == 1
 *         if field_name == 'info':             # <<<<<<<<<<<<<<
 *             return self._info is not None and self._info._is_present_in_parent
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 */
  }

  /* "pyrosm_proto.pyx":8527
 *         if field_name == 'info':
 *             return self._info is not None and self._info._is_present_in_parent
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint IsInitialized(self):
 */
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Protocol_message_has_no_singular, __pyx_v_field_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 8527, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8516
 *         self.MergeFrom(other_msg)
 * 
 *     cpdef bint HasField(self, field_name) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Checks if a certain field is set for the message.
 */

  /* 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("pyrosm_proto.Relation.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_16HasField[] = "\n        Checks if a certain field is set for the message.\n\n        Params:\n            field_name (str): The name of the field to check.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_17HasField(PyObject *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasField (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_16HasField(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), ((PyObject *)__pyx_v_field_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_16HasField(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_field_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("HasField", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_8Relation_HasField(__pyx_v_self, __pyx_v_field_name, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 8516, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrosm_proto.Relation.HasField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8529
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

static PyObject *__pyx_pw_12pyrosm_proto_8Relation_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_12pyrosm_proto_8Relation_IsInitialized(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_IsInitialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8529, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_8Relation_19IsInitialized)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8529, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8529, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":8539
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             return False
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 */
  __pyx_t_5 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":8540
 * 
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False             # <<<<<<<<<<<<<<
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             return False
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":8539
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             return False
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 */
  }

  /* "pyrosm_proto.pyx":8541
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  __pyx_t_6 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_self->_info->_is_present_in_parent != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->IsInitialized(__pyx_v_self->_info, 0) != 0)) != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_5) {

    /* "pyrosm_proto.pyx":8542
 *             return False
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         return True
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":8541
 *         if self.__field_bitmap0 & 1 != 1:
 *             return False
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  }

  /* "pyrosm_proto.pyx":8544
 *             return False
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef void MergeFrom(self, Relation other_msg):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8529
 *         raise ValueError('Protocol message has no singular "%s" field.' % field_name)
 * 
 *     cpdef bint IsInitialized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Checks if the message is initialized.
 */

  /* 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_WriteUnraisable("pyrosm_proto.Relation.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_18IsInitialized[] = "\n        Checks if the message is initialized.\n\n        Returns:\n            bool: True if the message is initialized (i.e. all of its required\n                fields are set).\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_19IsInitialized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsInitialized (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_18IsInitialized(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_18IsInitialized(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("IsInitialized", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_12pyrosm_proto_8Relation_IsInitialized(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8529, __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("pyrosm_proto.Relation.IsInitialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8546
 *         return True
 * 
 *     cpdef void MergeFrom(self, Relation other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_8Relation_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static void __pyx_f_12pyrosm_proto_8Relation_MergeFrom(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_other_msg, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int64_t __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8546, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_8Relation_21MergeFrom)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other_msg)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other_msg));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8546, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":8555
 *         cdef int i
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self == __pyx_v_other_msg);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":8556
 * 
 *         if self is other_msg:
 *             return             # <<<<<<<<<<<<<<
 * 
 * 
 */
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":8555
 *         cdef int i
 * 
 *         if self is other_msg:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "pyrosm_proto.pyx":8559
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._id = other_msg._id
 *             self.__field_bitmap0 |= 1
 */
  __pyx_t_6 = (((__pyx_v_other_msg->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":8560
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._id = other_msg._id             # <<<<<<<<<<<<<<
 *             self.__field_bitmap0 |= 1
 *         self._keys.extend(other_msg._keys)
 */
    __pyx_t_7 = __pyx_v_other_msg->_id;
    __pyx_v_self->_id = __pyx_t_7;

    /* "pyrosm_proto.pyx":8561
 *         if other_msg.__field_bitmap0 & 1 == 1:
 *             self._id = other_msg._id
 *             self.__field_bitmap0 |= 1             # <<<<<<<<<<<<<<
 *         self._keys.extend(other_msg._keys)
 *         self._vals.extend(other_msg._vals)
 */
    __pyx_v_self->__pyx___field_bitmap0 = (__pyx_v_self->__pyx___field_bitmap0 | 1);

    /* "pyrosm_proto.pyx":8559
 * 
 * 
 *         if other_msg.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             self._id = other_msg._id
 *             self.__field_bitmap0 |= 1
 */
  }

  /* "pyrosm_proto.pyx":8562
 *             self._id = other_msg._id
 *             self.__field_bitmap0 |= 1
 *         self._keys.extend(other_msg._keys)             # <<<<<<<<<<<<<<
 *         self._vals.extend(other_msg._vals)
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_keys);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_keys->__pyx_vtab)->extend(__pyx_v_self->_keys, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8562, __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;

  /* "pyrosm_proto.pyx":8563
 *             self.__field_bitmap0 |= 1
 *         self._keys.extend(other_msg._keys)
 *         self._vals.extend(other_msg._vals)             # <<<<<<<<<<<<<<
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:
 *             if self._info is None:
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_other_msg->_vals);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->_vals->__pyx_vtab)->extend(__pyx_v_self->_vals, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8563, __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;

  /* "pyrosm_proto.pyx":8564
 *         self._keys.extend(other_msg._keys)
 *         self._vals.extend(other_msg._vals)
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             if self._info is None:
 *                 self._info = Info.__new__(Info)
 */
  __pyx_t_5 = (((PyObject *)__pyx_v_other_msg->_info) != Py_None);
  __pyx_t_8 = (__pyx_t_5 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_other_msg->_info->_is_present_in_parent != 0);
  __pyx_t_6 = __pyx_t_8;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":8565
 *         self._vals.extend(other_msg._vals)
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:
 *             if self._info is None:             # <<<<<<<<<<<<<<
 *                 self._info = Info.__new__(Info)
 *                 self._info.reset()
 */
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_info) == Py_None);
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (__pyx_t_8) {

      /* "pyrosm_proto.pyx":8566
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:
 *             if self._info is None:
 *                 self._info = Info.__new__(Info)             # <<<<<<<<<<<<<<
 *                 self._info.reset()
 *                 self._info._listener = <PyObject *>self
 */
      __pyx_t_1 = ((PyObject *)__pyx_tp_new_12pyrosm_proto_Info(((PyTypeObject *)__pyx_ptype_12pyrosm_proto_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8566, __pyx_L1_error)
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
      __Pyx_GOTREF(__pyx_v_self->_info);
      __Pyx_DECREF(((PyObject *)__pyx_v_self->_info));
      __pyx_v_self->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pyrosm_proto.pyx":8567
 *             if self._info is None:
 *                 self._info = Info.__new__(Info)
 *                 self._info.reset()             # <<<<<<<<<<<<<<
 *                 self._info._listener = <PyObject *>self
 *             self._info.MergeFrom(other_msg._info)
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->reset(__pyx_v_self->_info, 0);

      /* "pyrosm_proto.pyx":8568
 *                 self._info = Info.__new__(Info)
 *                 self._info.reset()
 *                 self._info._listener = <PyObject *>self             # <<<<<<<<<<<<<<
 *             self._info.MergeFrom(other_msg._info)
 *         self._roles_sid.extend(other_msg._roles_sid)
 */
      __pyx_v_self->_info->_listener = ((PyObject *)__pyx_v_self);

      /* "pyrosm_proto.pyx":8565
 *         self._vals.extend(other_msg._vals)
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:
 *             if self._info is None:             # <<<<<<<<<<<<<<
 *                 self._info = Info.__new__(Info)
 *                 self._info.reset()
 */
    }

    /* "pyrosm_proto.pyx":8569
 *                 self._info.reset()
 *                 self._info._listener = <PyObject *>self
 *             self._info.MergeFrom(other_msg._info)             # <<<<<<<<<<<<<<
 *         self._roles_sid.extend(other_msg._roles_sid)
 *         self._memids.extend(other_msg._memids)
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_info);
    __Pyx_INCREF(__pyx_t_1);
    ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->MergeFrom(__pyx_v_self->_info, ((struct __pyx_obj_12pyrosm_proto_Info *)__pyx_t_1), 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8564
 *         self._keys.extend(other_msg._keys)
 *         self._vals.extend(other_msg._vals)
 *         if other_msg._info is not None and other_msg._info._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             if self._info is None:
 *                 self._info = Info.__new__(Info)
 */
  }

  /* "pyrosm_proto.pyx":8570
 *                 self._info._listener = <PyObject *>self
 *             self._info.MergeFrom(other_msg._info)
 *         self._roles_sid.extend(other_msg._roles_sid)             # <<<<<<<<<<<<<<
 *         self._memids.extend(other_msg._memids)
 *         self._types.extend(other_msg._types)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_roles_sid);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_roles_sid->__pyx_vtab)->extend(__pyx_v_self->_roles_sid, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8570, __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;

  /* "pyrosm_proto.pyx":8571
 *             self._info.MergeFrom(other_msg._info)
 *         self._roles_sid.extend(other_msg._roles_sid)
 *         self._memids.extend(other_msg._memids)             # <<<<<<<<<<<<<<
 *         self._types.extend(other_msg._types)
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_other_msg->_memids);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->_memids->__pyx_vtab)->extend(__pyx_v_self->_memids, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8571, __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;

  /* "pyrosm_proto.pyx":8572
 *         self._roles_sid.extend(other_msg._roles_sid)
 *         self._memids.extend(other_msg._memids)
 *         self._types.extend(other_msg._types)             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_other_msg->_types);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->_types->__pyx_vtab)->extend(__pyx_v_self->_types, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8572, __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;

  /* "pyrosm_proto.pyx":8574
 *         self._types.extend(other_msg._types)
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8546
 *         return True
 * 
 *     cpdef void MergeFrom(self, Relation other_msg):             # <<<<<<<<<<<<<<
 *         """
 *         Merges the contents of the specified message into the current message.
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Relation.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_20MergeFrom[] = "\n        Merges the contents of the specified message into the current message.\n\n        Params:\n            other_msg: Message to merge into the current message.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_21MergeFrom(PyObject *__pyx_v_self, PyObject *__pyx_v_other_msg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFrom (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_msg), __pyx_ptype_12pyrosm_proto_Relation, 1, "other_msg", 0))) __PYX_ERR(0, 8546, __pyx_L1_error)
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_20MergeFrom(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), ((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_other_msg));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_20MergeFrom(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_other_msg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("MergeFrom", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_8Relation_MergeFrom(__pyx_v_self, __pyx_v_other_msg, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8546, __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("pyrosm_proto.Relation.MergeFrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8576
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

static PyObject *__pyx_pw_12pyrosm_proto_8Relation_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_8Relation_MergeFromString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_8Relation_MergeFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  unsigned char const *__pyx_t_10;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_8Relation_23MergeFromString)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8576, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8576, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8576, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8576, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8576, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":8590
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, False)
 */
  __pyx_t_7 = (__pyx_v_size != Py_None);
  if ((__pyx_t_7 != 0)) {
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8590, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_8;
  } else {
    __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8590, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_9;
  }
  __pyx_v_length = __pyx_t_5;

  /* "pyrosm_proto.pyx":8592
 *         length = size if size is not None else len(data)
 * 
 *         buf = self._protobuf_deserialize(data, length, False)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_10 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 8592, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_10, __pyx_v_length, 0);

  /* "pyrosm_proto.pyx":8594
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  __pyx_t_7 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "pyrosm_proto.pyx":8595
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_size);
    __Pyx_GIVEREF(__pyx_v_size);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_size);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Truncated_message_got_s_expected, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8595, __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, 8595, __pyx_L1_error)

    /* "pyrosm_proto.pyx":8594
 *         buf = self._protobuf_deserialize(data, length, False)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 */
  }

  /* "pyrosm_proto.pyx":8597
 *             raise DecodeError("Truncated message: got %s expected %s" % (buf, size))
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8599
 *         self._Modified()
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8576
 *         self._Modified()
 * 
 *     cpdef int MergeFromString(self, data, size=None) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Merges serialized protocol buffer data into this message.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrosm_proto.Relation.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_22MergeFromString[] = "\n        Merges serialized protocol buffer data into this message.\n\n        Params:\n            data (bytes): a string of binary data.\n            size (int): optional - the length of the data string\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_23MergeFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MergeFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "MergeFromString") < 0)) __PYX_ERR(0, 8576, __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_data = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MergeFromString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8576, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_22MergeFromString(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), __pyx_v_data, __pyx_v_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_22MergeFromString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_8Relation_MergeFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("MergeFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_Relation->MergeFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 8576, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Relation.MergeFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8601
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_8Relation_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_12pyrosm_proto_8Relation_ParseFromString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_8Relation_ParseFromString *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  int __pyx_v_reset = ((int)1);
  int __pyx_v_cache = ((int)0);
  int __pyx_v_buf;
  int __pyx_v_length;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  unsigned char const *__pyx_t_12;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_reset = __pyx_optional_args->reset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cache = __pyx_optional_args->cache;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_8Relation_25ParseFromString)) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8601, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8601, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8601, __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[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_size, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8601, __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(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8601, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_data);
          __Pyx_GIVEREF(__pyx_v_data);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_data);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_size);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 3+__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, 8601, __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, 8601, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":8617
 *         cdef int length
 * 
 *         length = size if size is not None else len(data)             # <<<<<<<<<<<<<<
 * 
 *         if reset:
 */
  __pyx_t_9 = (__pyx_v_size != Py_None);
  if ((__pyx_t_9 != 0)) {
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8617, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_10;
  } else {
    __pyx_t_11 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8617, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_11;
  }
  __pyx_v_length = __pyx_t_7;

  /* "pyrosm_proto.pyx":8619
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_9 = (__pyx_v_reset != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":8620
 * 
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":8619
 *         length = size if size is not None else len(data)
 * 
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":8622
 *             self.reset()
 * 
 *         buf = self._protobuf_deserialize(data, length, cache)             # <<<<<<<<<<<<<<
 * 
 *         if buf != length:
 */
  __pyx_t_12 = __Pyx_PyObject_AsUString(__pyx_v_data); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 8622, __pyx_L1_error)
  __pyx_v_buf = ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_protobuf_deserialize(__pyx_v_self, __pyx_t_12, __pyx_v_length, __pyx_v_cache);

  /* "pyrosm_proto.pyx":8624
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  __pyx_t_9 = ((__pyx_v_buf != __pyx_v_length) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "pyrosm_proto.pyx":8625
 * 
 *         if buf != length:
 *             raise DecodeError("Truncated message")             # <<<<<<<<<<<<<<
 * 
 *         self._Modified()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DecodeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s_Truncated_message) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Truncated_message);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8625, __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, 8625, __pyx_L1_error)

    /* "pyrosm_proto.pyx":8624
 *         buf = self._protobuf_deserialize(data, length, cache)
 * 
 *         if buf != length:             # <<<<<<<<<<<<<<
 *             raise DecodeError("Truncated message")
 * 
 */
  }

  /* "pyrosm_proto.pyx":8627
 *             raise DecodeError("Truncated message")
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8629
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  __pyx_t_9 = (__pyx_v_cache != 0);
  if (__pyx_t_9) {

    /* "pyrosm_proto.pyx":8630
 * 
 *         if cache:
 *             self._cached_serialization = data             # <<<<<<<<<<<<<<
 * 
 *         return buf
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) __PYX_ERR(0, 8630, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8629
 *         self._Modified()
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = data
 * 
 */
  }

  /* "pyrosm_proto.pyx":8632
 *             self._cached_serialization = data
 * 
 *         return buf             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __pyx_r = __pyx_v_buf;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8601
 *         return buf
 * 
 *     cpdef int ParseFromString(self, data, size=None, bint reset=True, bint cache=False) except -1:             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a string of protobuf encoded binary data.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrosm_proto.Relation.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_24ParseFromString[] = "\n        Populate the message class from a string of protobuf encoded binary data.\n\n        Params:\n            data (bytes): a string of binary data\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n            cache (bool): optional - whether to cache serialized data\n\n        Returns:\n            int: the number of bytes processed during serialization\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_25ParseFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_v_reset;
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,&__pyx_n_s_cache,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromString") < 0)) __PYX_ERR(0, 8601, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    if (values[2]) {
      __pyx_v_reset = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8601, __pyx_L3_error)
    } else {
      __pyx_v_reset = ((int)1);
    }
    if (values[3]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8601, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromString", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8601, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_24ParseFromString(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset, __pyx_v_cache);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_24ParseFromString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, int __pyx_v_reset, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_12pyrosm_proto_8Relation_ParseFromString __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("ParseFromString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_2.reset = __pyx_v_reset;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_Relation->ParseFromString(__pyx_v_self, __pyx_v_data, 1, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 8601, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Relation.ParseFromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8635
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_27FromString(PyObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FromString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_26FromString(((PyTypeObject*)__pyx_v_cls), ((PyObject *)__pyx_v_s));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_26FromString(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("FromString", 0);

  /* "pyrosm_proto.pyx":8636
 *     @classmethod
 *     def FromString(cls, s):
 *         message = cls()             # <<<<<<<<<<<<<<
 *         message.MergeFromString(s)
 *         return message
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8637
 *     def FromString(cls, s):
 *         message = cls()
 *         message.MergeFromString(s)             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_MergeFromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_s) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_s);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8637, __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;

  /* "pyrosm_proto.pyx":8638
 *         message = cls()
 *         message.MergeFromString(s)
 *         return message             # <<<<<<<<<<<<<<
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8635
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Relation.FromString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8640
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # id
 */

static void __pyx_f_12pyrosm_proto_8Relation__protobuf_serialize(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_cache) {
  Py_ssize_t __pyx_v_length;
  uint32_t __pyx_v_keys_elt;
  PyObject *__pyx_v_keys_buf = 0;
  uint32_t __pyx_v_vals_elt;
  PyObject *__pyx_v_vals_buf = 0;
  PyObject *__pyx_v_info_buf = 0;
  int32_t __pyx_v_roles_sid_elt;
  PyObject *__pyx_v_roles_sid_buf = 0;
  int64_t __pyx_v_memids_elt;
  PyObject *__pyx_v_memids_buf = 0;
  int32_t __pyx_v_types_elt;
  PyObject *__pyx_v_types_buf = 0;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  uint32_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int32_t __pyx_t_9;
  int64_t __pyx_t_10;
  __Pyx_RefNannySetupContext("_protobuf_serialize", 0);
  __Pyx_INCREF(__pyx_v_buf);

  /* "pyrosm_proto.pyx":8643
 *         cdef ssize_t length
 *         # id
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(8, buf)
 *             set_varint64(self._id, buf)
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":8644
 *         # id
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(8, buf)             # <<<<<<<<<<<<<<
 *             set_varint64(self._id, buf)
 *         # keys
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(8, __pyx_v_buf));

    /* "pyrosm_proto.pyx":8645
 *         if self.__field_bitmap0 & 1 == 1:
 *             set_varint64(8, buf)
 *             set_varint64(self._id, buf)             # <<<<<<<<<<<<<<
 *         # keys
 *         cdef uint32_t keys_elt
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_v_self->_id, __pyx_v_buf));

    /* "pyrosm_proto.pyx":8643
 *         cdef ssize_t length
 *         # id
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             set_varint64(8, buf)
 *             set_varint64(self._id, buf)
 */
  }

  /* "pyrosm_proto.pyx":8648
 *         # keys
 *         cdef uint32_t keys_elt
 *         cdef bytearray keys_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._keys)
 *         if length > 0:
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_keys_buf = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyrosm_proto.pyx":8649
 *         cdef uint32_t keys_elt
 *         cdef bytearray keys_buf = bytearray()
 *         length = len(self._keys)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(18, buf)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_keys);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_length = __pyx_t_3;

  /* "pyrosm_proto.pyx":8650
 *         cdef bytearray keys_buf = bytearray()
 *         length = len(self._keys)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(18, buf)
 *             for keys_elt in self._keys:
 */
  __pyx_t_1 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":8651
 *         length = len(self._keys)
 *         if length > 0:
 *             set_varint64(18, buf)             # <<<<<<<<<<<<<<
 *             for keys_elt in self._keys:
 *                 set_varint32(keys_elt, keys_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(18, __pyx_v_buf));

    /* "pyrosm_proto.pyx":8652
 *         if length > 0:
 *             set_varint64(18, buf)
 *             for keys_elt in self._keys:             # <<<<<<<<<<<<<<
 *                 set_varint32(keys_elt, keys_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_keys))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_keys))) {
      __pyx_t_2 = ((PyObject *)__pyx_v_self->_keys); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self->_keys)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8652, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8652, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8652, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8652, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8652, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 8652, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_6 = __Pyx_PyInt_As_uint32_t(__pyx_t_5); if (unlikely((__pyx_t_6 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 8652, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_keys_elt = __pyx_t_6;

      /* "pyrosm_proto.pyx":8653
 *             set_varint64(18, buf)
 *             for keys_elt in self._keys:
 *                 set_varint32(keys_elt, keys_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(keys_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_keys_elt, __pyx_v_keys_buf));

      /* "pyrosm_proto.pyx":8652
 *         if length > 0:
 *             set_varint64(18, buf)
 *             for keys_elt in self._keys:             # <<<<<<<<<<<<<<
 *                 set_varint32(keys_elt, keys_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8655
 *                 set_varint32(keys_elt, keys_buf)
 * 
 *             set_varint64(len(keys_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += keys_buf
 *         # vals
 */
    __pyx_t_3 = PyByteArray_GET_SIZE(__pyx_v_keys_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8655, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

    /* "pyrosm_proto.pyx":8656
 * 
 *             set_varint64(len(keys_buf), buf)
 *             buf += keys_buf             # <<<<<<<<<<<<<<
 *         # vals
 *         cdef uint32_t vals_elt
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_keys_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8650
 *         cdef bytearray keys_buf = bytearray()
 *         length = len(self._keys)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(18, buf)
 *             for keys_elt in self._keys:
 */
  }

  /* "pyrosm_proto.pyx":8659
 *         # vals
 *         cdef uint32_t vals_elt
 *         cdef bytearray vals_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._vals)
 *         if length > 0:
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_vals_buf = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyrosm_proto.pyx":8660
 *         cdef uint32_t vals_elt
 *         cdef bytearray vals_buf = bytearray()
 *         length = len(self._vals)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(26, buf)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_vals);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8660, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_length = __pyx_t_3;

  /* "pyrosm_proto.pyx":8661
 *         cdef bytearray vals_buf = bytearray()
 *         length = len(self._vals)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(26, buf)
 *             for vals_elt in self._vals:
 */
  __pyx_t_1 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":8662
 *         length = len(self._vals)
 *         if length > 0:
 *             set_varint64(26, buf)             # <<<<<<<<<<<<<<
 *             for vals_elt in self._vals:
 *                 set_varint32(vals_elt, vals_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(26, __pyx_v_buf));

    /* "pyrosm_proto.pyx":8663
 *         if length > 0:
 *             set_varint64(26, buf)
 *             for vals_elt in self._vals:             # <<<<<<<<<<<<<<
 *                 set_varint32(vals_elt, vals_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_vals))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_vals))) {
      __pyx_t_2 = ((PyObject *)__pyx_v_self->_vals); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self->_vals)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8663, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8663, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8663, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8663, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8663, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8663, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 8663, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_6 = __Pyx_PyInt_As_uint32_t(__pyx_t_5); if (unlikely((__pyx_t_6 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 8663, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_vals_elt = __pyx_t_6;

      /* "pyrosm_proto.pyx":8664
 *             set_varint64(26, buf)
 *             for vals_elt in self._vals:
 *                 set_varint32(vals_elt, vals_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(vals_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_vals_elt, __pyx_v_vals_buf));

      /* "pyrosm_proto.pyx":8663
 *         if length > 0:
 *             set_varint64(26, buf)
 *             for vals_elt in self._vals:             # <<<<<<<<<<<<<<
 *                 set_varint32(vals_elt, vals_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8666
 *                 set_varint32(vals_elt, vals_buf)
 * 
 *             set_varint64(len(vals_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += vals_buf
 *         # info
 */
    __pyx_t_3 = PyByteArray_GET_SIZE(__pyx_v_vals_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8666, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

    /* "pyrosm_proto.pyx":8667
 * 
 *             set_varint64(len(vals_buf), buf)
 *             buf += vals_buf             # <<<<<<<<<<<<<<
 *         # info
 *         cdef bytearray info_buf
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_vals_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8661
 *         cdef bytearray vals_buf = bytearray()
 *         length = len(self._vals)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(26, buf)
 *             for vals_elt in self._vals:
 */
  }

  /* "pyrosm_proto.pyx":8670
 *         # info
 *         cdef bytearray info_buf
 *         if self._info is not None and self._info._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             set_varint64(34, buf)
 *             if self._info._cached_serialization is not None:
 */
  __pyx_t_7 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_1 = __pyx_t_8;
    goto __pyx_L11_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_self->_info->_is_present_in_parent != 0);
  __pyx_t_1 = __pyx_t_8;
  __pyx_L11_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":8671
 *         cdef bytearray info_buf
 *         if self._info is not None and self._info._is_present_in_parent:
 *             set_varint64(34, buf)             # <<<<<<<<<<<<<<
 *             if self._info._cached_serialization is not None:
 *                 set_varint64(len(self._info._cached_serialization), buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(34, __pyx_v_buf));

    /* "pyrosm_proto.pyx":8672
 *         if self._info is not None and self._info._is_present_in_parent:
 *             set_varint64(34, buf)
 *             if self._info._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(self._info._cached_serialization), buf)
 *                 buf += self._info._cached_serialization
 */
    __pyx_t_1 = (__pyx_v_self->_info->_cached_serialization != ((PyObject*)Py_None));
    __pyx_t_8 = (__pyx_t_1 != 0);
    if (__pyx_t_8) {

      /* "pyrosm_proto.pyx":8673
 *             set_varint64(34, buf)
 *             if self._info._cached_serialization is not None:
 *                 set_varint64(len(self._info._cached_serialization), buf)             # <<<<<<<<<<<<<<
 *                 buf += self._info._cached_serialization
 *             else:
 */
      __pyx_t_2 = __pyx_v_self->_info->_cached_serialization;
      __Pyx_INCREF(__pyx_t_2);
      if (unlikely(__pyx_t_2 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(0, 8673, __pyx_L1_error)
      }
      __pyx_t_3 = PyBytes_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8673, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

      /* "pyrosm_proto.pyx":8674
 *             if self._info._cached_serialization is not None:
 *                 set_varint64(len(self._info._cached_serialization), buf)
 *                 buf += self._info._cached_serialization             # <<<<<<<<<<<<<<
 *             else:
 *                 info_buf = bytearray()
 */
      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_self->_info->_cached_serialization); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8674, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":8672
 *         if self._info is not None and self._info._is_present_in_parent:
 *             set_varint64(34, buf)
 *             if self._info._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *                 set_varint64(len(self._info._cached_serialization), buf)
 *                 buf += self._info._cached_serialization
 */
      goto __pyx_L13;
    }

    /* "pyrosm_proto.pyx":8676
 *                 buf += self._info._cached_serialization
 *             else:
 *                 info_buf = bytearray()             # <<<<<<<<<<<<<<
 *                 self._info._protobuf_serialize(info_buf, cache)
 *                 set_varint64(len(info_buf), buf)
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8676, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_info_buf = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":8677
 *             else:
 *                 info_buf = bytearray()
 *                 self._info._protobuf_serialize(info_buf, cache)             # <<<<<<<<<<<<<<
 *                 set_varint64(len(info_buf), buf)
 *                 buf += info_buf
 */
      ((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->_protobuf_serialize(__pyx_v_self->_info, __pyx_v_info_buf, __pyx_v_cache);

      /* "pyrosm_proto.pyx":8678
 *                 info_buf = bytearray()
 *                 self._info._protobuf_serialize(info_buf, cache)
 *                 set_varint64(len(info_buf), buf)             # <<<<<<<<<<<<<<
 *                 buf += info_buf
 *                 if cache:
 */
      __pyx_t_3 = PyByteArray_GET_SIZE(__pyx_v_info_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8678, __pyx_L1_error)
      (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

      /* "pyrosm_proto.pyx":8679
 *                 self._info._protobuf_serialize(info_buf, cache)
 *                 set_varint64(len(info_buf), buf)
 *                 buf += info_buf             # <<<<<<<<<<<<<<
 *                 if cache:
 *                     self._info._cached_serialization = bytes(info_buf)
 */
      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_info_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8679, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":8680
 *                 set_varint64(len(info_buf), buf)
 *                 buf += info_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._info._cached_serialization = bytes(info_buf)
 *         # roles_sid
 */
      __pyx_t_8 = (__pyx_v_cache != 0);
      if (__pyx_t_8) {

        /* "pyrosm_proto.pyx":8681
 *                 buf += info_buf
 *                 if cache:
 *                     self._info._cached_serialization = bytes(info_buf)             # <<<<<<<<<<<<<<
 *         # roles_sid
 *         cdef int32_t roles_sid_elt
 */
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_info_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8681, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_v_self->_info->_cached_serialization);
        __Pyx_DECREF(__pyx_v_self->_info->_cached_serialization);
        __pyx_v_self->_info->_cached_serialization = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "pyrosm_proto.pyx":8680
 *                 set_varint64(len(info_buf), buf)
 *                 buf += info_buf
 *                 if cache:             # <<<<<<<<<<<<<<
 *                     self._info._cached_serialization = bytes(info_buf)
 *         # roles_sid
 */
      }
    }
    __pyx_L13:;

    /* "pyrosm_proto.pyx":8670
 *         # info
 *         cdef bytearray info_buf
 *         if self._info is not None and self._info._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             set_varint64(34, buf)
 *             if self._info._cached_serialization is not None:
 */
  }

  /* "pyrosm_proto.pyx":8684
 *         # roles_sid
 *         cdef int32_t roles_sid_elt
 *         cdef bytearray roles_sid_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._roles_sid)
 *         if length > 0:
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_roles_sid_buf = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyrosm_proto.pyx":8685
 *         cdef int32_t roles_sid_elt
 *         cdef bytearray roles_sid_buf = bytearray()
 *         length = len(self._roles_sid)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(66, buf)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_roles_sid);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_length = __pyx_t_3;

  /* "pyrosm_proto.pyx":8686
 *         cdef bytearray roles_sid_buf = bytearray()
 *         length = len(self._roles_sid)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(66, buf)
 *             for roles_sid_elt in self._roles_sid:
 */
  __pyx_t_8 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":8687
 *         length = len(self._roles_sid)
 *         if length > 0:
 *             set_varint64(66, buf)             # <<<<<<<<<<<<<<
 *             for roles_sid_elt in self._roles_sid:
 *                 set_varint32(roles_sid_elt, roles_sid_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(66, __pyx_v_buf));

    /* "pyrosm_proto.pyx":8688
 *         if length > 0:
 *             set_varint64(66, buf)
 *             for roles_sid_elt in self._roles_sid:             # <<<<<<<<<<<<<<
 *                 set_varint32(roles_sid_elt, roles_sid_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_roles_sid))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_roles_sid))) {
      __pyx_t_2 = ((PyObject *)__pyx_v_self->_roles_sid); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self->_roles_sid)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8688, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8688, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8688, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8688, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8688, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 8688, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_9 = __Pyx_PyInt_As_int32_t(__pyx_t_5); if (unlikely((__pyx_t_9 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 8688, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_roles_sid_elt = __pyx_t_9;

      /* "pyrosm_proto.pyx":8689
 *             set_varint64(66, buf)
 *             for roles_sid_elt in self._roles_sid:
 *                 set_varint32(roles_sid_elt, roles_sid_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(roles_sid_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_roles_sid_elt, __pyx_v_roles_sid_buf));

      /* "pyrosm_proto.pyx":8688
 *         if length > 0:
 *             set_varint64(66, buf)
 *             for roles_sid_elt in self._roles_sid:             # <<<<<<<<<<<<<<
 *                 set_varint32(roles_sid_elt, roles_sid_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8691
 *                 set_varint32(roles_sid_elt, roles_sid_buf)
 * 
 *             set_varint64(len(roles_sid_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += roles_sid_buf
 *         # memids
 */
    __pyx_t_3 = PyByteArray_GET_SIZE(__pyx_v_roles_sid_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8691, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

    /* "pyrosm_proto.pyx":8692
 * 
 *             set_varint64(len(roles_sid_buf), buf)
 *             buf += roles_sid_buf             # <<<<<<<<<<<<<<
 *         # memids
 *         cdef int64_t memids_elt
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_roles_sid_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8686
 *         cdef bytearray roles_sid_buf = bytearray()
 *         length = len(self._roles_sid)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(66, buf)
 *             for roles_sid_elt in self._roles_sid:
 */
  }

  /* "pyrosm_proto.pyx":8695
 *         # memids
 *         cdef int64_t memids_elt
 *         cdef bytearray memids_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._memids)
 *         if length > 0:
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_memids_buf = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyrosm_proto.pyx":8696
 *         cdef int64_t memids_elt
 *         cdef bytearray memids_buf = bytearray()
 *         length = len(self._memids)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(74, buf)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_memids);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8696, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_length = __pyx_t_3;

  /* "pyrosm_proto.pyx":8697
 *         cdef bytearray memids_buf = bytearray()
 *         length = len(self._memids)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(74, buf)
 *             for memids_elt in self._memids:
 */
  __pyx_t_8 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":8698
 *         length = len(self._memids)
 *         if length > 0:
 *             set_varint64(74, buf)             # <<<<<<<<<<<<<<
 *             for memids_elt in self._memids:
 *                 set_signed_varint64(memids_elt, memids_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(74, __pyx_v_buf));

    /* "pyrosm_proto.pyx":8699
 *         if length > 0:
 *             set_varint64(74, buf)
 *             for memids_elt in self._memids:             # <<<<<<<<<<<<<<
 *                 set_signed_varint64(memids_elt, memids_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_memids))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_memids))) {
      __pyx_t_2 = ((PyObject *)__pyx_v_self->_memids); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self->_memids)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8699, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8699, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8699, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8699, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8699, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8699, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 8699, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_t_5); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 8699, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_memids_elt = __pyx_t_10;

      /* "pyrosm_proto.pyx":8700
 *             set_varint64(74, buf)
 *             for memids_elt in self._memids:
 *                 set_signed_varint64(memids_elt, memids_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(memids_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_signed_varint64(__pyx_v_memids_elt, __pyx_v_memids_buf));

      /* "pyrosm_proto.pyx":8699
 *         if length > 0:
 *             set_varint64(74, buf)
 *             for memids_elt in self._memids:             # <<<<<<<<<<<<<<
 *                 set_signed_varint64(memids_elt, memids_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8702
 *                 set_signed_varint64(memids_elt, memids_buf)
 * 
 *             set_varint64(len(memids_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += memids_buf
 *         # types
 */
    __pyx_t_3 = PyByteArray_GET_SIZE(__pyx_v_memids_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8702, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

    /* "pyrosm_proto.pyx":8703
 * 
 *             set_varint64(len(memids_buf), buf)
 *             buf += memids_buf             # <<<<<<<<<<<<<<
 *         # types
 *         cdef int32_t types_elt
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_memids_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8697
 *         cdef bytearray memids_buf = bytearray()
 *         length = len(self._memids)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(74, buf)
 *             for memids_elt in self._memids:
 */
  }

  /* "pyrosm_proto.pyx":8706
 *         # types
 *         cdef int32_t types_elt
 *         cdef bytearray types_buf = bytearray()             # <<<<<<<<<<<<<<
 *         length = len(self._types)
 *         if length > 0:
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_types_buf = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyrosm_proto.pyx":8707
 *         cdef int32_t types_elt
 *         cdef bytearray types_buf = bytearray()
 *         length = len(self._types)             # <<<<<<<<<<<<<<
 *         if length > 0:
 *             set_varint64(82, buf)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_types);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8707, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_length = __pyx_t_3;

  /* "pyrosm_proto.pyx":8708
 *         cdef bytearray types_buf = bytearray()
 *         length = len(self._types)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(82, buf)
 *             for types_elt in self._types:
 */
  __pyx_t_8 = ((__pyx_v_length > 0) != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":8709
 *         length = len(self._types)
 *         if length > 0:
 *             set_varint64(82, buf)             # <<<<<<<<<<<<<<
 *             for types_elt in self._types:
 *                 set_varint32(types_elt, types_buf)
 */
    (void)(__pyx_f_12pyrobuf_util_set_varint64(82, __pyx_v_buf));

    /* "pyrosm_proto.pyx":8710
 *         if length > 0:
 *             set_varint64(82, buf)
 *             for types_elt in self._types:             # <<<<<<<<<<<<<<
 *                 set_varint32(types_elt, types_buf)
 * 
 */
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->_types))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->_types))) {
      __pyx_t_2 = ((PyObject *)__pyx_v_self->_types); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self->_types)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8710, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8710, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8710, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8710, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8710, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 8710, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_9 = __Pyx_PyInt_As_int32_t(__pyx_t_5); if (unlikely((__pyx_t_9 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 8710, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_types_elt = __pyx_t_9;

      /* "pyrosm_proto.pyx":8711
 *             set_varint64(82, buf)
 *             for types_elt in self._types:
 *                 set_varint32(types_elt, types_buf)             # <<<<<<<<<<<<<<
 * 
 *             set_varint64(len(types_buf), buf)
 */
      (void)(__pyx_f_12pyrobuf_util_set_varint32(__pyx_v_types_elt, __pyx_v_types_buf));

      /* "pyrosm_proto.pyx":8710
 *         if length > 0:
 *             set_varint64(82, buf)
 *             for types_elt in self._types:             # <<<<<<<<<<<<<<
 *                 set_varint32(types_elt, types_buf)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8713
 *                 set_varint32(types_elt, types_buf)
 * 
 *             set_varint64(len(types_buf), buf)             # <<<<<<<<<<<<<<
 *             buf += types_buf
 * 
 */
    __pyx_t_3 = PyByteArray_GET_SIZE(__pyx_v_types_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8713, __pyx_L1_error)
    (void)(__pyx_f_12pyrobuf_util_set_varint64(__pyx_t_3, __pyx_v_buf));

    /* "pyrosm_proto.pyx":8714
 * 
 *             set_varint64(len(types_buf), buf)
 *             buf += types_buf             # <<<<<<<<<<<<<<
 * 
 *     cpdef void _Modified(self):
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_buf, __pyx_v_types_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8708
 *         cdef bytearray types_buf = bytearray()
 *         length = len(self._types)
 *         if length > 0:             # <<<<<<<<<<<<<<
 *             set_varint64(82, buf)
 *             for types_elt in self._types:
 */
  }

  /* "pyrosm_proto.pyx":8640
 *         return message
 * 
 *     cdef void _protobuf_serialize(self, bytearray buf, bint cache):             # <<<<<<<<<<<<<<
 *         cdef ssize_t length
 *         # id
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("pyrosm_proto.Relation._protobuf_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_keys_buf);
  __Pyx_XDECREF(__pyx_v_vals_buf);
  __Pyx_XDECREF(__pyx_v_info_buf);
  __Pyx_XDECREF(__pyx_v_roles_sid_buf);
  __Pyx_XDECREF(__pyx_v_memids_buf);
  __Pyx_XDECREF(__pyx_v_types_buf);
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_RefNannyFinishContext();
}

/* "pyrosm_proto.pyx":8716
 *             buf += types_buf
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

static PyObject *__pyx_pw_12pyrosm_proto_8Relation_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrosm_proto_8Relation__Modified(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Modified); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8716, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_8Relation_29_Modified)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8716, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":8717
 * 
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True             # <<<<<<<<<<<<<<
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None
 */
  __pyx_v_self->_is_present_in_parent = 1;

  /* "pyrosm_proto.pyx":8718
 *     cpdef void _Modified(self):
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()             # <<<<<<<<<<<<<<
 *         self._cached_serialization = None
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_listener), __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8718, __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;

  /* "pyrosm_proto.pyx":8719
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 *         self._cached_serialization = None             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
  __Pyx_DECREF(__pyx_v_self->_cached_serialization);
  __pyx_v_self->_cached_serialization = ((PyObject*)Py_None);

  /* "pyrosm_proto.pyx":8716
 *             buf += types_buf
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         self._is_present_in_parent = True
 *         (<object> self._listener)._Modified()
 */

  /* function exit code */
  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_WriteUnraisable("pyrosm_proto.Relation._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_29_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_Modified (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_28_Modified(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_28_Modified(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_Modified", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrosm_proto_8Relation__Modified(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8716, __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("pyrosm_proto.Relation._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8721
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_8Relation_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_8Relation_SerializeToString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_8Relation_SerializeToString *__pyx_optional_args) {
  int __pyx_v_cache = ((int)0);
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_out = 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;
  int __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cache = __pyx_optional_args->cache;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8721, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_8Relation_31SerializeToString)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_cache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8721, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8721, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 8721, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":8730
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 */
  __pyx_t_6 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":8731
 * 
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             raise Exception("Message Relation is missing required field: info")
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8731, __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, 8731, __pyx_L1_error)

    /* "pyrosm_proto.pyx":8730
 * 
 * 
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 */
  }

  /* "pyrosm_proto.pyx":8732
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():             # <<<<<<<<<<<<<<
 *             raise Exception("Message Relation is missing required field: info")
 * 
 */
  __pyx_t_7 = (((PyObject *)__pyx_v_self->_info) != Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_self->_info->_is_present_in_parent != 0);
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_8 = ((!(((struct __pyx_vtabstruct_12pyrosm_proto_Info *)__pyx_v_self->_info->__pyx_vtab)->IsInitialized(__pyx_v_self->_info, 0) != 0)) != 0);
  __pyx_t_6 = __pyx_t_8;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_6)) {

    /* "pyrosm_proto.pyx":8733
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             raise Exception("Message Relation is missing required field: info")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__169, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8733, __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, 8733, __pyx_L1_error)

    /* "pyrosm_proto.pyx":8732
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():             # <<<<<<<<<<<<<<
 *             raise Exception("Message Relation is missing required field: info")
 * 
 */
  }

  /* "pyrosm_proto.pyx":8735
 *             raise Exception("Message Relation is missing required field: info")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_6 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_8 = (__pyx_t_6 != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":8736
 * 
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":8735
 *             raise Exception("Message Relation is missing required field: info")
 * 
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":8738
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8739
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)             # <<<<<<<<<<<<<<
 *         cdef bytes out = bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, __pyx_v_cache);

  /* "pyrosm_proto.pyx":8740
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, cache)
 *         cdef bytes out = bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *         if cache:
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8742
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  __pyx_t_8 = (__pyx_v_cache != 0);
  if (__pyx_t_8) {

    /* "pyrosm_proto.pyx":8743
 * 
 *         if cache:
 *             self._cached_serialization = out             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_GOTREF(__pyx_v_self->_cached_serialization);
    __Pyx_DECREF(__pyx_v_self->_cached_serialization);
    __pyx_v_self->_cached_serialization = __pyx_v_out;

    /* "pyrosm_proto.pyx":8742
 *         cdef bytes out = bytes(buf)
 * 
 *         if cache:             # <<<<<<<<<<<<<<
 *             self._cached_serialization = out
 * 
 */
  }

  /* "pyrosm_proto.pyx":8745
 *             self._cached_serialization = out
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     cpdef bytes SerializePartialToString(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8721
 *         self._cached_serialization = None
 * 
 *     cpdef bytes SerializeToString(self, bint cache=False):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.Relation.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_30SerializeToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_31SerializeToString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_cache;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cache,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 (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SerializeToString") < 0)) __PYX_ERR(0, 8721, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_cache = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_cache == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8721, __pyx_L3_error)
    } else {
      __pyx_v_cache = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("SerializeToString", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8721, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_30SerializeToString(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), __pyx_v_cache);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_30SerializeToString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, int __pyx_v_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_12pyrosm_proto_8Relation_SerializeToString __pyx_t_2;
  __Pyx_RefNannySetupContext("SerializeToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cache = __pyx_v_cache;
  __pyx_t_1 = __pyx_vtabptr_12pyrosm_proto_Relation->SerializeToString(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8721, __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("pyrosm_proto.Relation.SerializeToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8747
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

static PyObject *__pyx_pw_12pyrosm_proto_8Relation_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrosm_proto_8Relation_SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_buf = 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;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8747, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_12pyrosm_proto_8Relation_33SerializePartialToString)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8747, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 8747, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "pyrosm_proto.pyx":8754
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  __pyx_t_5 = (__pyx_v_self->_cached_serialization != ((PyObject*)Py_None));
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "pyrosm_proto.pyx":8755
 *         """
 *         if self._cached_serialization is not None:
 *             return self._cached_serialization             # <<<<<<<<<<<<<<
 * 
 *         cdef bytearray buf = bytearray()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cached_serialization);
    __pyx_r = __pyx_v_self->_cached_serialization;
    goto __pyx_L0;

    /* "pyrosm_proto.pyx":8754
 *             bytes: a byte string of binary data
 *         """
 *         if self._cached_serialization is not None:             # <<<<<<<<<<<<<<
 *             return self._cached_serialization
 * 
 */
  }

  /* "pyrosm_proto.pyx":8757
 *             return self._cached_serialization
 * 
 *         cdef bytearray buf = bytearray()             # <<<<<<<<<<<<<<
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_buf = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8758
 * 
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)             # <<<<<<<<<<<<<<
 *         return bytes(buf)
 * 
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_protobuf_serialize(__pyx_v_self, __pyx_v_buf, 0);

  /* "pyrosm_proto.pyx":8759
 *         cdef bytearray buf = bytearray()
 *         self._protobuf_serialize(buf, False)
 *         return bytes(buf)             # <<<<<<<<<<<<<<
 * 
 *     def SetInParent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8747
 *         return out
 * 
 *     cpdef bytes SerializePartialToString(self):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a string of protobuf encoded binary data.
 */

  /* 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("pyrosm_proto.Relation.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_32SerializePartialToString[] = "\n        Serialize the message class into a string of protobuf encoded binary data.\n\n        Returns:\n            bytes: a byte string of binary data\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_33SerializePartialToString(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToString (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_32SerializePartialToString(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_32SerializePartialToString(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToString", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrosm_proto_8Relation_SerializePartialToString(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8747, __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("pyrosm_proto.Relation.SerializePartialToString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8761
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_34SetInParent[] = "\n        Mark this an present in the parent.\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_35SetInParent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_34SetInParent(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_34SetInParent(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SetInParent", 0);

  /* "pyrosm_proto.pyx":8765
 *         Mark this an present in the parent.
 *         """
 *         self._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8761
 *         return bytes(buf)
 * 
 *     def SetInParent(self):             # <<<<<<<<<<<<<<
 *         """
 *         Mark this an present in the parent.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8767
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_36ParseFromJson[] = "\n        Populate the message class from a json string.\n\n        Params:\n            data (str): a json string\n            size (int): optional - the length of the data string\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_37ParseFromJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromJson (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_size,&__pyx_n_s_reset,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_data)) != 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_size);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromJson") < 0)) __PYX_ERR(0, 8767, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_size = values[1];
    __pyx_v_reset = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromJson", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8767, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_36ParseFromJson(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), __pyx_v_data, __pyx_v_size, __pyx_v_reset);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_36ParseFromJson(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_size, PyObject *__pyx_v_reset) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("ParseFromJson", 0);
  __Pyx_INCREF(__pyx_v_size);

  /* "pyrosm_proto.pyx":8776
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8777
 *         """
 *         if size is None:
 *             size = len(data)             # <<<<<<<<<<<<<<
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8777, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":8776
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             size = len(data)
 *         d = json.loads(data[:size])
 */
  }

  /* "pyrosm_proto.pyx":8778
 *         if size is None:
 *             size = len(data)
 *         d = json.loads(data[:size])             # <<<<<<<<<<<<<<
 *         self.ParseFromDict(d, reset)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_json); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, NULL, &__pyx_v_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_d = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":8779
 *             size = len(data)
 *         d = json.loads(data[:size])
 *         self.ParseFromDict(d, reset)             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToJson(self, **kwargs):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8779, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_d, __pyx_v_reset};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8779, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8779, __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_d);
    __Pyx_GIVEREF(__pyx_v_d);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_d);
    __Pyx_INCREF(__pyx_v_reset);
    __Pyx_GIVEREF(__pyx_v_reset);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_reset);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyrosm_proto.pyx":8767
 *         self._Modified()
 * 
 *     def ParseFromJson(self, data, size=None, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a json string.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrosm_proto.Relation.ParseFromJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8781
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_38SerializeToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_39SerializeToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializeToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializeToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_38SerializeToJson(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_38SerializeToJson(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializeToJson", 0);

  /* "pyrosm_proto.pyx":8788
 *             str: a json formatted string
 *         """
 *         d = self.SerializeToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8789
 *         """
 *         d = self.SerializeToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToJson(self, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8781
 *         self.ParseFromDict(d, reset)
 * 
 *     def SerializeToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Relation.SerializeToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8791
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_40SerializePartialToJson[] = "\n        Serialize the message class into a json string.\n\n        Returns:\n            str: a json formatted string\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_41SerializePartialToJson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToJson (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("SerializePartialToJson", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "SerializePartialToJson", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_40SerializePartialToJson(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_40SerializePartialToJson(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToJson", 0);

  /* "pyrosm_proto.pyx":8798
 *             str: a json formatted string
 *         """
 *         d = self.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         return json.dumps(d, **kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8799
 *         """
 *         d = self.SerializePartialToDict()
 *         return json.dumps(d, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def ParseFromDict(self, d, reset=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_d);
  __Pyx_GIVEREF(__pyx_v_d);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8791
 *         return json.dumps(d, **kwargs)
 * 
 *     def SerializePartialToJson(self, **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *         Serialize the message class into a json string.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrosm_proto.Relation.SerializePartialToJson", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8801
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_42ParseFromDict[] = "\n        Populate the message class from a Python dictionary.\n\n        Params:\n            d (dict): a Python dictionary representing the message\n            reset (bool): optional - whether to reset to default values before serializing\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_43ParseFromDict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_reset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ParseFromDict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d,&__pyx_n_s_reset,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 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_reset);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ParseFromDict") < 0)) __PYX_ERR(0, 8801, __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_d = values[0];
    __pyx_v_reset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ParseFromDict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8801, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_42ParseFromDict(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), __pyx_v_d, __pyx_v_reset);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_42ParseFromDict(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_d, PyObject *__pyx_v_reset) {
  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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("ParseFromDict", 0);

  /* "pyrosm_proto.pyx":8809
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reset); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 8809, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "pyrosm_proto.pyx":8810
 *         """
 *         if reset:
 *             self.reset()             # <<<<<<<<<<<<<<
 * 
 *         assert type(d) == dict
 */
    ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->reset(__pyx_v_self, 0);

    /* "pyrosm_proto.pyx":8809
 *             reset (bool): optional - whether to reset to default values before serializing
 *         """
 *         if reset:             # <<<<<<<<<<<<<<
 *             self.reset()
 * 
 */
  }

  /* "pyrosm_proto.pyx":8812
 *             self.reset()
 * 
 *         assert type(d) == dict             # <<<<<<<<<<<<<<
 *         try:
 *             self.id = d["id"]
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_d)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8812, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 8812, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 8812, __pyx_L1_error)
    }
  }
  #endif

  /* "pyrosm_proto.pyx":8813
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.id = d["id"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":8814
 *         assert type(d) == dict
 *         try:
 *             self.id = d["id"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8814, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id, __pyx_t_2) < 0) __PYX_ERR(0, 8814, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":8813
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.id = d["id"]
 *         except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8815
 *         try:
 *             self.id = d["id"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "pyrosm_proto.pyx":8813
 * 
 *         assert type(d) == dict
 *         try:             # <<<<<<<<<<<<<<
 *             self.id = d["id"]
 *         except KeyError:
 */
    __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_L5_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_L9_try_end:;
  }

  /* "pyrosm_proto.pyx":8817
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.keys = d["keys"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":8818
 *             pass
 *         try:
 *             self.keys = d["keys"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8818, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys, __pyx_t_2) < 0) __PYX_ERR(0, 8818, __pyx_L10_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":8817
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.keys = d["keys"]
 *         except KeyError:
 */
    }
    __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_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8819
 *         try:
 *             self.keys = d["keys"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    goto __pyx_L12_except_error;
    __pyx_L12_except_error:;

    /* "pyrosm_proto.pyx":8817
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.keys = d["keys"]
 *         except KeyError:
 */
    __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:;
  }

  /* "pyrosm_proto.pyx":8821
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.vals = d["vals"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":8822
 *             pass
 *         try:
 *             self.vals = d["vals"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_vals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8822, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vals, __pyx_t_2) < 0) __PYX_ERR(0, 8822, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":8821
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.vals = d["vals"]
 *         except KeyError:
 */
    }
    __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_L21_try_end;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrosm_proto.pyx":8823
 *         try:
 *             self.vals = d["vals"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L17_exception_handled;
    }
    goto __pyx_L18_except_error;
    __pyx_L18_except_error:;

    /* "pyrosm_proto.pyx":8821
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.vals = d["vals"]
 *         except KeyError:
 */
    __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_L17_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_L21_try_end:;
  }

  /* "pyrosm_proto.pyx":8825
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.info.ParseFromDict(d["info"])
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":8826
 *             pass
 *         try:
 *             self.info.ParseFromDict(d["info"])             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8826, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ParseFromDict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 8826, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8826, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8826, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":8825
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.info.ParseFromDict(d["info"])
 *         except KeyError:
 */
    }
    __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_L27_try_end;
    __pyx_L22_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":8827
 *         try:
 *             self.info.ParseFromDict(d["info"])
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L23_exception_handled;
    }
    goto __pyx_L24_except_error;
    __pyx_L24_except_error:;

    /* "pyrosm_proto.pyx":8825
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.info.ParseFromDict(d["info"])
 *         except KeyError:
 */
    __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_L23_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_L27_try_end:;
  }

  /* "pyrosm_proto.pyx":8829
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.roles_sid = d["roles_sid"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":8830
 *             pass
 *         try:
 *             self.roles_sid = d["roles_sid"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_roles_sid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8830, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_roles_sid, __pyx_t_2) < 0) __PYX_ERR(0, 8830, __pyx_L28_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":8829
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.roles_sid = d["roles_sid"]
 *         except KeyError:
 */
    }
    __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_L33_try_end;
    __pyx_L28_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":8831
 *         try:
 *             self.roles_sid = d["roles_sid"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L29_exception_handled;
    }
    goto __pyx_L30_except_error;
    __pyx_L30_except_error:;

    /* "pyrosm_proto.pyx":8829
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.roles_sid = d["roles_sid"]
 *         except KeyError:
 */
    __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_L29_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_L33_try_end:;
  }

  /* "pyrosm_proto.pyx":8833
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.memids = d["memids"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":8834
 *             pass
 *         try:
 *             self.memids = d["memids"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_memids); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8834, __pyx_L34_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memids, __pyx_t_2) < 0) __PYX_ERR(0, 8834, __pyx_L34_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":8833
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.memids = d["memids"]
 *         except KeyError:
 */
    }
    __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_L39_try_end;
    __pyx_L34_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":8835
 *         try:
 *             self.memids = d["memids"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L35_exception_handled;
    }
    goto __pyx_L36_except_error;
    __pyx_L36_except_error:;

    /* "pyrosm_proto.pyx":8833
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.memids = d["memids"]
 *         except KeyError:
 */
    __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_L35_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_L39_try_end:;
  }

  /* "pyrosm_proto.pyx":8837
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.types = d["types"]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "pyrosm_proto.pyx":8838
 *             pass
 *         try:
 *             self.types = d["types"]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_d, __pyx_n_s_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8838, __pyx_L40_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_types, __pyx_t_2) < 0) __PYX_ERR(0, 8838, __pyx_L40_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyrosm_proto.pyx":8837
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.types = d["types"]
 *         except KeyError:
 */
    }
    __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_L45_try_end;
    __pyx_L40_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pyrosm_proto.pyx":8839
 *         try:
 *             self.types = d["types"]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L41_exception_handled;
    }
    goto __pyx_L42_except_error;
    __pyx_L42_except_error:;

    /* "pyrosm_proto.pyx":8837
 *         except KeyError:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             self.types = d["types"]
 *         except KeyError:
 */
    __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_L41_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_L45_try_end:;
  }

  /* "pyrosm_proto.pyx":8842
 *             pass
 * 
 *         self._Modified()             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 */
  ((struct __pyx_vtabstruct_12pyrosm_proto_Relation *)__pyx_v_self->__pyx_vtab)->_Modified(__pyx_v_self, 0);

  /* "pyrosm_proto.pyx":8843
 * 
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 * 
 */
  __pyx_t_1 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "pyrosm_proto.pyx":8844
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")             # <<<<<<<<<<<<<<
 * 
 *         return
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 8844, __pyx_L1_error)

    /* "pyrosm_proto.pyx":8843
 * 
 *         self._Modified()
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 * 
 */
  }

  /* "pyrosm_proto.pyx":8846
 *             raise Exception("required field 'id' not initialized and does not have default")
 * 
 *         return             # <<<<<<<<<<<<<<
 * 
 *     def SerializeToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8801
 *         return json.dumps(d, **kwargs)
 * 
 *     def ParseFromDict(self, d, reset=True):             # <<<<<<<<<<<<<<
 *         """
 *         Populate the message class from a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrosm_proto.Relation.ParseFromDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8848
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_44SerializeToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_45SerializeToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializeToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_44SerializeToDict(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_44SerializeToDict(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_info_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("SerializeToDict", 0);

  /* "pyrosm_proto.pyx":8855
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8856
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) != 1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "pyrosm_proto.pyx":8857
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8857, __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, 8857, __pyx_L1_error)

    /* "pyrosm_proto.pyx":8856
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 != 1:             # <<<<<<<<<<<<<<
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 */
  }

  /* "pyrosm_proto.pyx":8858
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8859
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id             # <<<<<<<<<<<<<<
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_id, __pyx_t_1) < 0)) __PYX_ERR(0, 8859, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8858
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8860
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 *         if len(self.keys) > 0:             # <<<<<<<<<<<<<<
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8860, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8861
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)             # <<<<<<<<<<<<<<
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_keys, __pyx_t_4) < 0)) __PYX_ERR(0, 8861, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":8860
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 *         if len(self.keys) > 0:             # <<<<<<<<<<<<<<
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8862
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:             # <<<<<<<<<<<<<<
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializeToDict()
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8862, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8863
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)             # <<<<<<<<<<<<<<
 *         info_dict = self.info.SerializeToDict()
 *         if info_dict != {}:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_vals, __pyx_t_1) < 0)) __PYX_ERR(0, 8863, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8862
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:             # <<<<<<<<<<<<<<
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializeToDict()
 */
  }

  /* "pyrosm_proto.pyx":8864
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializeToDict()             # <<<<<<<<<<<<<<
 *         if info_dict != {}:
 *             out["info"] = info_dict
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SerializeToDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_info_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8865
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializeToDict()
 *         if info_dict != {}:             # <<<<<<<<<<<<<<
 *             out["info"] = info_dict
 *         if len(self.roles_sid) > 0:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_info_dict, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8865, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 8865, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8866
 *         info_dict = self.info.SerializeToDict()
 *         if info_dict != {}:
 *             out["info"] = info_dict             # <<<<<<<<<<<<<<
 *         if len(self.roles_sid) > 0:
 *             out["roles_sid"] = list(self.roles_sid)
 */
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_info, __pyx_v_info_dict) < 0)) __PYX_ERR(0, 8866, __pyx_L1_error)

    /* "pyrosm_proto.pyx":8865
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializeToDict()
 *         if info_dict != {}:             # <<<<<<<<<<<<<<
 *             out["info"] = info_dict
 *         if len(self.roles_sid) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8867
 *         if info_dict != {}:
 *             out["info"] = info_dict
 *         if len(self.roles_sid) > 0:             # <<<<<<<<<<<<<<
 *             out["roles_sid"] = list(self.roles_sid)
 *         if len(self.memids) > 0:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_roles_sid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8867, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8868
 *             out["info"] = info_dict
 *         if len(self.roles_sid) > 0:
 *             out["roles_sid"] = list(self.roles_sid)             # <<<<<<<<<<<<<<
 *         if len(self.memids) > 0:
 *             out["memids"] = list(self.memids)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_roles_sid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_roles_sid, __pyx_t_1) < 0)) __PYX_ERR(0, 8868, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8867
 *         if info_dict != {}:
 *             out["info"] = info_dict
 *         if len(self.roles_sid) > 0:             # <<<<<<<<<<<<<<
 *             out["roles_sid"] = list(self.roles_sid)
 *         if len(self.memids) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8869
 *         if len(self.roles_sid) > 0:
 *             out["roles_sid"] = list(self.roles_sid)
 *         if len(self.memids) > 0:             # <<<<<<<<<<<<<<
 *             out["memids"] = list(self.memids)
 *         if len(self.types) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memids); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8869, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8870
 *             out["roles_sid"] = list(self.roles_sid)
 *         if len(self.memids) > 0:
 *             out["memids"] = list(self.memids)             # <<<<<<<<<<<<<<
 *         if len(self.types) > 0:
 *             out["types"] = list(self.types)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memids); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_memids, __pyx_t_5) < 0)) __PYX_ERR(0, 8870, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyrosm_proto.pyx":8869
 *         if len(self.roles_sid) > 0:
 *             out["roles_sid"] = list(self.roles_sid)
 *         if len(self.memids) > 0:             # <<<<<<<<<<<<<<
 *             out["memids"] = list(self.memids)
 *         if len(self.types) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8871
 *         if len(self.memids) > 0:
 *             out["memids"] = list(self.memids)
 *         if len(self.types) > 0:             # <<<<<<<<<<<<<<
 *             out["types"] = list(self.types)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8871, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8872
 *             out["memids"] = list(self.memids)
 *         if len(self.types) > 0:
 *             out["types"] = list(self.types)             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_types, __pyx_t_1) < 0)) __PYX_ERR(0, 8872, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8871
 *         if len(self.memids) > 0:
 *             out["memids"] = list(self.memids)
 *         if len(self.types) > 0:             # <<<<<<<<<<<<<<
 *             out["types"] = list(self.types)
 * 
 */
  }

  /* "pyrosm_proto.pyx":8874
 *             out["types"] = list(self.types)
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def SerializePartialToDict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8848
 *         return
 * 
 *     def SerializeToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.Relation.SerializeToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_info_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8876
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_46SerializePartialToDict[] = "\n        Translate the message into a Python dictionary.\n\n        Returns:\n            dict: a Python dictionary representing the message\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_47SerializePartialToDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SerializePartialToDict (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_46SerializePartialToDict(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_46SerializePartialToDict(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_info_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("SerializePartialToDict", 0);

  /* "pyrosm_proto.pyx":8883
 *             dict: a Python dictionary representing the message
 *         """
 *         out = {}             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8884
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 */
  __pyx_t_2 = (((__pyx_v_self->__pyx___field_bitmap0 & 1) == 1) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8885
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id             # <<<<<<<<<<<<<<
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_id, __pyx_t_1) < 0)) __PYX_ERR(0, 8885, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8884
 *         """
 *         out = {}
 *         if self.__field_bitmap0 & 1 == 1:             # <<<<<<<<<<<<<<
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8886
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 *         if len(self.keys) > 0:             # <<<<<<<<<<<<<<
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8887
 *             out["id"] = self.id
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)             # <<<<<<<<<<<<<<
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_keys, __pyx_t_4) < 0)) __PYX_ERR(0, 8887, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrosm_proto.pyx":8886
 *         if self.__field_bitmap0 & 1 == 1:
 *             out["id"] = self.id
 *         if len(self.keys) > 0:             # <<<<<<<<<<<<<<
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8888
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:             # <<<<<<<<<<<<<<
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializePartialToDict()
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8888, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8889
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)             # <<<<<<<<<<<<<<
 *         info_dict = self.info.SerializePartialToDict()
 *         if info_dict != {}:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_vals, __pyx_t_1) < 0)) __PYX_ERR(0, 8889, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8888
 *         if len(self.keys) > 0:
 *             out["keys"] = list(self.keys)
 *         if len(self.vals) > 0:             # <<<<<<<<<<<<<<
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializePartialToDict()
 */
  }

  /* "pyrosm_proto.pyx":8890
 *         if len(self.vals) > 0:
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializePartialToDict()             # <<<<<<<<<<<<<<
 *         if info_dict != {}:
 *             out["info"] = info_dict
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SerializePartialToDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_info_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8891
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializePartialToDict()
 *         if info_dict != {}:             # <<<<<<<<<<<<<<
 *             out["info"] = info_dict
 *         if len(self.roles_sid) > 0:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_info_dict, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8891, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 8891, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8892
 *         info_dict = self.info.SerializePartialToDict()
 *         if info_dict != {}:
 *             out["info"] = info_dict             # <<<<<<<<<<<<<<
 *         if len(self.roles_sid) > 0:
 *             out["roles_sid"] = list(self.roles_sid)
 */
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_info, __pyx_v_info_dict) < 0)) __PYX_ERR(0, 8892, __pyx_L1_error)

    /* "pyrosm_proto.pyx":8891
 *             out["vals"] = list(self.vals)
 *         info_dict = self.info.SerializePartialToDict()
 *         if info_dict != {}:             # <<<<<<<<<<<<<<
 *             out["info"] = info_dict
 *         if len(self.roles_sid) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8893
 *         if info_dict != {}:
 *             out["info"] = info_dict
 *         if len(self.roles_sid) > 0:             # <<<<<<<<<<<<<<
 *             out["roles_sid"] = list(self.roles_sid)
 *         if len(self.memids) > 0:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_roles_sid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8893, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8894
 *             out["info"] = info_dict
 *         if len(self.roles_sid) > 0:
 *             out["roles_sid"] = list(self.roles_sid)             # <<<<<<<<<<<<<<
 *         if len(self.memids) > 0:
 *             out["memids"] = list(self.memids)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_roles_sid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_roles_sid, __pyx_t_1) < 0)) __PYX_ERR(0, 8894, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8893
 *         if info_dict != {}:
 *             out["info"] = info_dict
 *         if len(self.roles_sid) > 0:             # <<<<<<<<<<<<<<
 *             out["roles_sid"] = list(self.roles_sid)
 *         if len(self.memids) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8895
 *         if len(self.roles_sid) > 0:
 *             out["roles_sid"] = list(self.roles_sid)
 *         if len(self.memids) > 0:             # <<<<<<<<<<<<<<
 *             out["memids"] = list(self.memids)
 *         if len(self.types) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memids); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8895, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8896
 *             out["roles_sid"] = list(self.roles_sid)
 *         if len(self.memids) > 0:
 *             out["memids"] = list(self.memids)             # <<<<<<<<<<<<<<
 *         if len(self.types) > 0:
 *             out["types"] = list(self.types)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memids); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_memids, __pyx_t_5) < 0)) __PYX_ERR(0, 8896, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyrosm_proto.pyx":8895
 *         if len(self.roles_sid) > 0:
 *             out["roles_sid"] = list(self.roles_sid)
 *         if len(self.memids) > 0:             # <<<<<<<<<<<<<<
 *             out["memids"] = list(self.memids)
 *         if len(self.types) > 0:
 */
  }

  /* "pyrosm_proto.pyx":8897
 *         if len(self.memids) > 0:
 *             out["memids"] = list(self.memids)
 *         if len(self.types) > 0:             # <<<<<<<<<<<<<<
 *             out["types"] = list(self.types)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 8897, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 0) != 0);
  if (__pyx_t_2) {

    /* "pyrosm_proto.pyx":8898
 *             out["memids"] = list(self.memids)
 *         if len(self.types) > 0:
 *             out["types"] = list(self.types)             # <<<<<<<<<<<<<<
 * 
 *         return out
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_out, __pyx_n_s_types, __pyx_t_1) < 0)) __PYX_ERR(0, 8898, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrosm_proto.pyx":8897
 *         if len(self.memids) > 0:
 *             out["memids"] = list(self.memids)
 *         if len(self.types) > 0:             # <<<<<<<<<<<<<<
 *             out["types"] = list(self.types)
 * 
 */
  }

  /* "pyrosm_proto.pyx":8900
 *             out["types"] = list(self.types)
 * 
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def Items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "pyrosm_proto.pyx":8876
 *         return out
 * 
 *     def SerializePartialToDict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Translate the message into a Python dictionary.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrosm_proto.Relation.SerializePartialToDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_info_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_8Relation_50generator52(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":8902
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_48Items[] = "\n        Iterator over the field names and values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_49Items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_48Items(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_48Items(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_52_Items(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_52_Items, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 8902, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_8Relation_50generator52, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Items, __pyx_n_s_Relation_Items, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 8902, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_8Relation_50generator52(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Items", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    case 7: goto __pyx_L10_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8902, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8909
 *             iterator
 *         """
 *         yield 'id', self.id             # <<<<<<<<<<<<<<
 *         yield 'keys', self.keys
 *         yield 'vals', self.vals
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_id);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8909, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8910
 *         """
 *         yield 'id', self.id
 *         yield 'keys', self.keys             # <<<<<<<<<<<<<<
 *         yield 'vals', self.vals
 *         yield 'info', self.info
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_keys);
  __Pyx_GIVEREF(__pyx_n_s_keys);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_keys);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8910, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8911
 *         yield 'id', self.id
 *         yield 'keys', self.keys
 *         yield 'vals', self.vals             # <<<<<<<<<<<<<<
 *         yield 'info', self.info
 *         yield 'roles_sid', self.roles_sid
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_vals);
  __Pyx_GIVEREF(__pyx_n_s_vals);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_vals);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8911, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8912
 *         yield 'keys', self.keys
 *         yield 'vals', self.vals
 *         yield 'info', self.info             # <<<<<<<<<<<<<<
 *         yield 'roles_sid', self.roles_sid
 *         yield 'memids', self.memids
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_info);
  __Pyx_GIVEREF(__pyx_n_s_info);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_info);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8912, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8913
 *         yield 'vals', self.vals
 *         yield 'info', self.info
 *         yield 'roles_sid', self.roles_sid             # <<<<<<<<<<<<<<
 *         yield 'memids', self.memids
 *         yield 'types', self.types
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_roles_sid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_roles_sid);
  __Pyx_GIVEREF(__pyx_n_s_roles_sid);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_roles_sid);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8913, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8914
 *         yield 'info', self.info
 *         yield 'roles_sid', self.roles_sid
 *         yield 'memids', self.memids             # <<<<<<<<<<<<<<
 *         yield 'types', self.types
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_memids); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_memids);
  __Pyx_GIVEREF(__pyx_n_s_memids);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_memids);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8914, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8915
 *         yield 'roles_sid', self.roles_sid
 *         yield 'memids', self.memids
 *         yield 'types', self.types             # <<<<<<<<<<<<<<
 * 
 *     def Fields(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_types);
  __Pyx_GIVEREF(__pyx_n_s_types);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_types);
  __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;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 7;
  return __pyx_r;
  __pyx_L10_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8915, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":8902
 *         return out
 * 
 *     def Items(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names and values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("Items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_8Relation_53generator53(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":8917
 *         yield 'types', self.types
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_51Fields[] = "\n        Iterator over the field names of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_52Fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_51Fields(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_51Fields(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_53_Fields(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_53_Fields, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 8917, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_8Relation_53generator53, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Fields, __pyx_n_s_Relation_Fields, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 8917, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_8Relation_53generator53(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Fields", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    case 7: goto __pyx_L10_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8917, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8924
 *             iterator
 *         """
 *         yield 'id'             # <<<<<<<<<<<<<<
 *         yield 'keys'
 *         yield 'vals'
 */
  __Pyx_INCREF(__pyx_n_s_id);
  __pyx_r = __pyx_n_s_id;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8924, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8925
 *         """
 *         yield 'id'
 *         yield 'keys'             # <<<<<<<<<<<<<<
 *         yield 'vals'
 *         yield 'info'
 */
  __Pyx_INCREF(__pyx_n_s_keys);
  __pyx_r = __pyx_n_s_keys;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8925, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8926
 *         yield 'id'
 *         yield 'keys'
 *         yield 'vals'             # <<<<<<<<<<<<<<
 *         yield 'info'
 *         yield 'roles_sid'
 */
  __Pyx_INCREF(__pyx_n_s_vals);
  __pyx_r = __pyx_n_s_vals;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8926, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8927
 *         yield 'keys'
 *         yield 'vals'
 *         yield 'info'             # <<<<<<<<<<<<<<
 *         yield 'roles_sid'
 *         yield 'memids'
 */
  __Pyx_INCREF(__pyx_n_s_info);
  __pyx_r = __pyx_n_s_info;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8927, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8928
 *         yield 'vals'
 *         yield 'info'
 *         yield 'roles_sid'             # <<<<<<<<<<<<<<
 *         yield 'memids'
 *         yield 'types'
 */
  __Pyx_INCREF(__pyx_n_s_roles_sid);
  __pyx_r = __pyx_n_s_roles_sid;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8928, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8929
 *         yield 'info'
 *         yield 'roles_sid'
 *         yield 'memids'             # <<<<<<<<<<<<<<
 *         yield 'types'
 * 
 */
  __Pyx_INCREF(__pyx_n_s_memids);
  __pyx_r = __pyx_n_s_memids;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8929, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8930
 *         yield 'roles_sid'
 *         yield 'memids'
 *         yield 'types'             # <<<<<<<<<<<<<<
 * 
 *     def Values(self):
 */
  __Pyx_INCREF(__pyx_n_s_types);
  __pyx_r = __pyx_n_s_types;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 7;
  return __pyx_r;
  __pyx_L10_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8930, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":8917
 *         yield 'types', self.types
 * 
 *     def Fields(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the field names of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_8Relation_56generator54(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":8932
 *         yield 'types'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_54Values[] = "\n        Iterator over the values of the message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_55Values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_54Values(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_54Values(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_54_Values(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_54_Values, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 8932, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_8Relation_56generator54, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Values, __pyx_n_s_Relation_Values, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 8932, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrosm_proto_8Relation_56generator54(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Values", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    case 7: goto __pyx_L10_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8932, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8939
 *             iterator
 *         """
 *         yield self.id             # <<<<<<<<<<<<<<
 *         yield self.keys
 *         yield self.vals
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8939, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8940
 *         """
 *         yield self.id
 *         yield self.keys             # <<<<<<<<<<<<<<
 *         yield self.vals
 *         yield self.info
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8940, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8941
 *         yield self.id
 *         yield self.keys
 *         yield self.vals             # <<<<<<<<<<<<<<
 *         yield self.info
 *         yield self.roles_sid
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_vals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8941, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8942
 *         yield self.keys
 *         yield self.vals
 *         yield self.info             # <<<<<<<<<<<<<<
 *         yield self.roles_sid
 *         yield self.memids
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8942, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8943
 *         yield self.vals
 *         yield self.info
 *         yield self.roles_sid             # <<<<<<<<<<<<<<
 *         yield self.memids
 *         yield self.types
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_roles_sid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8943, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8944
 *         yield self.info
 *         yield self.roles_sid
 *         yield self.memids             # <<<<<<<<<<<<<<
 *         yield self.types
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_memids); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8944, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8945
 *         yield self.roles_sid
 *         yield self.memids
 *         yield self.types             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 7;
  return __pyx_r;
  __pyx_L10_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8945, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":8932
 *         yield 'types'
 * 
 *     def Values(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over the values of the message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrosm_proto_8Relation_59generator55(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "pyrosm_proto.pyx":8954
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_12pyrosm_proto_8Relation_57Setters[] = "\n        Iterator over functions to set the fields in a message.\n\n        Returns:\n            iterator\n        ";
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_58Setters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_57Setters(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_57Setters(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *)__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_55_Setters(__pyx_ptype_12pyrosm_proto___pyx_scope_struct_55_Setters, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 8954, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrosm_proto_8Relation_59generator55, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_Setters, __pyx_n_s_Relation_Setters, __pyx_n_s_pyrosm_proto); if (unlikely(!gen)) __PYX_ERR(0, 8954, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.Setters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8961
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_8Relation_7Setters_1setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_7Setters_1setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7Setters_1setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_7Setters_setter(__pyx_self, ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_7Setters_setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":8962
 *         """
 *         def setter(value):
 *             self.id = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 8962, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_id, __pyx_v_value) < 0) __PYX_ERR(0, 8962, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8961
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8964
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_8Relation_7Setters_3setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_7Setters_3setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7Setters_3setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_7Setters_2setter(__pyx_self, ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_7Setters_2setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":8965
 *         yield setter
 *         def setter(value):
 *             self.keys = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 8965, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_keys, __pyx_v_value) < 0) __PYX_ERR(0, 8965, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8964
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8967
 *             self.keys = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.vals = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_8Relation_7Setters_5setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_7Setters_5setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7Setters_5setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_7Setters_4setter(__pyx_self, ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_7Setters_4setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":8968
 *         yield setter
 *         def setter(value):
 *             self.vals = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 8968, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_vals, __pyx_v_value) < 0) __PYX_ERR(0, 8968, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8967
 *             self.keys = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.vals = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8970
 *             self.vals = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.info = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_8Relation_7Setters_7setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_7Setters_7setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7Setters_7setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_7Setters_6setter(__pyx_self, ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_7Setters_6setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":8971
 *         yield setter
 *         def setter(value):
 *             self.info = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 8971, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_info, __pyx_v_value) < 0) __PYX_ERR(0, 8971, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8970
 *             self.vals = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.info = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8973
 *             self.info = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.roles_sid = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_8Relation_7Setters_9setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_7Setters_9setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7Setters_9setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_7Setters_8setter(__pyx_self, ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_7Setters_8setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":8974
 *         yield setter
 *         def setter(value):
 *             self.roles_sid = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 8974, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_roles_sid, __pyx_v_value) < 0) __PYX_ERR(0, 8974, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8973
 *             self.info = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.roles_sid = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8976
 *             self.roles_sid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.memids = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7Setters_11setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_8Relation_7Setters_11setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_7Setters_11setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7Setters_11setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_7Setters_10setter(__pyx_self, ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_7Setters_10setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":8977
 *         yield setter
 *         def setter(value):
 *             self.memids = value             # <<<<<<<<<<<<<<
 *         yield setter
 *         def setter(value):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 8977, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_memids, __pyx_v_value) < 0) __PYX_ERR(0, 8977, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8976
 *             self.roles_sid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.memids = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8979
 *             self.memids = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.types = value
 *         yield setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7Setters_13setter(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_12pyrosm_proto_8Relation_7Setters_13setter = {"setter", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_7Setters_13setter, METH_O, 0};
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_7Setters_13setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_7Setters_12setter(__pyx_self, ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_7Setters_12setter(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_cur_scope;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setter", 0);
  __pyx_outer_scope = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "pyrosm_proto.pyx":8980
 *         yield setter
 *         def setter(value):
 *             self.types = value             # <<<<<<<<<<<<<<
 *         yield setter
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 8980, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_types, __pyx_v_value) < 0) __PYX_ERR(0, 8980, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8979
 *             self.memids = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.types = value
 *         yield setter
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation.Setters.setter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pyx":8954
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

static PyObject *__pyx_gb_12pyrosm_proto_8Relation_59generator55(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_cur_scope = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Setters", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L4_resume_from_yield;
    case 2: goto __pyx_L5_resume_from_yield;
    case 3: goto __pyx_L6_resume_from_yield;
    case 4: goto __pyx_L7_resume_from_yield;
    case 5: goto __pyx_L8_resume_from_yield;
    case 6: goto __pyx_L9_resume_from_yield;
    case 7: goto __pyx_L10_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8954, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8961
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_8Relation_7Setters_1setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_setter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8963
 *         def setter(value):
 *             self.id = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.keys = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 1;
  return __pyx_r;
  __pyx_L4_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8963, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8964
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_8Relation_7Setters_3setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__173)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8966
 *         def setter(value):
 *             self.keys = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.vals = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 2;
  return __pyx_r;
  __pyx_L5_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8966, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8967
 *             self.keys = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.vals = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_8Relation_7Setters_5setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__175)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8969
 *         def setter(value):
 *             self.vals = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.info = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 3;
  return __pyx_r;
  __pyx_L6_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8969, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8970
 *             self.vals = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.info = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_8Relation_7Setters_7setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8972
 *         def setter(value):
 *             self.info = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.roles_sid = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 4;
  return __pyx_r;
  __pyx_L7_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8972, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8973
 *             self.info = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.roles_sid = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_8Relation_7Setters_9setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8975
 *         def setter(value):
 *             self.roles_sid = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.memids = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 5;
  return __pyx_r;
  __pyx_L8_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8975, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8976
 *             self.roles_sid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.memids = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_8Relation_7Setters_11setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8978
 *         def setter(value):
 *             self.memids = value
 *         yield setter             # <<<<<<<<<<<<<<
 *         def setter(value):
 *             self.types = value
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 6;
  return __pyx_r;
  __pyx_L9_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8978, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8979
 *             self.memids = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.types = value
 *         yield setter
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_12pyrosm_proto_8Relation_7Setters_13setter, 0, __pyx_n_s_Setters_locals_setter, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pyrosm_proto, __pyx_d, ((PyObject *)__pyx_codeobj__183)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_setter);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_setter, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":8981
 *         def setter(value):
 *             self.types = value
 *         yield setter             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_setter);
  __pyx_r = __pyx_cur_scope->__pyx_v_setter;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  /* return from generator, yielding value */
  __pyx_generator->resume_label = 7;
  return __pyx_r;
  __pyx_L10_resume_from_yield:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 8981, __pyx_L1_error)
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "pyrosm_proto.pyx":8954
 * 
 * 
 *     def Setters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Iterator over functions to set the fields in a message.
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Setters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrosm_proto.pxd":488
 *     cdef uint64_t __field_bitmap0
 * 
 *     cdef public bint _is_present_in_parent             # <<<<<<<<<<<<<<
 *     cdef bytes _cached_serialization
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_21_is_present_in_parent___get__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_21_is_present_in_parent___get__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_present_in_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 488, __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("pyrosm_proto.Relation._is_present_in_parent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_12pyrosm_proto_8Relation_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_12pyrosm_proto_8Relation_21_is_present_in_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrosm_proto_8Relation_21_is_present_in_parent_2__set__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrosm_proto_8Relation_21_is_present_in_parent_2__set__(struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 488, __pyx_L1_error)
  __pyx_v_self->_is_present_in_parent = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrosm_proto.Relation._is_present_in_parent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_61__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_61__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_12pyrosm_proto_8Relation_60__reduce_cython__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__184, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Relation.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_63__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_12pyrosm_proto_8Relation_63__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_12pyrosm_proto_8Relation_62__setstate_cython__(((struct __pyx_obj_12pyrosm_proto_Relation *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrosm_proto_8Relation_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_12pyrosm_proto_Relation *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__185, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrosm_proto.Relation.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":122
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
 */

/* Python wrapper */
static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_shape = 0;
  Py_ssize_t __pyx_v_itemsize;
  PyObject *__pyx_v_format = 0;
  PyObject *__pyx_v_mode = 0;
  int __pyx_v_allocate_buffer;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)__pyx_n_s_c);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(2, 122, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(2, 122, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(2, 122, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_shape = ((PyObject*)values[0]);
    __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 122, __pyx_L3_error)
    __pyx_v_format = values[2];
    __pyx_v_mode = values[3];
    if (values[4]) {
      __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 123, __pyx_L3_error)
    } else {

      /* "View.MemoryView":123
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
 *                   mode="c", bint allocate_buffer=True):             # <<<<<<<<<<<<<<
 * 
 *         cdef int idx
 */
      __pyx_v_allocate_buffer = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 122, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(2, 122, __pyx_L1_error)
  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(2, 122, __pyx_L1_error)
  }
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);

  /* "View.MemoryView":122
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
  int __pyx_v_idx;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_dim;
  PyObject **__pyx_v_p;
  char __pyx_v_order;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_format);

  /* "View.MemoryView":129
 *         cdef PyObject **p
 * 
 *         self.ndim = <int> len(shape)             # <<<<<<<<<<<<<<
 *         self.itemsize = itemsize
 * 
 */
  if (unlikely(__pyx_v_shape == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 129, __pyx_L1_error)
  }
  __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(2, 129, __pyx_L1_error)
  __pyx_v_self->ndim = ((int)__pyx_t_1);

  /* "View.MemoryView":130
 * 
 *         self.ndim = <int> len(shape)
 *         self.itemsize = itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not self.ndim:
 */
  __pyx_v_self->itemsize = __pyx_v_itemsize;

  /* "View.MemoryView":132
 *         self.itemsize = itemsize
 * 
 *         if not self.ndim:             # <<<<<<<<<<<<<<
 *             raise ValueError("Empty shape tuple for cython.array")
 * 
 */
  __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":133
 * 
 *         if not self.ndim:
 *             raise ValueError("Empty shape tuple for cython.array")             # <<<<<<<<<<<<<<
 * 
 *         if itemsize <= 0:
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__186, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 133, __pyx_L1_error)

    /* "View.MemoryView":132
 *         self.itemsize = itemsize
 * 
 *         if not self.ndim:             # <<<<<<<<<<<<<<
 *             raise ValueError("Empty shape tuple for cython.array")
 * 
 */
  }

  /* "View.MemoryView":135
 *             raise ValueError("Empty shape tuple for cython.array")
 * 
 *         if itemsize <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("itemsize <= 0 for cython.array")
 * 
 */
  __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":136
 * 
 *         if itemsize <= 0:
 *             raise ValueError("itemsize <= 0 for cython.array")             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(format, bytes):
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__187, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 136, __pyx_L1_error)

    /* "View.MemoryView":135
 *             raise ValueError("Empty shape tuple for cython.array")
 * 
 *         if itemsize <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("itemsize <= 0 for cython.array")
 * 
 */
  }

  /* "View.MemoryView":138
 *             raise ValueError("itemsize <= 0 for cython.array")
 * 
 *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
 */
  __pyx_t_2 = PyBytes_Check(__pyx_v_format); 
  __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
  if (__pyx_t_4) {

    /* "View.MemoryView":139
 * 
 *         if not isinstance(format, bytes):
 *             format = format.encode('ASCII')             # <<<<<<<<<<<<<<
 *         self._format = format  # keep a reference to the byte string
 *         self.format = self._format
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_ASCII) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_ASCII);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":138
 *             raise ValueError("itemsize <= 0 for cython.array")
 * 
 *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
 */
  }

  /* "View.MemoryView":140
 *         if not isinstance(format, bytes):
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string             # <<<<<<<<<<<<<<
 *         self.format = self._format
 * 
 */
  if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(2, 140, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_format;
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_format);
  __Pyx_DECREF(__pyx_v_self->_format);
  __pyx_v_self->_format = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "View.MemoryView":141
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
 *         self.format = self._format             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (unlikely(__pyx_v_self->_format == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 141, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(2, 141, __pyx_L1_error)
  __pyx_v_self->format = __pyx_t_7;

  /* "View.MemoryView":144
 * 
 * 
 *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)             # <<<<<<<<<<<<<<
 *         self._strides = self._shape + self.ndim
 * 
 */
  __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));

  /* "View.MemoryView":145
 * 
 *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
 *         self._strides = self._shape + self.ndim             # <<<<<<<<<<<<<<
 * 
 *         if not self._shape:
 */
  __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);

  /* "View.MemoryView":147
 *         self._strides = self._shape + self.ndim
 * 
 *         if not self._shape:             # <<<<<<<<<<<<<<
 *             raise MemoryError("unable to allocate shape and strides.")
 * 
 */
  __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "View.MemoryView":148
 * 
 *         if not self._shape:
 *             raise MemoryError("unable to allocate shape and strides.")             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__188, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 148, __pyx_L1_error)

    /* "View.MemoryView":147
 *         self._strides = self._shape + self.ndim
 * 
 *         if not self._shape:             # <<<<<<<<<<<<<<
 *             raise MemoryError("unable to allocate shape and strides.")
 * 
 */
  }

  /* "View.MemoryView":151
 * 
 * 
 *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
 *             if dim <= 0:
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
 */
  __pyx_t_8 = 0;
  __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
  for (;;) {
    if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(2, 151, __pyx_L1_error)
    #else
    __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 151, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_dim = __pyx_t_9;
    __pyx_v_idx = __pyx_t_8;
    __pyx_t_8 = (__pyx_t_8 + 1);

    /* "View.MemoryView":152
 * 
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
 *             self._shape[idx] = dim
 */
    __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "View.MemoryView":153
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))             # <<<<<<<<<<<<<<
 *             self._shape[idx] = dim
 * 
 */
      __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
      __pyx_t_5 = 0;
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __PYX_ERR(2, 153, __pyx_L1_error)

      /* "View.MemoryView":152
 * 
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
 *             self._shape[idx] = dim
 */
    }

    /* "View.MemoryView":154
 *             if dim <= 0:
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
 *             self._shape[idx] = dim             # <<<<<<<<<<<<<<
 * 
 *         cdef char order
 */
    (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;

    /* "View.MemoryView":151
 * 
 * 
 *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
 *             if dim <= 0:
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "View.MemoryView":157
 * 
 *         cdef char order
 *         if mode == 'fortran':             # <<<<<<<<<<<<<<
 *             order = b'F'
 *             self.mode = u'fortran'
 */
  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 157, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "View.MemoryView":158
 *         cdef char order
 *         if mode == 'fortran':
 *             order = b'F'             # <<<<<<<<<<<<<<
 *             self.mode = u'fortran'
 *         elif mode == 'c':
 */
    __pyx_v_order = 'F';

    /* "View.MemoryView":159
 *         if mode == 'fortran':
 *             order = b'F'
 *             self.mode = u'fortran'             # <<<<<<<<<<<<<<
 *         elif mode == 'c':
 *             order = b'C'
 */
    __Pyx_INCREF(__pyx_n_u_fortran);
    __Pyx_GIVEREF(__pyx_n_u_fortran);
    __Pyx_GOTREF(__pyx_v_self->mode);
    __Pyx_DECREF(__pyx_v_self->mode);
    __pyx_v_self->mode = __pyx_n_u_fortran;

    /* "View.MemoryView":157
 * 
 *         cdef char order
 *         if mode == 'fortran':             # <<<<<<<<<<<<<<
 *             order = b'F'
 *             self.mode = u'fortran'
 */
    goto __pyx_L10;
  }

  /* "View.MemoryView":160
 *             order = b'F'
 *             self.mode = u'fortran'
 *         elif mode == 'c':             # <<<<<<<<<<<<<<
 *             order = b'C'
 *             self.mode = u'c'
 */
  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 160, __pyx_L1_error)
  if (likely(__pyx_t_4)) {

    /* "View.MemoryView":161
 *             self.mode = u'fortran'
 *         elif mode == 'c':
 *             order = b'C'             # <<<<<<<<<<<<<<
 *             self.mode = u'c'
 *         else:
 */
    __pyx_v_order = 'C';

    /* "View.MemoryView":162
 *         elif mode == 'c':
 *             order = b'C'
 *             self.mode = u'c'             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
 */
    __Pyx_INCREF(__pyx_n_u_c);
    __Pyx_GIVEREF(__pyx_n_u_c);
    __Pyx_GOTREF(__pyx_v_self->mode);
    __Pyx_DECREF(__pyx_v_self->mode);
    __pyx_v_self->mode = __pyx_n_u_c;

    /* "View.MemoryView":160
 *             order = b'F'
 *             self.mode = u'fortran'
 *         elif mode == 'c':             # <<<<<<<<<<<<<<
 *             order = b'C'
 *             self.mode = u'c'
 */
    goto __pyx_L10;
  }

  /* "View.MemoryView":164
 *             self.mode = u'c'
 *         else:
 *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)             # <<<<<<<<<<<<<<
 * 
 *         self.len = fill_contig_strides_array(self._shape, self._strides,
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_10, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __PYX_ERR(2, 164, __pyx_L1_error)
  }
  __pyx_L10:;

  /* "View.MemoryView":166
 *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
 * 
 *         self.len = fill_contig_strides_array(self._shape, self._strides,             # <<<<<<<<<<<<<<
 *                                              itemsize, self.ndim, order)
 * 
 */
  __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);

  /* "View.MemoryView":169
 *                                              itemsize, self.ndim, order)
 * 
 *         self.free_data = allocate_buffer             # <<<<<<<<<<<<<<
 *         self.dtype_is_object = format == b'O'
 *         if allocate_buffer:
 */
  __pyx_v_self->free_data = __pyx_v_allocate_buffer;

  /* "View.MemoryView":170
 * 
 *         self.free_data = allocate_buffer
 *         self.dtype_is_object = format == b'O'             # <<<<<<<<<<<<<<
 *         if allocate_buffer:
 * 
 */
  __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 170, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_v_self->dtype_is_object = __pyx_t_4;

  /* "View.MemoryView":171
 *         self.free_data = allocate_buffer
 *         self.dtype_is_object = format == b'O'
 *         if allocate_buffer:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
  if (__pyx_t_4) {

    /* "View.MemoryView":174
 * 
 * 
 *             self.data = <char *>malloc(self.len)             # <<<<<<<<<<<<<<
 *             if not self.data:
 *                 raise MemoryError("unable to allocate array data.")
 */
    __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));

    /* "View.MemoryView":175
 * 
 *             self.data = <char *>malloc(self.len)
 *             if not self.data:             # <<<<<<<<<<<<<<
 *                 raise MemoryError("unable to allocate array data.")
 * 
 */
    __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "View.MemoryView":176
 *             self.data = <char *>malloc(self.len)
 *             if not self.data:
 *                 raise MemoryError("unable to allocate array data.")             # <<<<<<<<<<<<<<
 * 
 *             if self.dtype_is_object:
 */
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__189, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __PYX_ERR(2, 176, __pyx_L1_error)

      /* "View.MemoryView":175
 * 
 *             self.data = <char *>malloc(self.len)
 *             if not self.data:             # <<<<<<<<<<<<<<
 *                 raise MemoryError("unable to allocate array data.")
 * 
 */
    }

    /* "View.MemoryView":178
 *                 raise MemoryError("unable to allocate array data.")
 * 
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 p = <PyObject **> self.data
 *                 for i in range(self.len / itemsize):
 */
    __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
    if (__pyx_t_4) {

      /* "View.MemoryView":179
 * 
 *             if self.dtype_is_object:
 *                 p = <PyObject **> self.data             # <<<<<<<<<<<<<<
 *                 for i in range(self.len / itemsize):
 *                     p[i] = Py_None
 */
      __pyx_v_p = ((PyObject **)__pyx_v_self->data);

      /* "View.MemoryView":180
 *             if self.dtype_is_object:
 *                 p = <PyObject **> self.data
 *                 for i in range(self.len / itemsize):             # <<<<<<<<<<<<<<
 *                     p[i] = Py_None
 *                     Py_INCREF(Py_None)
 */
      if (unlikely(__pyx_v_itemsize == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
        __PYX_ERR(2, 180, __pyx_L1_error)
      }
      else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
        PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
        __PYX_ERR(2, 180, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize);
      __pyx_t_9 = __pyx_t_1;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "View.MemoryView":181
 *                 p = <PyObject **> self.data
 *                 for i in range(self.len / itemsize):
 *                     p[i] = Py_None             # <<<<<<<<<<<<<<
 *                     Py_INCREF(Py_None)
 * 
 */
        (__pyx_v_p[__pyx_v_i]) = Py_None;

        /* "View.MemoryView":182
 *                 for i in range(self.len / itemsize):
 *                     p[i] = Py_None
 *                     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
 */
        Py_INCREF(Py_None);
      }

      /* "View.MemoryView":178
 *                 raise MemoryError("unable to allocate array data.")
 * 
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 p = <PyObject **> self.data
 *                 for i in range(self.len / itemsize):
 */
    }

    /* "View.MemoryView":171
 *         self.free_data = allocate_buffer
 *         self.dtype_is_object = format == b'O'
 *         if allocate_buffer:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  }

  /* "View.MemoryView":122
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_format);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":185
 * 
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
 *         cdef int bufmode = -1
 *         if self.mode == u"c":
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_bufmode;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t *__pyx_t_7;
  if (__pyx_v_info == NULL) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "View.MemoryView":186
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1             # <<<<<<<<<<<<<<
 *         if self.mode == u"c":
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 */
  __pyx_v_bufmode = -1;

  /* "View.MemoryView":187
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
 *         if self.mode == u"c":             # <<<<<<<<<<<<<<
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         elif self.mode == u"fortran":
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 187, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":188
 *         cdef int bufmode = -1
 *         if self.mode == u"c":
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
 *         elif self.mode == u"fortran":
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 */
    __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);

    /* "View.MemoryView":187
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
 *         if self.mode == u"c":             # <<<<<<<<<<<<<<
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         elif self.mode == u"fortran":
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":189
 *         if self.mode == u"c":
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):
 */
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 189, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":190
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         elif self.mode == u"fortran":
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
 *         if not (flags & bufmode):
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")
 */
    __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);

    /* "View.MemoryView":189
 *         if self.mode == u"c":
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):
 */
  }
  __pyx_L3:;

  /* "View.MemoryView":191
 *         elif self.mode == u"fortran":
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):             # <<<<<<<<<<<<<<
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")
 *         info.buf = self.data
 */
  __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":192
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")             # <<<<<<<<<<<<<<
 *         info.buf = self.data
 *         info.len = self.len
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__190, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 192, __pyx_L1_error)

    /* "View.MemoryView":191
 *         elif self.mode == u"fortran":
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):             # <<<<<<<<<<<<<<
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")
 *         info.buf = self.data
 */
  }

  /* "View.MemoryView":193
 *         if not (flags & bufmode):
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")
 *         info.buf = self.data             # <<<<<<<<<<<<<<
 *         info.len = self.len
 *         info.ndim = self.ndim
 */
  __pyx_t_4 = __pyx_v_self->data;
  __pyx_v_info->buf = __pyx_t_4;

  /* "View.MemoryView":194
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")
 *         info.buf = self.data
 *         info.len = self.len             # <<<<<<<<<<<<<<
 *         info.ndim = self.ndim
 *         info.shape = self._shape
 */
  __pyx_t_5 = __pyx_v_self->len;
  __pyx_v_info->len = __pyx_t_5;

  /* "View.MemoryView":195
 *         info.buf = self.data
 *         info.len = self.len
 *         info.ndim = self.ndim             # <<<<<<<<<<<<<<
 *         info.shape = self._shape
 *         info.strides = self._strides
 */
  __pyx_t_6 = __pyx_v_self->ndim;
  __pyx_v_info->ndim = __pyx_t_6;

  /* "View.MemoryView":196
 *         info.len = self.len
 *         info.ndim = self.ndim
 *         info.shape = self._shape             # <<<<<<<<<<<<<<
 *         info.strides = self._strides
 *         info.suboffsets = NULL
 */
  __pyx_t_7 = __pyx_v_self->_shape;
  __pyx_v_info->shape = __pyx_t_7;

  /* "View.MemoryView":197
 *         info.ndim = self.ndim
 *         info.shape = self._shape
 *         info.strides = self._strides             # <<<<<<<<<<<<<<
 *         info.suboffsets = NULL
 *         info.itemsize = self.itemsize
 */
  __pyx_t_7 = __pyx_v_self->_strides;
  __pyx_v_info->strides = __pyx_t_7;

  /* "View.MemoryView":198
 *         info.shape = self._shape
 *         info.strides = self._strides
 *         info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *         info.itemsize = self.itemsize
 *         info.readonly = 0
 */
  __pyx_v_info->suboffsets = NULL;

  /* "View.MemoryView":199
 *         info.strides = self._strides
 *         info.suboffsets = NULL
 *         info.itemsize = self.itemsize             # <<<<<<<<<<<<<<
 *         info.readonly = 0
 * 
 */
  __pyx_t_5 = __pyx_v_self->itemsize;
  __pyx_v_info->itemsize = __pyx_t_5;

  /* "View.MemoryView":200
 *         info.suboffsets = NULL
 *         info.itemsize = self.itemsize
 *         info.readonly = 0             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_FORMAT:
 */
  __pyx_v_info->readonly = 0;

  /* "View.MemoryView":202
 *         info.readonly = 0
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.format
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":203
 * 
 *         if flags & PyBUF_FORMAT:
 *             info.format = self.format             # <<<<<<<<<<<<<<
 *         else:
 *             info.format = NULL
 */
    __pyx_t_4 = __pyx_v_self->format;
    __pyx_v_info->format = __pyx_t_4;

    /* "View.MemoryView":202
 *         info.readonly = 0
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.format
 *         else:
 */
    goto __pyx_L5;
  }

  /* "View.MemoryView":205
 *             info.format = self.format
 *         else:
 *             info.format = NULL             # <<<<<<<<<<<<<<
 * 
 *         info.obj = self
 */
  /*else*/ {
    __pyx_v_info->format = NULL;
  }
  __pyx_L5:;

  /* "View.MemoryView":207
 *             info.format = NULL
 * 
 *         info.obj = self             # <<<<<<<<<<<<<<
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_info->obj);
  __Pyx_DECREF(__pyx_v_info->obj);
  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);

  /* "View.MemoryView":185
 * 
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
 *         cdef int bufmode = -1
 *         if self.mode == u"c":
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":211
 *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
 * 
 *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 */

/* Python wrapper */
static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "View.MemoryView":212
 * 
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
 *             self.callback_free_data(self.data)
 *         elif self.free_data:
 */
  __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":213
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)             # <<<<<<<<<<<<<<
 *         elif self.free_data:
 *             if self.dtype_is_object:
 */
    __pyx_v_self->callback_free_data(__pyx_v_self->data);

    /* "View.MemoryView":212
 * 
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
 *             self.callback_free_data(self.data)
 *         elif self.free_data:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":214
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 *         elif self.free_data:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape,
 */
  __pyx_t_1 = (__pyx_v_self->free_data != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":215
 *             self.callback_free_data(self.data)
 *         elif self.free_data:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 refcount_objects_in_slice(self.data, self._shape,
 *                                           self._strides, self.ndim, False)
 */
    __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":216
 *         elif self.free_data:
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape,             # <<<<<<<<<<<<<<
 *                                           self._strides, self.ndim, False)
 *             free(self.data)
 */
      __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);

      /* "View.MemoryView":215
 *             self.callback_free_data(self.data)
 *         elif self.free_data:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 refcount_objects_in_slice(self.data, self._shape,
 *                                           self._strides, self.ndim, False)
 */
    }

    /* "View.MemoryView":218
 *                 refcount_objects_in_slice(self.data, self._shape,
 *                                           self._strides, self.ndim, False)
 *             free(self.data)             # <<<<<<<<<<<<<<
 *         PyObject_Free(self._shape)
 * 
 */
    free(__pyx_v_self->data);

    /* "View.MemoryView":214
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 *         elif self.free_data:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape,
 */
  }
  __pyx_L3:;

  /* "View.MemoryView":219
 *                                           self._strides, self.ndim, False)
 *             free(self.data)
 *         PyObject_Free(self._shape)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  PyObject_Free(__pyx_v_self->_shape);

  /* "View.MemoryView":211
 *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
 * 
 *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "View.MemoryView":222
 * 
 *     @property
 *     def memview(self):             # <<<<<<<<<<<<<<
 *         return self.get_memview()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":223
 *     @property
 *     def memview(self):
 *         return self.get_memview()             # <<<<<<<<<<<<<<
 * 
 *     @cname('get_memview')
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":222
 * 
 *     @property
 *     def memview(self):             # <<<<<<<<<<<<<<
 *         return self.get_memview()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":226
 * 
 *     @cname('get_memview')
 *     cdef get_memview(self):             # <<<<<<<<<<<<<<
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
 *         return  memoryview(self, flags, self.dtype_is_object)
 */

static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("get_memview", 0);

  /* "View.MemoryView":227
 *     @cname('get_memview')
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE             # <<<<<<<<<<<<<<
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 */
  __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);

  /* "View.MemoryView":228
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
 *         return  memoryview(self, flags, self.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":226
 * 
 *     @cname('get_memview')
 *     cdef get_memview(self):             # <<<<<<<<<<<<<<
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
 *         return  memoryview(self, flags, self.dtype_is_object)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":230
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._shape[0]
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "View.MemoryView":231
 * 
 *     def __len__(self):
 *         return self._shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, attr):
 */
  __pyx_r = (__pyx_v_self->_shape[0]);
  goto __pyx_L0;

  /* "View.MemoryView":230
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._shape[0]
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":233
 *         return self._shape[0]
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.memview, attr)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "View.MemoryView":234
 * 
 *     def __getattr__(self, attr):
 *         return getattr(self.memview, attr)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, item):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":233
 *         return self._shape[0]
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.memview, attr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":236
 *         return getattr(self.memview, attr)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         return self.memview[item]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "View.MemoryView":237
 * 
 *     def __getitem__(self, item):
 *         return self.memview[item]             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, item, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":236
 *         return getattr(self.memview, attr)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         return self.memview[item]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":239
 *         return self.memview[item]
 * 
 *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
 *         self.memview[item] = value
 * 
 */

/* Python wrapper */
static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "View.MemoryView":240
 * 
 *     def __setitem__(self, item, value):
 *         self.memview[item] = value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(2, 240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "View.MemoryView":239
 *         return self.memview[item]
 * 
 *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
 *         self.memview[item] = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__191, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__192, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":244
 * 
 * @cname("__pyx_array_new")
 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format,             # <<<<<<<<<<<<<<
 *                           char *mode, char *buf):
 *     cdef array result
 */

static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) {
  struct __pyx_array_obj *__pyx_v_result = 0;
  struct __pyx_array_obj *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("array_cwrapper", 0);

  /* "View.MemoryView":248
 *     cdef array result
 * 
 *     if buf == NULL:             # <<<<<<<<<<<<<<
 *         result = array(shape, itemsize, format, mode.decode('ASCII'))
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_buf == NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":249
 * 
 *     if buf == NULL:
 *         result = array(shape, itemsize, format, mode.decode('ASCII'))             # <<<<<<<<<<<<<<
 *     else:
 *         result = array(shape, itemsize, format, mode.decode('ASCII'),
 */
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_shape);
    __Pyx_GIVEREF(__pyx_v_shape);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "View.MemoryView":248
 *     cdef array result
 * 
 *     if buf == NULL:             # <<<<<<<<<<<<<<
 *         result = array(shape, itemsize, format, mode.decode('ASCII'))
 *     else:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":251
 *         result = array(shape, itemsize, format, mode.decode('ASCII'))
 *     else:
 *         result = array(shape, itemsize, format, mode.decode('ASCII'),             # <<<<<<<<<<<<<<
 *                        allocate_buffer=False)
 *         result.data = buf
 */
  /*else*/ {
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_shape);
    __Pyx_GIVEREF(__pyx_v_shape);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_3 = 0;

    /* "View.MemoryView":252
 *     else:
 *         result = array(shape, itemsize, format, mode.decode('ASCII'),
 *                        allocate_buffer=False)             # <<<<<<<<<<<<<<
 *         result.data = buf
 * 
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(2, 252, __pyx_L1_error)

    /* "View.MemoryView":251
 *         result = array(shape, itemsize, format, mode.decode('ASCII'))
 *     else:
 *         result = array(shape, itemsize, format, mode.decode('ASCII'),             # <<<<<<<<<<<<<<
 *                        allocate_buffer=False)
 *         result.data = buf
 */
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "View.MemoryView":253
 *         result = array(shape, itemsize, format, mode.decode('ASCII'),
 *                        allocate_buffer=False)
 *         result.data = buf             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_v_result->data = __pyx_v_buf;
  }
  __pyx_L3:;

  /* "View.MemoryView":255
 *         result.data = buf
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "View.MemoryView":244
 * 
 * @cname("__pyx_array_new")
 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format,             # <<<<<<<<<<<<<<
 *                           char *mode, char *buf):
 *     cdef array result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":281
 * cdef class Enum(object):
 *     cdef object name
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(2, 281, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 281, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "View.MemoryView":282
 *     cdef object name
 *     def __init__(self, name):
 *         self.name = name             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         return self.name
 */
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_v_name;

  /* "View.MemoryView":281
 * cdef class Enum(object):
 *     cdef object name
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":283
 *     def __init__(self, name):
 *         self.name = name
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
 */

/* Python wrapper */
static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "View.MemoryView":284
 *         self.name = name
 *     def __repr__(self):
 *         return self.name             # <<<<<<<<<<<<<<
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

  /* "View.MemoryView":283
 *     def __init__(self, name):
 *         self.name = name
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.name,)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->name);
  __Pyx_GIVEREF(__pyx_v_self->name);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.name is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->name != Py_None);
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self.name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_184977713);
    __Pyx_GIVEREF(__pyx_int_184977713);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_184977713);
    __Pyx_GIVEREF(__pyx_int_184977713);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":298
 * 
 * @cname('__pyx_align_pointer')
 * cdef void *align_pointer(void *memory, size_t alignment) nogil:             # <<<<<<<<<<<<<<
 *     "Align pointer memory on a given boundary"
 *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
 */

static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {
  Py_intptr_t __pyx_v_aligned_p;
  size_t __pyx_v_offset;
  void *__pyx_r;
  int __pyx_t_1;

  /* "View.MemoryView":300
 * cdef void *align_pointer(void *memory, size_t alignment) nogil:
 *     "Align pointer memory on a given boundary"
 *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory             # <<<<<<<<<<<<<<
 *     cdef size_t offset
 * 
 */
  __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);

  /* "View.MemoryView":304
 * 
 *     with cython.cdivision(True):
 *         offset = aligned_p % alignment             # <<<<<<<<<<<<<<
 * 
 *     if offset > 0:
 */
  __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);

  /* "View.MemoryView":306
 *         offset = aligned_p % alignment
 * 
 *     if offset > 0:             # <<<<<<<<<<<<<<
 *         aligned_p += alignment - offset
 * 
 */
  __pyx_t_1 = ((__pyx_v_offset > 0) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":307
 * 
 *     if offset > 0:
 *         aligned_p += alignment - offset             # <<<<<<<<<<<<<<
 * 
 *     return <void *> aligned_p
 */
    __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));

    /* "View.MemoryView":306
 *         offset = aligned_p % alignment
 * 
 *     if offset > 0:             # <<<<<<<<<<<<<<
 *         aligned_p += alignment - offset
 * 
 */
  }

  /* "View.MemoryView":309
 *         aligned_p += alignment - offset
 * 
 *     return <void *> aligned_p             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((void *)__pyx_v_aligned_p);
  goto __pyx_L0;

  /* "View.MemoryView":298
 * 
 * @cname('__pyx_align_pointer')
 * cdef void *align_pointer(void *memory, size_t alignment) nogil:             # <<<<<<<<<<<<<<
 *     "Align pointer memory on a given boundary"
 *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":345
 *     cdef __Pyx_TypeInfo *typeinfo
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
 *         self.obj = obj
 *         self.flags = flags
 */

/* Python wrapper */
static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  int __pyx_v_flags;
  int __pyx_v_dtype_is_object;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(2, 345, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(2, 345, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_obj = values[0];
    __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 345, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 345, __pyx_L3_error)
    } else {
      __pyx_v_dtype_is_object = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 345, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "View.MemoryView":346
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
 *         self.obj = obj             # <<<<<<<<<<<<<<
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:
 */
  __Pyx_INCREF(__pyx_v_obj);
  __Pyx_GIVEREF(__pyx_v_obj);
  __Pyx_GOTREF(__pyx_v_self->obj);
  __Pyx_DECREF(__pyx_v_self->obj);
  __pyx_v_self->obj = __pyx_v_obj;

  /* "View.MemoryView":347
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
 *         self.obj = obj
 *         self.flags = flags             # <<<<<<<<<<<<<<
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 */
  __pyx_v_self->flags = __pyx_v_flags;

  /* "View.MemoryView":348
 *         self.obj = obj
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
 */
  __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_obj != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "View.MemoryView":349
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)             # <<<<<<<<<<<<<<
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 */
    __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 349, __pyx_L1_error)

    /* "View.MemoryView":350
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)
 */
    __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":351
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None             # <<<<<<<<<<<<<<
 *                 Py_INCREF(Py_None)
 * 
 */
      ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;

      /* "View.MemoryView":352
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *         global __pyx_memoryview_thread_locks_used
 */
      Py_INCREF(Py_None);

      /* "View.MemoryView":350
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)
 */
    }

    /* "View.MemoryView":348
 *         self.obj = obj
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
 */
  }

  /* "View.MemoryView":355
 * 
 *         global __pyx_memoryview_thread_locks_used
 *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:             # <<<<<<<<<<<<<<
 *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *             __pyx_memoryview_thread_locks_used += 1
 */
  __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":356
 *         global __pyx_memoryview_thread_locks_used
 *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
 *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]             # <<<<<<<<<<<<<<
 *             __pyx_memoryview_thread_locks_used += 1
 *         if self.lock is NULL:
 */
    __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);

    /* "View.MemoryView":357
 *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
 *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *             __pyx_memoryview_thread_locks_used += 1             # <<<<<<<<<<<<<<
 *         if self.lock is NULL:
 *             self.lock = PyThread_allocate_lock()
 */
    __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);

    /* "View.MemoryView":355
 * 
 *         global __pyx_memoryview_thread_locks_used
 *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:             # <<<<<<<<<<<<<<
 *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *             __pyx_memoryview_thread_locks_used += 1
 */
  }

  /* "View.MemoryView":358
 *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *             __pyx_memoryview_thread_locks_used += 1
 *         if self.lock is NULL:             # <<<<<<<<<<<<<<
 *             self.lock = PyThread_allocate_lock()
 *             if self.lock is NULL:
 */
  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":359
 *             __pyx_memoryview_thread_locks_used += 1
 *         if self.lock is NULL:
 *             self.lock = PyThread_allocate_lock()             # <<<<<<<<<<<<<<
 *             if self.lock is NULL:
 *                 raise MemoryError
 */
    __pyx_v_self->lock = PyThread_allocate_lock();

    /* "View.MemoryView":360
 *         if self.lock is NULL:
 *             self.lock = PyThread_allocate_lock()
 *             if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 * 
 */
    __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "View.MemoryView":361
 *             self.lock = PyThread_allocate_lock()
 *             if self.lock is NULL:
 *                 raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_FORMAT:
 */
      PyErr_NoMemory(); __PYX_ERR(2, 361, __pyx_L1_error)

      /* "View.MemoryView":360
 *         if self.lock is NULL:
 *             self.lock = PyThread_allocate_lock()
 *             if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 * 
 */
    }

    /* "View.MemoryView":358
 *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *             __pyx_memoryview_thread_locks_used += 1
 *         if self.lock is NULL:             # <<<<<<<<<<<<<<
 *             self.lock = PyThread_allocate_lock()
 *             if self.lock is NULL:
 */
  }

  /* "View.MemoryView":363
 *                 raise MemoryError
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":364
 * 
 *         if flags & PyBUF_FORMAT:
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')             # <<<<<<<<<<<<<<
 *         else:
 *             self.dtype_is_object = dtype_is_object
 */
    __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L11_bool_binop_done;
    }
    __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L11_bool_binop_done:;
    __pyx_v_self->dtype_is_object = __pyx_t_1;

    /* "View.MemoryView":363
 *                 raise MemoryError
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
 */
    goto __pyx_L10;
  }

  /* "View.MemoryView":366
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
 *             self.dtype_is_object = dtype_is_object             # <<<<<<<<<<<<<<
 * 
 *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
 */
  /*else*/ {
    __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
  }
  __pyx_L10:;

  /* "View.MemoryView":368
 *             self.dtype_is_object = dtype_is_object
 * 
 *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(             # <<<<<<<<<<<<<<
 *                   <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
 *         self.typeinfo = NULL
 */
  __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));

  /* "View.MemoryView":370
 *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
 *                   <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
 *         self.typeinfo = NULL             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(memoryview self):
 */
  __pyx_v_self->typeinfo = NULL;

  /* "View.MemoryView":345
 *     cdef __Pyx_TypeInfo *typeinfo
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
 *         self.obj = obj
 *         self.flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":372
 *         self.typeinfo = NULL
 * 
 *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)
 */

/* Python wrapper */
static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
  int __pyx_v_i;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyThread_type_lock __pyx_t_6;
  PyThread_type_lock __pyx_t_7;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "View.MemoryView":373
 * 
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_ReleaseBuffer(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 */
  __pyx_t_1 = (__pyx_v_self->obj != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":374
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)             # <<<<<<<<<<<<<<
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 * 
 */
    __Pyx_ReleaseBuffer((&__pyx_v_self->view));

    /* "View.MemoryView":373
 * 
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_ReleaseBuffer(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":375
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL
 */
  __pyx_t_2 = ((((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":377
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL             # <<<<<<<<<<<<<<
 *             Py_DECREF(Py_None)
 * 
 */
    ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;

    /* "View.MemoryView":378
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL
 *             Py_DECREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *         cdef int i
 */
    Py_DECREF(Py_None);

    /* "View.MemoryView":375
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL
 */
  }
  __pyx_L3:;

  /* "View.MemoryView":382
 *         cdef int i
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:             # <<<<<<<<<<<<<<
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 */
  __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":383
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:
 *             for i in range(__pyx_memoryview_thread_locks_used):             # <<<<<<<<<<<<<<
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 */
    __pyx_t_3 = __pyx_memoryview_thread_locks_used;
    __pyx_t_4 = __pyx_t_3;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "View.MemoryView":384
 *         if self.lock != NULL:
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
 */
      __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":385
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1             # <<<<<<<<<<<<<<
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 */
        __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);

        /* "View.MemoryView":386
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 */
        __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":388
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])             # <<<<<<<<<<<<<<
 *                     break
 *             else:
 */
          __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
          __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);

          /* "View.MemoryView":387
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (             # <<<<<<<<<<<<<<
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 *                     break
 */
          (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
          (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;

          /* "View.MemoryView":386
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 */
        }

        /* "View.MemoryView":389
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 *                     break             # <<<<<<<<<<<<<<
 *             else:
 *                 PyThread_free_lock(self.lock)
 */
        goto __pyx_L6_break;

        /* "View.MemoryView":384
 *         if self.lock != NULL:
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
 */
      }
    }
    /*else*/ {

      /* "View.MemoryView":391
 *                     break
 *             else:
 *                 PyThread_free_lock(self.lock)             # <<<<<<<<<<<<<<
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
 */
      PyThread_free_lock(__pyx_v_self->lock);
    }
    __pyx_L6_break:;

    /* "View.MemoryView":382
 *         cdef int i
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:             # <<<<<<<<<<<<<<
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 */
  }

  /* "View.MemoryView":372
 *         self.typeinfo = NULL
 * 
 *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "View.MemoryView":393
 *                 PyThread_free_lock(self.lock)
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf
 */

static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
  Py_ssize_t __pyx_v_dim;
  char *__pyx_v_itemp;
  PyObject *__pyx_v_idx = NULL;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  char *__pyx_t_7;
  __Pyx_RefNannySetupContext("get_item_pointer", 0);

  /* "View.MemoryView":395
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf             # <<<<<<<<<<<<<<
 * 
 *         for dim, idx in enumerate(index):
 */
  __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);

  /* "View.MemoryView":397
 *         cdef char *itemp = <char *> self.view.buf
 * 
 *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
 */
  __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
    __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 397, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(2, 397, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(2, 397, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(2, 397, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_v_dim = __pyx_t_1;
    __pyx_t_1 = (__pyx_t_1 + 1);

    /* "View.MemoryView":398
 * 
 *         for dim, idx in enumerate(index):
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)             # <<<<<<<<<<<<<<
 * 
 *         return itemp
 */
    __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 398, __pyx_L1_error)
    __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(2, 398, __pyx_L1_error)
    __pyx_v_itemp = __pyx_t_7;

    /* "View.MemoryView":397
 *         cdef char *itemp = <char *> self.view.buf
 * 
 *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":400
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
 *         return itemp             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_itemp;
  goto __pyx_L0;

  /* "View.MemoryView":393
 *                 PyThread_free_lock(self.lock)
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":403
 * 
 * 
 *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
 *         if index is Ellipsis:
 *             return self
 */

/* Python wrapper */
static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_have_slices = NULL;
  PyObject *__pyx_v_indices = NULL;
  char *__pyx_v_itemp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  char *__pyx_t_6;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "View.MemoryView":404
 * 
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:             # <<<<<<<<<<<<<<
 *             return self
 * 
 */
  __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":405
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:
 *             return self             # <<<<<<<<<<<<<<
 * 
 *         have_slices, indices = _unellipsify(index, self.view.ndim)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __pyx_r = ((PyObject *)__pyx_v_self);
    goto __pyx_L0;

    /* "View.MemoryView":404
 * 
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:             # <<<<<<<<<<<<<<
 *             return self
 * 
 */
  }

  /* "View.MemoryView":407
 *             return self
 * 
 *         have_slices, indices = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *         cdef char *itemp
 */
  __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (likely(__pyx_t_3 != Py_None)) {
    PyObject* sequence = __pyx_t_3;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 407, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
    __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 407, __pyx_L1_error)
  }
  __pyx_v_have_slices = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_indices = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "View.MemoryView":410
 * 
 *         cdef char *itemp
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             return memview_slice(self, indices)
 *         else:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 410, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "View.MemoryView":411
 *         cdef char *itemp
 *         if have_slices:
 *             return memview_slice(self, indices)             # <<<<<<<<<<<<<<
 *         else:
 *             itemp = self.get_item_pointer(indices)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":410
 * 
 *         cdef char *itemp
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             return memview_slice(self, indices)
 *         else:
 */
  }

  /* "View.MemoryView":413
 *             return memview_slice(self, indices)
 *         else:
 *             itemp = self.get_item_pointer(indices)             # <<<<<<<<<<<<<<
 *             return self.convert_item_to_object(itemp)
 * 
 */
  /*else*/ {
    __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(2, 413, __pyx_L1_error)
    __pyx_v_itemp = __pyx_t_6;

    /* "View.MemoryView":414
 *         else:
 *             itemp = self.get_item_pointer(indices)
 *             return self.convert_item_to_object(itemp)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(memoryview self, object index, object value):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":403
 * 
 * 
 *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
 *         if index is Ellipsis:
 *             return self
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_have_slices);
  __Pyx_XDECREF(__pyx_v_indices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":416
 *             return self.convert_item_to_object(itemp)
 * 
 *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
 *         if self.view.readonly:
 *             raise TypeError("Cannot assign to read-only memoryview")
 */

/* Python wrapper */
static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_have_slices = NULL;
  PyObject *__pyx_v_obj = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__setitem__", 0);
  __Pyx_INCREF(__pyx_v_index);

  /* "View.MemoryView":417
 * 
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise TypeError("Cannot assign to read-only memoryview")
 * 
 */
  __pyx_t_1 = (__pyx_v_self->view.readonly != 0);
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":418
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:
 *             raise TypeError("Cannot assign to read-only memoryview")             # <<<<<<<<<<<<<<
 * 
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__193, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(2, 418, __pyx_L1_error)

    /* "View.MemoryView":417
 * 
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise TypeError("Cannot assign to read-only memoryview")
 * 
 */
  }

  /* "View.MemoryView":420
 *             raise TypeError("Cannot assign to read-only memoryview")
 * 
 *         have_slices, index = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *         if have_slices:
 */
  __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(__pyx_t_2 != Py_None)) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 420, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
    __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 420, __pyx_L1_error)
  }
  __pyx_v_have_slices = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":422
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 * 
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             obj = self.is_slice(value)
 *             if obj:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 422, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "View.MemoryView":423
 * 
 *         if have_slices:
 *             obj = self.is_slice(value)             # <<<<<<<<<<<<<<
 *             if obj:
 *                 self.setitem_slice_assignment(self[index], obj)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_obj = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "View.MemoryView":424
 *         if have_slices:
 *             obj = self.is_slice(value)
 *             if obj:             # <<<<<<<<<<<<<<
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 424, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "View.MemoryView":425
 *             obj = self.is_slice(value)
 *             if obj:
 *                 self.setitem_slice_assignment(self[index], obj)             # <<<<<<<<<<<<<<
 *             else:
 *                 self.setitem_slice_assign_scalar(self[index], value)
 */
      __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 425, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 425, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "View.MemoryView":424
 *         if have_slices:
 *             obj = self.is_slice(value)
 *             if obj:             # <<<<<<<<<<<<<<
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
 */
      goto __pyx_L5;
    }

    /* "View.MemoryView":427
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
 *                 self.setitem_slice_assign_scalar(self[index], value)             # <<<<<<<<<<<<<<
 *         else:
 *             self.setitem_indexed(index, value)
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 427, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(2, 427, __pyx_L1_error)
      __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 427, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L5:;

    /* "View.MemoryView":422
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 * 
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             obj = self.is_slice(value)
 *             if obj:
 */
    goto __pyx_L4;
  }

  /* "View.MemoryView":429
 *                 self.setitem_slice_assign_scalar(self[index], value)
 *         else:
 *             self.setitem_indexed(index, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef is_slice(self, obj):
 */
  /*else*/ {
    __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "View.MemoryView":416
 *             return self.convert_item_to_object(itemp)
 * 
 *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
 *         if self.view.readonly:
 *             raise TypeError("Cannot assign to read-only memoryview")
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_have_slices);
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":431
 *             self.setitem_indexed(index, value)
 * 
 *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, memoryview):
 *             try:
 */

static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  __Pyx_RefNannySetupContext("is_slice", 0);
  __Pyx_INCREF(__pyx_v_obj);

  /* "View.MemoryView":432
 * 
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":433
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "View.MemoryView":434
 *         if not isinstance(obj, memoryview):
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
 *                                  self.dtype_is_object)
 *             except TypeError:
 */
        __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 434, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_6);

        /* "View.MemoryView":435
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)             # <<<<<<<<<<<<<<
 *             except TypeError:
 *                 return None
 */
        __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 435, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);

        /* "View.MemoryView":434
 *         if not isinstance(obj, memoryview):
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
 *                                  self.dtype_is_object)
 *             except TypeError:
 */
        __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 434, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_obj);
        __Pyx_GIVEREF(__pyx_v_obj);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
        __pyx_t_6 = 0;
        __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 434, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "View.MemoryView":433
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 */
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "View.MemoryView":436
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 *             except TypeError:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(2, 436, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_6);

        /* "View.MemoryView":437
 *                                  self.dtype_is_object)
 *             except TypeError:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *         return obj
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_except_return;
      }
      goto __pyx_L6_except_error;
      __pyx_L6_except_error:;

      /* "View.MemoryView":433
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 */
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L7_except_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L0;
      __pyx_L9_try_end:;
    }

    /* "View.MemoryView":432
 * 
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 */
  }

  /* "View.MemoryView":439
 *                 return None
 * 
 *         return obj             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_slice_assignment(self, dst, src):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "View.MemoryView":431
 *             self.setitem_indexed(index, value)
 * 
 *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, memoryview):
 *             try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":441
 *         return obj
 * 
 *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice dst_slice
 *         cdef __Pyx_memviewslice src_slice
 */

static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
  __Pyx_memviewslice __pyx_v_dst_slice;
  __Pyx_memviewslice __pyx_v_src_slice;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  __Pyx_memviewslice *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);

  /* "View.MemoryView":445
 *         cdef __Pyx_memviewslice src_slice
 * 
 *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],             # <<<<<<<<<<<<<<
 *                                  get_slice_from_memview(dst, &dst_slice)[0],
 *                                  src.ndim, dst.ndim, self.dtype_is_object)
 */
  if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(2, 445, __pyx_L1_error)
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(2, 445, __pyx_L1_error)

  /* "View.MemoryView":446
 * 
 *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
 *                                  get_slice_from_memview(dst, &dst_slice)[0],             # <<<<<<<<<<<<<<
 *                                  src.ndim, dst.ndim, self.dtype_is_object)
 * 
 */
  if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(2, 446, __pyx_L1_error)
  __pyx_t_2 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_2 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(2, 446, __pyx_L1_error)

  /* "View.MemoryView":447
 *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
 *                                  get_slice_from_memview(dst, &dst_slice)[0],
 *                                  src.ndim, dst.ndim, self.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "View.MemoryView":445
 *         cdef __Pyx_memviewslice src_slice
 * 
 *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],             # <<<<<<<<<<<<<<
 *                                  get_slice_from_memview(dst, &dst_slice)[0],
 *                                  src.ndim, dst.ndim, self.dtype_is_object)
 */
  __pyx_t_6 = __pyx_memoryview_copy_contents((__pyx_t_1[0]), (__pyx_t_2[0]), __pyx_t_4, __pyx_t_5, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 445, __pyx_L1_error)

  /* "View.MemoryView":441
 *         return obj
 * 
 *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice dst_slice
 *         cdef __Pyx_memviewslice src_slice
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":449
 *                                  src.ndim, dst.ndim, self.dtype_is_object)
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
 *         cdef int array[128]
 *         cdef void *tmp = NULL
 */

static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
  int __pyx_v_array[0x80];
  void *__pyx_v_tmp;
  void *__pyx_v_item;
  __Pyx_memviewslice *__pyx_v_dst_slice;
  __Pyx_memviewslice __pyx_v_tmp_slice;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);

  /* "View.MemoryView":451
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
 *         cdef int array[128]
 *         cdef void *tmp = NULL             # <<<<<<<<<<<<<<
 *         cdef void *item
 * 
 */
  __pyx_v_tmp = NULL;

  /* "View.MemoryView":456
 *         cdef __Pyx_memviewslice *dst_slice
 *         cdef __Pyx_memviewslice tmp_slice
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)             # <<<<<<<<<<<<<<
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):
 */
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(2, 456, __pyx_L1_error)
  __pyx_v_dst_slice = __pyx_t_1;

  /* "View.MemoryView":458
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
 */
  __pyx_t_2 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":459
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)             # <<<<<<<<<<<<<<
 *             if tmp == NULL:
 *                 raise MemoryError
 */
    __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);

    /* "View.MemoryView":460
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 *             item = tmp
 */
    __pyx_t_2 = ((__pyx_v_tmp == NULL) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "View.MemoryView":461
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
 *                 raise MemoryError             # <<<<<<<<<<<<<<
 *             item = tmp
 *         else:
 */
      PyErr_NoMemory(); __PYX_ERR(2, 461, __pyx_L1_error)

      /* "View.MemoryView":460
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 *             item = tmp
 */
    }

    /* "View.MemoryView":462
 *             if tmp == NULL:
 *                 raise MemoryError
 *             item = tmp             # <<<<<<<<<<<<<<
 *         else:
 *             item = <void *> array
 */
    __pyx_v_item = __pyx_v_tmp;

    /* "View.MemoryView":458
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":464
 *             item = tmp
 *         else:
 *             item = <void *> array             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  /*else*/ {
    __pyx_v_item = ((void *)__pyx_v_array);
  }
  __pyx_L3:;

  /* "View.MemoryView":466
 *             item = <void *> array
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 (<PyObject **> item)[0] = <PyObject *> value
 */
  /*try:*/ {

    /* "View.MemoryView":467
 * 
 *         try:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
 */
    __pyx_t_2 = (__pyx_v_self->dtype_is_object != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":468
 *         try:
 *             if self.dtype_is_object:
 *                 (<PyObject **> item)[0] = <PyObject *> value             # <<<<<<<<<<<<<<
 *             else:
 *                 self.assign_item_from_object(<char *> item, value)
 */
      (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);

      /* "View.MemoryView":467
 * 
 *         try:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
 */
      goto __pyx_L8;
    }

    /* "View.MemoryView":470
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
 *                 self.assign_item_from_object(<char *> item, value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    /*else*/ {
      __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 470, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_L8:;

    /* "View.MemoryView":474
 * 
 * 
 *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
 */
    __pyx_t_2 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":475
 * 
 *             if self.view.suboffsets != NULL:
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)             # <<<<<<<<<<<<<<
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
 *                                 item, self.dtype_is_object)
 */
      __pyx_t_3 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 475, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "View.MemoryView":474
 * 
 * 
 *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
 */
    }

    /* "View.MemoryView":476
 *             if self.view.suboffsets != NULL:
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,             # <<<<<<<<<<<<<<
 *                                 item, self.dtype_is_object)
 *         finally:
 */
    __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
  }

  /* "View.MemoryView":479
 *                                 item, self.dtype_is_object)
 *         finally:
 *             PyMem_Free(tmp)             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_indexed(self, index, value):
 */
  /*finally:*/ {
    /*normal exit:*/{
      PyMem_Free(__pyx_v_tmp);
      goto __pyx_L7;
    }
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
      {
        PyMem_Free(__pyx_v_tmp);
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
      __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
      goto __pyx_L1_error;
    }
    __pyx_L7:;
  }

  /* "View.MemoryView":449
 *                                  src.ndim, dst.ndim, self.dtype_is_object)
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
 *         cdef int array[128]
 *         cdef void *tmp = NULL
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":481
 *             PyMem_Free(tmp)
 * 
 *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)
 */

static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  char *__pyx_v_itemp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("setitem_indexed", 0);

  /* "View.MemoryView":482
 * 
 *     cdef setitem_indexed(self, index, value):
 *         cdef char *itemp = self.get_item_pointer(index)             # <<<<<<<<<<<<<<
 *         self.assign_item_from_object(itemp, value)
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(2, 482, __pyx_L1_error)
  __pyx_v_itemp = __pyx_t_1;

  /* "View.MemoryView":483
 *     cdef setitem_indexed(self, index, value):
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":481
 *             PyMem_Free(tmp)
 * 
 *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":485
 *         self.assign_item_from_object(itemp, value)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
  PyObject *__pyx_v_struct = NULL;
  PyObject *__pyx_v_bytesitem = 0;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("convert_item_to_object", 0);

  /* "View.MemoryView":488
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 *         import struct             # <<<<<<<<<<<<<<
 *         cdef bytes bytesitem
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_struct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "View.MemoryView":491
 *         cdef bytes bytesitem
 * 
 *         bytesitem = itemp[:self.view.itemsize]             # <<<<<<<<<<<<<<
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)
 */
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":492
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "View.MemoryView":493
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)             # <<<<<<<<<<<<<<
 *         except struct.error:
 *             raise ValueError("Unable to convert item to object")
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 493, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 493, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 493, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 493, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 493, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
        __Pyx_INCREF(__pyx_v_bytesitem);
        __Pyx_GIVEREF(__pyx_v_bytesitem);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 493, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_result = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "View.MemoryView":492
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 */
    }

    /* "View.MemoryView":497
 *             raise ValueError("Unable to convert item to object")
 *         else:
 *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
 *                 return result[0]
 *             return result
 */
    /*else:*/ {
      __pyx_t_10 = strlen(__pyx_v_self->view.format); 
      __pyx_t_11 = ((__pyx_t_10 == 1) != 0);
      if (__pyx_t_11) {

        /* "View.MemoryView":498
 *         else:
 *             if len(self.view.format) == 1:
 *                 return result[0]             # <<<<<<<<<<<<<<
 *             return result
 * 
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 498, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L6_except_return;

        /* "View.MemoryView":497
 *             raise ValueError("Unable to convert item to object")
 *         else:
 *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
 *                 return result[0]
 *             return result
 */
      }

      /* "View.MemoryView":499
 *             if len(self.view.format) == 1:
 *                 return result[0]
 *             return result             # <<<<<<<<<<<<<<
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L6_except_return;
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "View.MemoryView":494
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:             # <<<<<<<<<<<<<<
 *             raise ValueError("Unable to convert item to object")
 *         else:
 */
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 494, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);
    __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
    if (__pyx_t_8) {
      __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(2, 494, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_1);

      /* "View.MemoryView":495
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 *             raise ValueError("Unable to convert item to object")             # <<<<<<<<<<<<<<
 *         else:
 *             if len(self.view.format) == 1:
 */
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__194, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 495, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(2, 495, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "View.MemoryView":492
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 */
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "View.MemoryView":485
 *         self.assign_item_from_object(itemp, value)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_struct);
  __Pyx_XDECREF(__pyx_v_bytesitem);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":501
 *             return result
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_struct = NULL;
  char __pyx_v_c;
  PyObject *__pyx_v_bytesvalue = 0;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  char *__pyx_t_11;
  char *__pyx_t_12;
  char *__pyx_t_13;
  char *__pyx_t_14;
  __Pyx_RefNannySetupContext("assign_item_from_object", 0);

  /* "View.MemoryView":504
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 *         import struct             # <<<<<<<<<<<<<<
 *         cdef char c
 *         cdef bytes bytesvalue
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_struct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "View.MemoryView":509
 *         cdef Py_ssize_t i
 * 
 *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
 */
  __pyx_t_2 = PyTuple_Check(__pyx_v_value); 
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "View.MemoryView":510
 * 
 *         if isinstance(value, tuple):
 *             bytesvalue = struct.pack(self.view.format, *value)             # <<<<<<<<<<<<<<
 *         else:
 *             bytesvalue = struct.pack(self.view.format, value)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 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 = 0;
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(2, 510, __pyx_L1_error)
    __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "View.MemoryView":509
 *         cdef Py_ssize_t i
 * 
 *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":512
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
 *             bytesvalue = struct.pack(self.view.format, value)             # <<<<<<<<<<<<<<
 * 
 *         for i, c in enumerate(bytesvalue):
 */
  /*else*/ {
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 512, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 512, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 512, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
      __pyx_t_1 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 512, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(2, 512, __pyx_L1_error)
    __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "View.MemoryView":514
 *             bytesvalue = struct.pack(self.view.format, value)
 * 
 *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
 *             itemp[i] = c
 * 
 */
  __pyx_t_9 = 0;
  if (unlikely(__pyx_v_bytesvalue == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    __PYX_ERR(2, 514, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_bytesvalue);
  __pyx_t_10 = __pyx_v_bytesvalue;
  __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10);
  __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10));
  for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
    __pyx_t_11 = __pyx_t_14;
    __pyx_v_c = (__pyx_t_11[0]);

    /* "View.MemoryView":515
 * 
 *         for i, c in enumerate(bytesvalue):
 *             itemp[i] = c             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
 */
    __pyx_v_i = __pyx_t_9;

    /* "View.MemoryView":514
 *             bytesvalue = struct.pack(self.view.format, value)
 * 
 *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
 *             itemp[i] = c
 * 
 */
    __pyx_t_9 = (__pyx_t_9 + 1);

    /* "View.MemoryView":515
 * 
 *         for i, c in enumerate(bytesvalue):
 *             itemp[i] = c             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
 */
    (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "View.MemoryView":501
 *             return result
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_struct);
  __Pyx_XDECREF(__pyx_v_bytesvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":518
 * 
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t *__pyx_t_4;
  char *__pyx_t_5;
  void *__pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  if (__pyx_v_info == NULL) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "View.MemoryView":519
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 * 
 */
  __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->view.readonly != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":520
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_ND:
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__195, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 520, __pyx_L1_error)

    /* "View.MemoryView":519
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 * 
 */
  }

  /* "View.MemoryView":522
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 * 
 *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
 *             info.shape = self.view.shape
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":523
 * 
 *         if flags & PyBUF_ND:
 *             info.shape = self.view.shape             # <<<<<<<<<<<<<<
 *         else:
 *             info.shape = NULL
 */
    __pyx_t_4 = __pyx_v_self->view.shape;
    __pyx_v_info->shape = __pyx_t_4;

    /* "View.MemoryView":522
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 * 
 *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
 *             info.shape = self.view.shape
 *         else:
 */
    goto __pyx_L6;
  }

  /* "View.MemoryView":525
 *             info.shape = self.view.shape
 *         else:
 *             info.shape = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_STRIDES:
 */
  /*else*/ {
    __pyx_v_info->shape = NULL;
  }
  __pyx_L6:;

  /* "View.MemoryView":527
 *             info.shape = NULL
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.strides = self.view.strides
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":528
 * 
 *         if flags & PyBUF_STRIDES:
 *             info.strides = self.view.strides             # <<<<<<<<<<<<<<
 *         else:
 *             info.strides = NULL
 */
    __pyx_t_4 = __pyx_v_self->view.strides;
    __pyx_v_info->strides = __pyx_t_4;

    /* "View.MemoryView":527
 *             info.shape = NULL
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.strides = self.view.strides
 *         else:
 */
    goto __pyx_L7;
  }

  /* "View.MemoryView":530
 *             info.strides = self.view.strides
 *         else:
 *             info.strides = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_INDIRECT:
 */
  /*else*/ {
    __pyx_v_info->strides = NULL;
  }
  __pyx_L7:;

  /* "View.MemoryView":532
 *             info.strides = NULL
 * 
 *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
 *             info.suboffsets = self.view.suboffsets
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":533
 * 
 *         if flags & PyBUF_INDIRECT:
 *             info.suboffsets = self.view.suboffsets             # <<<<<<<<<<<<<<
 *         else:
 *             info.suboffsets = NULL
 */
    __pyx_t_4 = __pyx_v_self->view.suboffsets;
    __pyx_v_info->suboffsets = __pyx_t_4;

    /* "View.MemoryView":532
 *             info.strides = NULL
 * 
 *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
 *             info.suboffsets = self.view.suboffsets
 *         else:
 */
    goto __pyx_L8;
  }

  /* "View.MemoryView":535
 *             info.suboffsets = self.view.suboffsets
 *         else:
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_FORMAT:
 */
  /*else*/ {
    __pyx_v_info->suboffsets = NULL;
  }
  __pyx_L8:;

  /* "View.MemoryView":537
 *             info.suboffsets = NULL
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.view.format
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":538
 * 
 *         if flags & PyBUF_FORMAT:
 *             info.format = self.view.format             # <<<<<<<<<<<<<<
 *         else:
 *             info.format = NULL
 */
    __pyx_t_5 = __pyx_v_self->view.format;
    __pyx_v_info->format = __pyx_t_5;

    /* "View.MemoryView":537
 *             info.suboffsets = NULL
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.view.format
 *         else:
 */
    goto __pyx_L9;
  }

  /* "View.MemoryView":540
 *             info.format = self.view.format
 *         else:
 *             info.format = NULL             # <<<<<<<<<<<<<<
 * 
 *         info.buf = self.view.buf
 */
  /*else*/ {
    __pyx_v_info->format = NULL;
  }
  __pyx_L9:;

  /* "View.MemoryView":542
 *             info.format = NULL
 * 
 *         info.buf = self.view.buf             # <<<<<<<<<<<<<<
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize
 */
  __pyx_t_6 = __pyx_v_self->view.buf;
  __pyx_v_info->buf = __pyx_t_6;

  /* "View.MemoryView":543
 * 
 *         info.buf = self.view.buf
 *         info.ndim = self.view.ndim             # <<<<<<<<<<<<<<
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len
 */
  __pyx_t_7 = __pyx_v_self->view.ndim;
  __pyx_v_info->ndim = __pyx_t_7;

  /* "View.MemoryView":544
 *         info.buf = self.view.buf
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize             # <<<<<<<<<<<<<<
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly
 */
  __pyx_t_8 = __pyx_v_self->view.itemsize;
  __pyx_v_info->itemsize = __pyx_t_8;

  /* "View.MemoryView":545
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len             # <<<<<<<<<<<<<<
 *         info.readonly = self.view.readonly
 *         info.obj = self
 */
  __pyx_t_8 = __pyx_v_self->view.len;
  __pyx_v_info->len = __pyx_t_8;

  /* "View.MemoryView":546
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly             # <<<<<<<<<<<<<<
 *         info.obj = self
 * 
 */
  __pyx_t_1 = __pyx_v_self->view.readonly;
  __pyx_v_info->readonly = __pyx_t_1;

  /* "View.MemoryView":547
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly
 *         info.obj = self             # <<<<<<<<<<<<<<
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_info->obj);
  __Pyx_DECREF(__pyx_v_info->obj);
  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);

  /* "View.MemoryView":518
 * 
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":553
 * 
 *     @property
 *     def T(self):             # <<<<<<<<<<<<<<
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":554
 *     @property
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)             # <<<<<<<<<<<<<<
 *         transpose_memslice(&result.from_slice)
 *         return result
 */
  __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(2, 554, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":555
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(2, 555, __pyx_L1_error)

  /* "View.MemoryView":556
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":553
 * 
 *     @property
 *     def T(self):             # <<<<<<<<<<<<<<
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":559
 * 
 *     @property
 *     def base(self):             # <<<<<<<<<<<<<<
 *         return self.obj
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":560
 *     @property
 *     def base(self):
 *         return self.obj             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->obj);
  __pyx_r = __pyx_v_self->obj;
  goto __pyx_L0;

  /* "View.MemoryView":559
 * 
 *     @property
 *     def base(self):             # <<<<<<<<<<<<<<
 *         return self.obj
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":563
 * 
 *     @property
 *     def shape(self):             # <<<<<<<<<<<<<<
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":564
 *     @property
 *     def shape(self):
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
  for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
    __pyx_t_2 = __pyx_t_4;
    __pyx_v_length = (__pyx_t_2[0]);
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(2, 564, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":563
 * 
 *     @property
 *     def shape(self):             # <<<<<<<<<<<<<<
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":567
 * 
 *     @property
 *     def strides(self):             # <<<<<<<<<<<<<<
 *         if self.view.strides == NULL:
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_v_stride;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":568
 *     @property
 *     def strides(self):
 *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
 * 
 *             raise ValueError("Buffer view does not expose strides")
 */
  __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":570
 *         if self.view.strides == NULL:
 * 
 *             raise ValueError("Buffer view does not expose strides")             # <<<<<<<<<<<<<<
 * 
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__196, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(2, 570, __pyx_L1_error)

    /* "View.MemoryView":568
 *     @property
 *     def strides(self):
 *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
 * 
 *             raise ValueError("Buffer view does not expose strides")
 */
  }

  /* "View.MemoryView":572
 *             raise ValueError("Buffer view does not expose strides")
 * 
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
  for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
    __pyx_t_3 = __pyx_t_5;
    __pyx_v_stride = (__pyx_t_3[0]);
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(2, 572, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":567
 * 
 *     @property
 *     def strides(self):             # <<<<<<<<<<<<<<
 *         if self.view.strides == NULL:
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":575
 * 
 *     @property
 *     def suboffsets(self):             # <<<<<<<<<<<<<<
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_v_suboffset;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t *__pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  Py_ssize_t *__pyx_t_6;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":576
 *     @property
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
 *             return (-1,) * self.view.ndim
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":577
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__197, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":576
 *     @property
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
 *             return (-1,) * self.view.ndim
 * 
 */
  }

  /* "View.MemoryView":579
 *             return (-1,) * self.view.ndim
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
  for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
    __pyx_t_4 = __pyx_t_6;
    __pyx_v_suboffset = (__pyx_t_4[0]);
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(2, 579, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":575
 * 
 *     @property
 *     def suboffsets(self):             # <<<<<<<<<<<<<<
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":582
 * 
 *     @property
 *     def ndim(self):             # <<<<<<<<<<<<<<
 *         return self.view.ndim
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":583
 *     @property
 *     def ndim(self):
 *         return self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":582
 * 
 *     @property
 *     def ndim(self):             # <<<<<<<<<<<<<<
 *         return self.view.ndim
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":586
 * 
 *     @property
 *     def itemsize(self):             # <<<<<<<<<<<<<<
 *         return self.view.itemsize
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":587
 *     @property
 *     def itemsize(self):
 *         return self.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":586
 * 
 *     @property
 *     def itemsize(self):             # <<<<<<<<<<<<<<
 *         return self.view.itemsize
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":590
 * 
 *     @property
 *     def nbytes(self):             # <<<<<<<<<<<<<<
 *         return self.size * self.view.itemsize
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":591
 *     @property
 *     def nbytes(self):
 *         return self.size * self.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":590
 * 
 *     @property
 *     def nbytes(self):             # <<<<<<<<<<<<<<
 *         return self.size * self.view.itemsize
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":594
 * 
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         if self._size is None:
 *             result = 1
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":595
 *     @property
 *     def size(self):
 *         if self._size is None:             # <<<<<<<<<<<<<<
 *             result = 1
 * 
 */
  __pyx_t_1 = (__pyx_v_self->_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":596
 *     def size(self):
 *         if self._size is None:
 *             result = 1             # <<<<<<<<<<<<<<
 * 
 *             for length in self.view.shape[:self.view.ndim]:
 */
    __Pyx_INCREF(__pyx_int_1);
    __pyx_v_result = __pyx_int_1;

    /* "View.MemoryView":598
 *             result = 1
 * 
 *             for length in self.view.shape[:self.view.ndim]:             # <<<<<<<<<<<<<<
 *                 result *= length
 * 
 */
    __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
    for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
      __pyx_t_3 = __pyx_t_5;
      __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "View.MemoryView":599
 * 
 *             for length in self.view.shape[:self.view.ndim]:
 *                 result *= length             # <<<<<<<<<<<<<<
 * 
 *             self._size = result
 */
      __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 599, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
      __pyx_t_6 = 0;
    }

    /* "View.MemoryView":601
 *                 result *= length
 * 
 *             self._size = result             # <<<<<<<<<<<<<<
 * 
 *         return self._size
 */
    __Pyx_INCREF(__pyx_v_result);
    __Pyx_GIVEREF(__pyx_v_result);
    __Pyx_GOTREF(__pyx_v_self->_size);
    __Pyx_DECREF(__pyx_v_self->_size);
    __pyx_v_self->_size = __pyx_v_result;

    /* "View.MemoryView":595
 *     @property
 *     def size(self):
 *         if self._size is None:             # <<<<<<<<<<<<<<
 *             result = 1
 * 
 */
  }

  /* "View.MemoryView":603
 *             self._size = result
 * 
 *         return self._size             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_size);
  __pyx_r = __pyx_v_self->_size;
  goto __pyx_L0;

  /* "View.MemoryView":594
 * 
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         if self._size is None:
 *             result = 1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":605
 *         return self._size
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]
 */

/* Python wrapper */
static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "View.MemoryView":606
 * 
 *     def __len__(self):
 *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
 *             return self.view.shape[0]
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":607
 *     def __len__(self):
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]             # <<<<<<<<<<<<<<
 * 
 *         return 0
 */
    __pyx_r = (__pyx_v_self->view.shape[0]);
    goto __pyx_L0;

    /* "View.MemoryView":606
 * 
 *     def __len__(self):
 *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
 *             return self.view.shape[0]
 * 
 */
  }

  /* "View.MemoryView":609
 *             return self.view.shape[0]
 * 
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":605
 *         return self._size
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":611
 *         return 0
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))
 */

/* Python wrapper */
static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "View.MemoryView":612
 * 
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
 *                                                id(self))
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":613
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "View.MemoryView":612
 * 
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
 *                                                id(self))
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":611
 *         return 0
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":615
 *                                                id(self))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "View.MemoryView":616
 * 
 *     def __str__(self):
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":615
 *                                                id(self))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":619
 * 
 * 
 *     def is_c_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice *__pyx_v_mslice;
  __Pyx_memviewslice __pyx_v_tmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("is_c_contig", 0);

  /* "View.MemoryView":622
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 */
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(2, 622, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":623
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *     def is_f_contig(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":619
 * 
 * 
 *     def is_c_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":625
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 *     def is_f_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice *__pyx_v_mslice;
  __Pyx_memviewslice __pyx_v_tmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("is_f_contig", 0);

  /* "View.MemoryView":628
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 */
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(2, 628, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":629
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *     def copy(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":625
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 *     def is_f_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":631
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice __pyx_v_mslice;
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("copy", 0);

  /* "View.MemoryView":633
 *     def copy(self):
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS             # <<<<<<<<<<<<<<
 * 
 *         slice_copy(self, &mslice)
 */
  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));

  /* "View.MemoryView":635
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
 * 
 *         slice_copy(self, &mslice)             # <<<<<<<<<<<<<<
 *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
 *                                    self.view.itemsize,
 */
  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));

  /* "View.MemoryView":636
 * 
 *         slice_copy(self, &mslice)
 *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,             # <<<<<<<<<<<<<<
 *                                    self.view.itemsize,
 *                                    flags|PyBUF_C_CONTIGUOUS,
 */
  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 636, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":641
 *                                    self.dtype_is_object)
 * 
 *         return memoryview_copy_from_slice(self, &mslice)             # <<<<<<<<<<<<<<
 * 
 *     def copy_fortran(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":631
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":643
 *         return memoryview_copy_from_slice(self, &mslice)
 * 
 *     def copy_fortran(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice __pyx_v_src;
  __Pyx_memviewslice __pyx_v_dst;
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("copy_fortran", 0);

  /* "View.MemoryView":645
 *     def copy_fortran(self):
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS             # <<<<<<<<<<<<<<
 * 
 *         slice_copy(self, &src)
 */
  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));

  /* "View.MemoryView":647
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
 * 
 *         slice_copy(self, &src)             # <<<<<<<<<<<<<<
 *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,
 *                                 self.view.itemsize,
 */
  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));

  /* "View.MemoryView":648
 * 
 *         slice_copy(self, &src)
 *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,             # <<<<<<<<<<<<<<
 *                                 self.view.itemsize,
 *                                 flags|PyBUF_F_CONTIGUOUS,
 */
  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 648, __pyx_L1_error)
  __pyx_v_dst = __pyx_t_1;

  /* "View.MemoryView":653
 *                                 self.dtype_is_object)
 * 
 *         return memoryview_copy_from_slice(self, &dst)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":643
 *         return memoryview_copy_from_slice(self, &mslice)
 * 
 *     def copy_fortran(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__198, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__199, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":657
 * 
 * @cname('__pyx_memoryview_new')
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo
 */

static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
  struct __pyx_memoryview_obj *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);

  /* "View.MemoryView":658
 * @cname('__pyx_memoryview_new')
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)             # <<<<<<<<<<<<<<
 *     result.typeinfo = typeinfo
 *     return result
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_o);
  __Pyx_GIVEREF(__pyx_v_o);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "View.MemoryView":659
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_v_result->typeinfo = __pyx_v_typeinfo;

  /* "View.MemoryView":660
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_check')
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":657
 * 
 * @cname('__pyx_memoryview_new')
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":663
 * 
 * @cname('__pyx_memoryview_check')
 * cdef inline bint memoryview_check(object o):             # <<<<<<<<<<<<<<
 *     return isinstance(o, memoryview)
 * 
 */

static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("memoryview_check", 0);

  /* "View.MemoryView":664
 * @cname('__pyx_memoryview_check')
 * cdef inline bint memoryview_check(object o):
 *     return isinstance(o, memoryview)             # <<<<<<<<<<<<<<
 * 
 * cdef tuple _unellipsify(object index, int ndim):
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type); 
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "View.MemoryView":663
 * 
 * @cname('__pyx_memoryview_check')
 * cdef inline bint memoryview_check(object o):             # <<<<<<<<<<<<<<
 *     return isinstance(o, memoryview)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":666
 *     return isinstance(o, memoryview)
 * 
 * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
 *     """
 *     Replace all ellipses with full slices and fill incomplete indices with
 */

static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
  PyObject *__pyx_v_tup = NULL;
  PyObject *__pyx_v_result = NULL;
  int __pyx_v_have_slices;
  int __pyx_v_seen_ellipsis;
  CYTHON_UNUSED PyObject *__pyx_v_idx = NULL;
  PyObject *__pyx_v_item = NULL;
  Py_ssize_t __pyx_v_nslices;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("_unellipsify", 0);

  /* "View.MemoryView":671
 *     full slices.
 *     """
 *     if not isinstance(index, tuple):             # <<<<<<<<<<<<<<
 *         tup = (index,)
 *     else:
 */
  __pyx_t_1 = PyTuple_Check(__pyx_v_index); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":672
 *     """
 *     if not isinstance(index, tuple):
 *         tup = (index,)             # <<<<<<<<<<<<<<
 *     else:
 *         tup = index
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
    __pyx_v_tup = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "View.MemoryView":671
 *     full slices.
 *     """
 *     if not isinstance(index, tuple):             # <<<<<<<<<<<<<<
 *         tup = (index,)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":674
 *         tup = (index,)
 *     else:
 *         tup = index             # <<<<<<<<<<<<<<
 * 
 *     result = []
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_index);
    __pyx_v_tup = __pyx_v_index;
  }
  __pyx_L3:;

  /* "View.MemoryView":676
 *         tup = index
 * 
 *     result = []             # <<<<<<<<<<<<<<
 *     have_slices = False
 *     seen_ellipsis = False
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_result = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "View.MemoryView":677
 * 
 *     result = []
 *     have_slices = False             # <<<<<<<<<<<<<<
 *     seen_ellipsis = False
 *     for idx, item in enumerate(tup):
 */
  __pyx_v_have_slices = 0;

  /* "View.MemoryView":678
 *     result = []
 *     have_slices = False
 *     seen_ellipsis = False             # <<<<<<<<<<<<<<
 *     for idx, item in enumerate(tup):
 *         if item is Ellipsis:
 */
  __pyx_v_seen_ellipsis = 0;

  /* "View.MemoryView":679
 *     have_slices = False
 *     seen_ellipsis = False
 *     for idx, item in enumerate(tup):             # <<<<<<<<<<<<<<
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_3 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) {
    __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 679, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(2, 679, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 679, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(2, 679, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 679, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(2, 679, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);
    __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3);
    __pyx_t_3 = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "View.MemoryView":680
 *     seen_ellipsis = False
 *     for idx, item in enumerate(tup):
 *         if item is Ellipsis:             # <<<<<<<<<<<<<<
 *             if not seen_ellipsis:
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
 */
    __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":681
 *     for idx, item in enumerate(tup):
 *         if item is Ellipsis:
 *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
 *                 seen_ellipsis = True
 */
      __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);
      if (__pyx_t_1) {

        /* "View.MemoryView":682
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))             # <<<<<<<<<<<<<<
 *                 seen_ellipsis = True
 *             else:
 */
        __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(2, 682, __pyx_L1_error)
        __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 682, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        { Py_ssize_t __pyx_temp;
          for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {
            __Pyx_INCREF(__pyx_slice__200);
            __Pyx_GIVEREF(__pyx_slice__200);
            PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__200);
          }
        }
        __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 682, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "View.MemoryView":683
 *             if not seen_ellipsis:
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
 *                 seen_ellipsis = True             # <<<<<<<<<<<<<<
 *             else:
 *                 result.append(slice(None))
 */
        __pyx_v_seen_ellipsis = 1;

        /* "View.MemoryView":681
 *     for idx, item in enumerate(tup):
 *         if item is Ellipsis:
 *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
 *                 seen_ellipsis = True
 */
        goto __pyx_L7;
      }

      /* "View.MemoryView":685
 *                 seen_ellipsis = True
 *             else:
 *                 result.append(slice(None))             # <<<<<<<<<<<<<<
 *             have_slices = True
 *         else:
 */
      /*else*/ {
        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__200); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 685, __pyx_L1_error)
      }
      __pyx_L7:;

      /* "View.MemoryView":686
 *             else:
 *                 result.append(slice(None))
 *             have_slices = True             # <<<<<<<<<<<<<<
 *         else:
 *             if not isinstance(item, slice) and not PyIndex_Check(item):
 */
      __pyx_v_have_slices = 1;

      /* "View.MemoryView":680
 *     seen_ellipsis = False
 *     for idx, item in enumerate(tup):
 *         if item is Ellipsis:             # <<<<<<<<<<<<<<
 *             if not seen_ellipsis:
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
 */
      goto __pyx_L6;
    }

    /* "View.MemoryView":688
 *             have_slices = True
 *         else:
 *             if not isinstance(item, slice) and not PyIndex_Check(item):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Cannot index with type '%s'" % type(item))
 * 
 */
    /*else*/ {
      __pyx_t_2 = PySlice_Check(__pyx_v_item); 
      __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0);
      if (__pyx_t_10) {
      } else {
        __pyx_t_1 = __pyx_t_10;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0);
      __pyx_t_1 = __pyx_t_10;
      __pyx_L9_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "View.MemoryView":689
 *         else:
 *             if not isinstance(item, slice) and not PyIndex_Check(item):
 *                 raise TypeError("Cannot index with type '%s'" % type(item))             # <<<<<<<<<<<<<<
 * 
 *             have_slices = have_slices or isinstance(item, slice)
 */
        __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 689, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 689, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_Raise(__pyx_t_11, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __PYX_ERR(2, 689, __pyx_L1_error)

        /* "View.MemoryView":688
 *             have_slices = True
 *         else:
 *             if not isinstance(item, slice) and not PyIndex_Check(item):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Cannot index with type '%s'" % type(item))
 * 
 */
      }

      /* "View.MemoryView":691
 *                 raise TypeError("Cannot index with type '%s'" % type(item))
 * 
 *             have_slices = have_slices or isinstance(item, slice)             # <<<<<<<<<<<<<<
 *             result.append(item)
 * 
 */
      __pyx_t_10 = (__pyx_v_have_slices != 0);
      if (!__pyx_t_10) {
      } else {
        __pyx_t_1 = __pyx_t_10;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_10 = PySlice_Check(__pyx_v_item); 
      __pyx_t_2 = (__pyx_t_10 != 0);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L11_bool_binop_done:;
      __pyx_v_have_slices = __pyx_t_1;

      /* "View.MemoryView":692
 * 
 *             have_slices = have_slices or isinstance(item, slice)
 *             result.append(item)             # <<<<<<<<<<<<<<
 * 
 *     nslices = ndim - len(result)
 */
      __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 692, __pyx_L1_error)
    }
    __pyx_L6:;

    /* "View.MemoryView":679
 *     have_slices = False
 *     seen_ellipsis = False
 *     for idx, item in enumerate(tup):             # <<<<<<<<<<<<<<
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "View.MemoryView":694
 *             result.append(item)
 * 
 *     nslices = ndim - len(result)             # <<<<<<<<<<<<<<
 *     if nslices:
 *         result.extend([slice(None)] * nslices)
 */
  __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(2, 694, __pyx_L1_error)
  __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);

  /* "View.MemoryView":695
 * 
 *     nslices = ndim - len(result)
 *     if nslices:             # <<<<<<<<<<<<<<
 *         result.extend([slice(None)] * nslices)
 * 
 */
  __pyx_t_1 = (__pyx_v_nslices != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":696
 *     nslices = ndim - len(result)
 *     if nslices:
 *         result.extend([slice(None)] * nslices)             # <<<<<<<<<<<<<<
 * 
 *     return have_slices or nslices, tuple(result)
 */
    __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    { Py_ssize_t __pyx_temp;
      for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {
        __Pyx_INCREF(__pyx_slice__200);
        __Pyx_GIVEREF(__pyx_slice__200);
        PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__200);
      }
    }
    __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 696, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "View.MemoryView":695
 * 
 *     nslices = ndim - len(result)
 *     if nslices:             # <<<<<<<<<<<<<<
 *         result.extend([slice(None)] * nslices)
 * 
 */
  }

  /* "View.MemoryView":698
 *         result.extend([slice(None)] * nslices)
 * 
 *     return have_slices or nslices, tuple(result)             # <<<<<<<<<<<<<<
 * 
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!__pyx_v_have_slices) {
  } else {
    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_L14_bool_binop_done:;
  __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":666
 *     return isinstance(o, memoryview)
 * 
 * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
 *     """
 *     Replace all ellipses with full slices and fill incomplete indices with
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":700
 *     return have_slices or nslices, tuple(result)
 * 
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):             # <<<<<<<<<<<<<<
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 */

static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
  Py_ssize_t __pyx_v_suboffset;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t *__pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("assert_direct_dimensions", 0);

  /* "View.MemoryView":701
 * 
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
 *     for suboffset in suboffsets[:ndim]:             # <<<<<<<<<<<<<<
 *         if suboffset >= 0:
 *             raise ValueError("Indirect dimensions not supported")
 */
  __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
  for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
    __pyx_t_1 = __pyx_t_3;
    __pyx_v_suboffset = (__pyx_t_1[0]);

    /* "View.MemoryView":702
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("Indirect dimensions not supported")
 * 
 */
    __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "View.MemoryView":703
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 *             raise ValueError("Indirect dimensions not supported")             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__201, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 703, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(2, 703, __pyx_L1_error)

      /* "View.MemoryView":702
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("Indirect dimensions not supported")
 * 
 */
    }
  }

  /* "View.MemoryView":700
 *     return have_slices or nslices, tuple(result)
 * 
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):             # <<<<<<<<<<<<<<
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":710
 * 
 * @cname('__pyx_memview_slice')
 * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim
 *     cdef bint negative_step
 */

static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
  int __pyx_v_new_ndim;
  int __pyx_v_suboffset_dim;
  int __pyx_v_dim;
  __Pyx_memviewslice __pyx_v_src;
  __Pyx_memviewslice __pyx_v_dst;
  __Pyx_memviewslice *__pyx_v_p_src;
  struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
  __Pyx_memviewslice *__pyx_v_p_dst;
  int *__pyx_v_p_suboffset_dim;
  Py_ssize_t __pyx_v_start;
  Py_ssize_t __pyx_v_stop;
  Py_ssize_t __pyx_v_step;
  int __pyx_v_have_start;
  int __pyx_v_have_stop;
  int __pyx_v_have_step;
  PyObject *__pyx_v_index = NULL;
  struct __pyx_memoryview_obj *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_memoryview_obj *__pyx_t_4;
  char *__pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  __Pyx_RefNannySetupContext("memview_slice", 0);

  /* "View.MemoryView":711
 * @cname('__pyx_memview_slice')
 * cdef memoryview memview_slice(memoryview memview, object indices):
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim             # <<<<<<<<<<<<<<
 *     cdef bint negative_step
 *     cdef __Pyx_memviewslice src, dst
 */
  __pyx_v_new_ndim = 0;
  __pyx_v_suboffset_dim = -1;

  /* "View.MemoryView":718
 * 
 * 
 *     memset(&dst, 0, sizeof(dst))             # <<<<<<<<<<<<<<
 * 
 *     cdef _memoryviewslice memviewsliceobj
 */
  (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));

  /* "View.MemoryView":722
 *     cdef _memoryviewslice memviewsliceobj
 * 
 *     assert memview.view.ndim > 0             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(memview, _memoryviewslice):
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(2, 722, __pyx_L1_error)
    }
  }
  #endif

  /* "View.MemoryView":724
 *     assert memview.view.ndim > 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":725
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         memviewsliceobj = memview             # <<<<<<<<<<<<<<
 *         p_src = &memviewsliceobj.from_slice
 *     else:
 */
    if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(2, 725, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_v_memview);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":726
 *     if isinstance(memview, _memoryviewslice):
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice             # <<<<<<<<<<<<<<
 *     else:
 *         slice_copy(memview, &src)
 */
    __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);

    /* "View.MemoryView":724
 *     assert memview.view.ndim > 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":728
 *         p_src = &memviewsliceobj.from_slice
 *     else:
 *         slice_copy(memview, &src)             # <<<<<<<<<<<<<<
 *         p_src = &src
 * 
 */
  /*else*/ {
    __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));

    /* "View.MemoryView":729
 *     else:
 *         slice_copy(memview, &src)
 *         p_src = &src             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_p_src = (&__pyx_v_src);
  }
  __pyx_L3:;

  /* "View.MemoryView":735
 * 
 * 
 *     dst.memview = p_src.memview             # <<<<<<<<<<<<<<
 *     dst.data = p_src.data
 * 
 */
  __pyx_t_4 = __pyx_v_p_src->memview;
  __pyx_v_dst.memview = __pyx_t_4;

  /* "View.MemoryView":736
 * 
 *     dst.memview = p_src.memview
 *     dst.data = p_src.data             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __pyx_v_p_src->data;
  __pyx_v_dst.data = __pyx_t_5;

  /* "View.MemoryView":741
 * 
 * 
 *     cdef __Pyx_memviewslice *p_dst = &dst             # <<<<<<<<<<<<<<
 *     cdef int *p_suboffset_dim = &suboffset_dim
 *     cdef Py_ssize_t start, stop, step
 */
  __pyx_v_p_dst = (&__pyx_v_dst);

  /* "View.MemoryView":742
 * 
 *     cdef __Pyx_memviewslice *p_dst = &dst
 *     cdef int *p_suboffset_dim = &suboffset_dim             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t start, stop, step
 *     cdef bint have_start, have_stop, have_step
 */
  __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);

  /* "View.MemoryView":746
 *     cdef bint have_start, have_stop, have_step
 * 
 *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
 *         if PyIndex_Check(index):
 *             slice_memviewslice(
 */
  __pyx_t_6 = 0;
  if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
    __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 746, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(2, 746, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 746, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(2, 746, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 746, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_8(__pyx_t_3);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(2, 746, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_v_dim = __pyx_t_6;
    __pyx_t_6 = (__pyx_t_6 + 1);

    /* "View.MemoryView":747
 * 
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
 *             slice_memviewslice(
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 */
    __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":751
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 *                 dim, new_ndim, p_suboffset_dim,
 *                 index, 0, 0, # start, stop, step             # <<<<<<<<<<<<<<
 *                 0, 0, 0, # have_{start,stop,step}
 *                 False)
 */
      __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 751, __pyx_L1_error)

      /* "View.MemoryView":748
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):
 *             slice_memviewslice(             # <<<<<<<<<<<<<<
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 *                 dim, new_ndim, p_suboffset_dim,
 */
      __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 748, __pyx_L1_error)

      /* "View.MemoryView":747
 * 
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
 *             slice_memviewslice(
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 */
      goto __pyx_L6;
    }

    /* "View.MemoryView":754
 *                 0, 0, 0, # have_{start,stop,step}
 *                 False)
 *         elif index is None:             # <<<<<<<<<<<<<<
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
 */
    __pyx_t_2 = (__pyx_v_index == Py_None);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":755
 *                 False)
 *         elif index is None:
 *             p_dst.shape[new_ndim] = 1             # <<<<<<<<<<<<<<
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1
 */
      (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;

      /* "View.MemoryView":756
 *         elif index is None:
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0             # <<<<<<<<<<<<<<
 *             p_dst.suboffsets[new_ndim] = -1
 *             new_ndim += 1
 */
      (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;

      /* "View.MemoryView":757
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1             # <<<<<<<<<<<<<<
 *             new_ndim += 1
 *         else:
 */
      (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;

      /* "View.MemoryView":758
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1
 *             new_ndim += 1             # <<<<<<<<<<<<<<
 *         else:
 *             start = index.start or 0
 */
      __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);

      /* "View.MemoryView":754
 *                 0, 0, 0, # have_{start,stop,step}
 *                 False)
 *         elif index is None:             # <<<<<<<<<<<<<<
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
 */
      goto __pyx_L6;
    }

    /* "View.MemoryView":760
 *             new_ndim += 1
 *         else:
 *             start = index.start or 0             # <<<<<<<<<<<<<<
 *             stop = index.stop or 0
 *             step = index.step or 0
 */
    /*else*/ {
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 760, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 760, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else {
        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 760, __pyx_L1_error)
        __pyx_t_10 = __pyx_t_12;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_10 = 0;
      __pyx_L7_bool_binop_done:;
      __pyx_v_start = __pyx_t_10;

      /* "View.MemoryView":761
 *         else:
 *             start = index.start or 0
 *             stop = index.stop or 0             # <<<<<<<<<<<<<<
 *             step = index.step or 0
 * 
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 761, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 761, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else {
        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 761, __pyx_L1_error)
        __pyx_t_10 = __pyx_t_12;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_10 = 0;
      __pyx_L9_bool_binop_done:;
      __pyx_v_stop = __pyx_t_10;

      /* "View.MemoryView":762
 *             start = index.start or 0
 *             stop = index.stop or 0
 *             step = index.step or 0             # <<<<<<<<<<<<<<
 * 
 *             have_start = index.start is not None
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 762, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 762, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else {
        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 762, __pyx_L1_error)
        __pyx_t_10 = __pyx_t_12;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_10 = 0;
      __pyx_L11_bool_binop_done:;
      __pyx_v_step = __pyx_t_10;

      /* "View.MemoryView":764
 *             step = index.step or 0
 * 
 *             have_start = index.start is not None             # <<<<<<<<<<<<<<
 *             have_stop = index.stop is not None
 *             have_step = index.step is not None
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = (__pyx_t_9 != Py_None);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_have_start = __pyx_t_1;

      /* "View.MemoryView":765
 * 
 *             have_start = index.start is not None
 *             have_stop = index.stop is not None             # <<<<<<<<<<<<<<
 *             have_step = index.step is not None
 * 
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = (__pyx_t_9 != Py_None);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_have_stop = __pyx_t_1;

      /* "View.MemoryView":766
 *             have_start = index.start is not None
 *             have_stop = index.stop is not None
 *             have_step = index.step is not None             # <<<<<<<<<<<<<<
 * 
 *             slice_memviewslice(
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = (__pyx_t_9 != Py_None);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_have_step = __pyx_t_1;

      /* "View.MemoryView":768
 *             have_step = index.step is not None
 * 
 *             slice_memviewslice(             # <<<<<<<<<<<<<<
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 *                 dim, new_ndim, p_suboffset_dim,
 */
      __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 768, __pyx_L1_error)

      /* "View.MemoryView":774
 *                 have_start, have_stop, have_step,
 *                 True)
 *             new_ndim += 1             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(memview, _memoryviewslice):
 */
      __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
    }
    __pyx_L6:;

    /* "View.MemoryView":746
 *     cdef bint have_start, have_stop, have_step
 * 
 *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
 *         if PyIndex_Check(index):
 *             slice_memviewslice(
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "View.MemoryView":776
 *             new_ndim += 1
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":777
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));

    /* "View.MemoryView":778
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_dtype_func,
 *                                     memview.dtype_is_object)
 */
    if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(2, 778, __pyx_L1_error) }

    /* "View.MemoryView":779
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 *     else:
 */
    if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(2, 779, __pyx_L1_error) }

    /* "View.MemoryView":777
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,
 */
    __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(2, 777, __pyx_L1_error)
    __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":776
 *             new_ndim += 1
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
 */
  }

  /* "View.MemoryView":782
 *                                     memview.dtype_is_object)
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));

    /* "View.MemoryView":783
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,
 *                                     memview.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "View.MemoryView":782
 *                                     memview.dtype_is_object)
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 * 
 */
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(2, 782, __pyx_L1_error)
    __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":710
 * 
 * @cname('__pyx_memview_slice')
 * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim
 *     cdef bint negative_step
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":807
 * 
 * @cname('__pyx_memoryview_slice_memviewslice')
 * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
 *         __Pyx_memviewslice *dst,
 *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
 */

static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
  Py_ssize_t __pyx_v_new_shape;
  int __pyx_v_negative_step;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "View.MemoryView":827
 *     cdef bint negative_step
 * 
 *     if not is_slice:             # <<<<<<<<<<<<<<
 * 
 *         if start < 0:
 */
  __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":829
 *     if not is_slice:
 * 
 *         if start < 0:             # <<<<<<<<<<<<<<
 *             start += shape
 *         if not 0 <= start < shape:
 */
    __pyx_t_1 = ((__pyx_v_start < 0) != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":830
 * 
 *         if start < 0:
 *             start += shape             # <<<<<<<<<<<<<<
 *         if not 0 <= start < shape:
 *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
 */
      __pyx_v_start = (__pyx_v_start + __pyx_v_shape);

      /* "View.MemoryView":829
 *     if not is_slice:
 * 
 *         if start < 0:             # <<<<<<<<<<<<<<
 *             start += shape
 *         if not 0 <= start < shape:
 */
    }

    /* "View.MemoryView":831
 *         if start < 0:
 *             start += shape
 *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
 *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
 *     else:
 */
    __pyx_t_1 = (0 <= __pyx_v_start);
    if (__pyx_t_1) {
      __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
    }
    __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":832
 *             start += shape
 *         if not 0 <= start < shape:
 *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)             # <<<<<<<<<<<<<<
 *     else:
 * 
 */
      __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 832, __pyx_L1_error)

      /* "View.MemoryView":831
 *         if start < 0:
 *             start += shape
 *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
 *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
 *     else:
 */
    }

    /* "View.MemoryView":827
 *     cdef bint negative_step
 * 
 *     if not is_slice:             # <<<<<<<<<<<<<<
 * 
 *         if start < 0:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":835
 *     else:
 * 
 *         negative_step = have_step != 0 and step < 0             # <<<<<<<<<<<<<<
 * 
 *         if have_step and step == 0:
 */
  /*else*/ {
    __pyx_t_1 = ((__pyx_v_have_step != 0) != 0);
    if (__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_1 = ((__pyx_v_step < 0) != 0);
    __pyx_t_2 = __pyx_t_1;
    __pyx_L6_bool_binop_done:;
    __pyx_v_negative_step = __pyx_t_2;

    /* "View.MemoryView":837
 *         negative_step = have_step != 0 and step < 0
 * 
 *         if have_step and step == 0:             # <<<<<<<<<<<<<<
 *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
 * 
 */
    __pyx_t_1 = (__pyx_v_have_step != 0);
    if (__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_1 = ((__pyx_v_step == 0) != 0);
    __pyx_t_2 = __pyx_t_1;
    __pyx_L9_bool_binop_done:;
    if (__pyx_t_2) {

      /* "View.MemoryView":838
 * 
 *         if have_step and step == 0:
 *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 838, __pyx_L1_error)

      /* "View.MemoryView":837
 *         negative_step = have_step != 0 and step < 0
 * 
 *         if have_step and step == 0:             # <<<<<<<<<<<<<<
 *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
 * 
 */
    }

    /* "View.MemoryView":841
 * 
 * 
 *         if have_start:             # <<<<<<<<<<<<<<
 *             if start < 0:
 *                 start += shape
 */
    __pyx_t_2 = (__pyx_v_have_start != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":842
 * 
 *         if have_start:
 *             if start < 0:             # <<<<<<<<<<<<<<
 *                 start += shape
 *                 if start < 0:
 */
      __pyx_t_2 = ((__pyx_v_start < 0) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":843
 *         if have_start:
 *             if start < 0:
 *                 start += shape             # <<<<<<<<<<<<<<
 *                 if start < 0:
 *                     start = 0
 */
        __pyx_v_start = (__pyx_v_start + __pyx_v_shape);

        /* "View.MemoryView":844
 *             if start < 0:
 *                 start += shape
 *                 if start < 0:             # <<<<<<<<<<<<<<
 *                     start = 0
 *             elif start >= shape:
 */
        __pyx_t_2 = ((__pyx_v_start < 0) != 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":845
 *                 start += shape
 *                 if start < 0:
 *                     start = 0             # <<<<<<<<<<<<<<
 *             elif start >= shape:
 *                 if negative_step:
 */
          __pyx_v_start = 0;

          /* "View.MemoryView":844
 *             if start < 0:
 *                 start += shape
 *                 if start < 0:             # <<<<<<<<<<<<<<
 *                     start = 0
 *             elif start >= shape:
 */
        }

        /* "View.MemoryView":842
 * 
 *         if have_start:
 *             if start < 0:             # <<<<<<<<<<<<<<
 *                 start += shape
 *                 if start < 0:
 */
        goto __pyx_L12;
      }

      /* "View.MemoryView":846
 *                 if start < 0:
 *                     start = 0
 *             elif start >= shape:             # <<<<<<<<<<<<<<
 *                 if negative_step:
 *                     start = shape - 1
 */
      __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":847
 *                     start = 0
 *             elif start >= shape:
 *                 if negative_step:             # <<<<<<<<<<<<<<
 *                     start = shape - 1
 *                 else:
 */
        __pyx_t_2 = (__pyx_v_negative_step != 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":848
 *             elif start >= shape:
 *                 if negative_step:
 *                     start = shape - 1             # <<<<<<<<<<<<<<
 *                 else:
 *                     start = shape
 */
          __pyx_v_start = (__pyx_v_shape - 1);

          /* "View.MemoryView":847
 *                     start = 0
 *             elif start >= shape:
 *                 if negative_step:             # <<<<<<<<<<<<<<
 *                     start = shape - 1
 *                 else:
 */
          goto __pyx_L14;
        }

        /* "View.MemoryView":850
 *                     start = shape - 1
 *                 else:
 *                     start = shape             # <<<<<<<<<<<<<<
 *         else:
 *             if negative_step:
 */
        /*else*/ {
          __pyx_v_start = __pyx_v_shape;
        }
        __pyx_L14:;

        /* "View.MemoryView":846
 *                 if start < 0:
 *                     start = 0
 *             elif start >= shape:             # <<<<<<<<<<<<<<
 *                 if negative_step:
 *                     start = shape - 1
 */
      }
      __pyx_L12:;

      /* "View.MemoryView":841
 * 
 * 
 *         if have_start:             # <<<<<<<<<<<<<<
 *             if start < 0:
 *                 start += shape
 */
      goto __pyx_L11;
    }

    /* "View.MemoryView":852
 *                     start = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 start = shape - 1
 *             else:
 */
    /*else*/ {
      __pyx_t_2 = (__pyx_v_negative_step != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":853
 *         else:
 *             if negative_step:
 *                 start = shape - 1             # <<<<<<<<<<<<<<
 *             else:
 *                 start = 0
 */
        __pyx_v_start = (__pyx_v_shape - 1);

        /* "View.MemoryView":852
 *                     start = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 start = shape - 1
 *             else:
 */
        goto __pyx_L15;
      }

      /* "View.MemoryView":855
 *                 start = shape - 1
 *             else:
 *                 start = 0             # <<<<<<<<<<<<<<
 * 
 *         if have_stop:
 */
      /*else*/ {
        __pyx_v_start = 0;
      }
      __pyx_L15:;
    }
    __pyx_L11:;

    /* "View.MemoryView":857
 *                 start = 0
 * 
 *         if have_stop:             # <<<<<<<<<<<<<<
 *             if stop < 0:
 *                 stop += shape
 */
    __pyx_t_2 = (__pyx_v_have_stop != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":858
 * 
 *         if have_stop:
 *             if stop < 0:             # <<<<<<<<<<<<<<
 *                 stop += shape
 *                 if stop < 0:
 */
      __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":859
 *         if have_stop:
 *             if stop < 0:
 *                 stop += shape             # <<<<<<<<<<<<<<
 *                 if stop < 0:
 *                     stop = 0
 */
        __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);

        /* "View.MemoryView":860
 *             if stop < 0:
 *                 stop += shape
 *                 if stop < 0:             # <<<<<<<<<<<<<<
 *                     stop = 0
 *             elif stop > shape:
 */
        __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":861
 *                 stop += shape
 *                 if stop < 0:
 *                     stop = 0             # <<<<<<<<<<<<<<
 *             elif stop > shape:
 *                 stop = shape
 */
          __pyx_v_stop = 0;

          /* "View.MemoryView":860
 *             if stop < 0:
 *                 stop += shape
 *                 if stop < 0:             # <<<<<<<<<<<<<<
 *                     stop = 0
 *             elif stop > shape:
 */
        }

        /* "View.MemoryView":858
 * 
 *         if have_stop:
 *             if stop < 0:             # <<<<<<<<<<<<<<
 *                 stop += shape
 *                 if stop < 0:
 */
        goto __pyx_L17;
      }

      /* "View.MemoryView":862
 *                 if stop < 0:
 *                     stop = 0
 *             elif stop > shape:             # <<<<<<<<<<<<<<
 *                 stop = shape
 *         else:
 */
      __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":863
 *                     stop = 0
 *             elif stop > shape:
 *                 stop = shape             # <<<<<<<<<<<<<<
 *         else:
 *             if negative_step:
 */
        __pyx_v_stop = __pyx_v_shape;

        /* "View.MemoryView":862
 *                 if stop < 0:
 *                     stop = 0
 *             elif stop > shape:             # <<<<<<<<<<<<<<
 *                 stop = shape
 *         else:
 */
      }
      __pyx_L17:;

      /* "View.MemoryView":857
 *                 start = 0
 * 
 *         if have_stop:             # <<<<<<<<<<<<<<
 *             if stop < 0:
 *                 stop += shape
 */
      goto __pyx_L16;
    }

    /* "View.MemoryView":865
 *                 stop = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 stop = -1
 *             else:
 */
    /*else*/ {
      __pyx_t_2 = (__pyx_v_negative_step != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":866
 *         else:
 *             if negative_step:
 *                 stop = -1             # <<<<<<<<<<<<<<
 *             else:
 *                 stop = shape
 */
        __pyx_v_stop = -1L;

        /* "View.MemoryView":865
 *                 stop = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 stop = -1
 *             else:
 */
        goto __pyx_L19;
      }

      /* "View.MemoryView":868
 *                 stop = -1
 *             else:
 *                 stop = shape             # <<<<<<<<<<<<<<
 * 
 *         if not have_step:
 */
      /*else*/ {
        __pyx_v_stop = __pyx_v_shape;
      }
      __pyx_L19:;
    }
    __pyx_L16:;

    /* "View.MemoryView":870
 *                 stop = shape
 * 
 *         if not have_step:             # <<<<<<<<<<<<<<
 *             step = 1
 * 
 */
    __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":871
 * 
 *         if not have_step:
 *             step = 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_v_step = 1;

      /* "View.MemoryView":870
 *                 stop = shape
 * 
 *         if not have_step:             # <<<<<<<<<<<<<<
 *             step = 1
 * 
 */
    }

    /* "View.MemoryView":875
 * 
 *         with cython.cdivision(True):
 *             new_shape = (stop - start) // step             # <<<<<<<<<<<<<<
 * 
 *             if (stop - start) - step * new_shape:
 */
    __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);

    /* "View.MemoryView":877
 *             new_shape = (stop - start) // step
 * 
 *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
 *                 new_shape += 1
 * 
 */
    __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":878
 * 
 *             if (stop - start) - step * new_shape:
 *                 new_shape += 1             # <<<<<<<<<<<<<<
 * 
 *         if new_shape < 0:
 */
      __pyx_v_new_shape = (__pyx_v_new_shape + 1);

      /* "View.MemoryView":877
 *             new_shape = (stop - start) // step
 * 
 *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
 *                 new_shape += 1
 * 
 */
    }

    /* "View.MemoryView":880
 *                 new_shape += 1
 * 
 *         if new_shape < 0:             # <<<<<<<<<<<<<<
 *             new_shape = 0
 * 
 */
    __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":881
 * 
 *         if new_shape < 0:
 *             new_shape = 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_v_new_shape = 0;

      /* "View.MemoryView":880
 *                 new_shape += 1
 * 
 *         if new_shape < 0:             # <<<<<<<<<<<<<<
 *             new_shape = 0
 * 
 */
    }

    /* "View.MemoryView":884
 * 
 * 
 *         dst.strides[new_ndim] = stride * step             # <<<<<<<<<<<<<<
 *         dst.shape[new_ndim] = new_shape
 *         dst.suboffsets[new_ndim] = suboffset
 */
    (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);

    /* "View.MemoryView":885
 * 
 *         dst.strides[new_ndim] = stride * step
 *         dst.shape[new_ndim] = new_shape             # <<<<<<<<<<<<<<
 *         dst.suboffsets[new_ndim] = suboffset
 * 
 */
    (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;

    /* "View.MemoryView":886
 *         dst.strides[new_ndim] = stride * step
 *         dst.shape[new_ndim] = new_shape
 *         dst.suboffsets[new_ndim] = suboffset             # <<<<<<<<<<<<<<
 * 
 * 
 */
    (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
  }
  __pyx_L3:;

  /* "View.MemoryView":889
 * 
 * 
 *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
 *         dst.data += start * stride
 *     else:
 */
  __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":890
 * 
 *     if suboffset_dim[0] < 0:
 *         dst.data += start * stride             # <<<<<<<<<<<<<<
 *     else:
 *         dst.suboffsets[suboffset_dim[0]] += start * stride
 */
    __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));

    /* "View.MemoryView":889
 * 
 * 
 *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
 *         dst.data += start * stride
 *     else:
 */
    goto __pyx_L23;
  }

  /* "View.MemoryView":892
 *         dst.data += start * stride
 *     else:
 *         dst.suboffsets[suboffset_dim[0]] += start * stride             # <<<<<<<<<<<<<<
 * 
 *     if suboffset >= 0:
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
    (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
  }
  __pyx_L23:;

  /* "View.MemoryView":894
 *         dst.suboffsets[suboffset_dim[0]] += start * stride
 * 
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         if not is_slice:
 *             if new_ndim == 0:
 */
  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":895
 * 
 *     if suboffset >= 0:
 *         if not is_slice:             # <<<<<<<<<<<<<<
 *             if new_ndim == 0:
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 */
    __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":896
 *     if suboffset >= 0:
 *         if not is_slice:
 *             if new_ndim == 0:             # <<<<<<<<<<<<<<
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 *             else:
 */
      __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":897
 *         if not is_slice:
 *             if new_ndim == 0:
 *                 dst.data = (<char **> dst.data)[0] + suboffset             # <<<<<<<<<<<<<<
 *             else:
 *                 _err_dim(IndexError, "All dimensions preceding dimension %d "
 */
        __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);

        /* "View.MemoryView":896
 *     if suboffset >= 0:
 *         if not is_slice:
 *             if new_ndim == 0:             # <<<<<<<<<<<<<<
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 *             else:
 */
        goto __pyx_L26;
      }

      /* "View.MemoryView":899
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 *             else:
 *                 _err_dim(IndexError, "All dimensions preceding dimension %d "             # <<<<<<<<<<<<<<
 *                                      "must be indexed and not sliced", dim)
 *         else:
 */
      /*else*/ {

        /* "View.MemoryView":900
 *             else:
 *                 _err_dim(IndexError, "All dimensions preceding dimension %d "
 *                                      "must be indexed and not sliced", dim)             # <<<<<<<<<<<<<<
 *         else:
 *             suboffset_dim[0] = new_ndim
 */
        __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 899, __pyx_L1_error)
      }
      __pyx_L26:;

      /* "View.MemoryView":895
 * 
 *     if suboffset >= 0:
 *         if not is_slice:             # <<<<<<<<<<<<<<
 *             if new_ndim == 0:
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 */
      goto __pyx_L25;
    }

    /* "View.MemoryView":902
 *                                      "must be indexed and not sliced", dim)
 *         else:
 *             suboffset_dim[0] = new_ndim             # <<<<<<<<<<<<<<
 * 
 *     return 0
 */
    /*else*/ {
      (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
    }
    __pyx_L25:;

    /* "View.MemoryView":894
 *         dst.suboffsets[suboffset_dim[0]] += start * stride
 * 
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         if not is_slice:
 *             if new_ndim == 0:
 */
  }

  /* "View.MemoryView":904
 *             suboffset_dim[0] = new_ndim
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":807
 * 
 * @cname('__pyx_memoryview_slice_memviewslice')
 * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
 *         __Pyx_memviewslice *dst,
 *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":910
 * 
 * @cname('__pyx_pybuffer_index')
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1
 */

static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
  Py_ssize_t __pyx_v_shape;
  Py_ssize_t __pyx_v_stride;
  Py_ssize_t __pyx_v_suboffset;
  Py_ssize_t __pyx_v_itemsize;
  char *__pyx_v_resultp;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("pybuffer_index", 0);

  /* "View.MemoryView":912
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t itemsize = view.itemsize
 *     cdef char *resultp
 */
  __pyx_v_suboffset = -1L;

  /* "View.MemoryView":913
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1
 *     cdef Py_ssize_t itemsize = view.itemsize             # <<<<<<<<<<<<<<
 *     cdef char *resultp
 * 
 */
  __pyx_t_1 = __pyx_v_view->itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":916
 *     cdef char *resultp
 * 
 *     if view.ndim == 0:             # <<<<<<<<<<<<<<
 *         shape = view.len / itemsize
 *         stride = itemsize
 */
  __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":917
 * 
 *     if view.ndim == 0:
 *         shape = view.len / itemsize             # <<<<<<<<<<<<<<
 *         stride = itemsize
 *     else:
 */
    if (unlikely(__pyx_v_itemsize == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      __PYX_ERR(2, 917, __pyx_L1_error)
    }
    else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
      PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
      __PYX_ERR(2, 917, __pyx_L1_error)
    }
    __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);

    /* "View.MemoryView":918
 *     if view.ndim == 0:
 *         shape = view.len / itemsize
 *         stride = itemsize             # <<<<<<<<<<<<<<
 *     else:
 *         shape = view.shape[dim]
 */
    __pyx_v_stride = __pyx_v_itemsize;

    /* "View.MemoryView":916
 *     cdef char *resultp
 * 
 *     if view.ndim == 0:             # <<<<<<<<<<<<<<
 *         shape = view.len / itemsize
 *         stride = itemsize
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":920
 *         stride = itemsize
 *     else:
 *         shape = view.shape[dim]             # <<<<<<<<<<<<<<
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:
 */
  /*else*/ {
    __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);

    /* "View.MemoryView":921
 *     else:
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]             # <<<<<<<<<<<<<<
 *         if view.suboffsets != NULL:
 *             suboffset = view.suboffsets[dim]
 */
    __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);

    /* "View.MemoryView":922
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *             suboffset = view.suboffsets[dim]
 * 
 */
    __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":923
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:
 *             suboffset = view.suboffsets[dim]             # <<<<<<<<<<<<<<
 * 
 *     if index < 0:
 */
      __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);

      /* "View.MemoryView":922
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *             suboffset = view.suboffsets[dim]
 * 
 */
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":925
 *             suboffset = view.suboffsets[dim]
 * 
 *     if index < 0:             # <<<<<<<<<<<<<<
 *         index += view.shape[dim]
 *         if index < 0:
 */
  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":926
 * 
 *     if index < 0:
 *         index += view.shape[dim]             # <<<<<<<<<<<<<<
 *         if index < 0:
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 */
    __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));

    /* "View.MemoryView":927
 *     if index < 0:
 *         index += view.shape[dim]
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 */
    __pyx_t_2 = ((__pyx_v_index < 0) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "View.MemoryView":928
 *         index += view.shape[dim]
 *         if index < 0:
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)             # <<<<<<<<<<<<<<
 * 
 *     if index >= shape:
 */
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(2, 928, __pyx_L1_error)

      /* "View.MemoryView":927
 *     if index < 0:
 *         index += view.shape[dim]
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 */
    }

    /* "View.MemoryView":925
 *             suboffset = view.suboffsets[dim]
 * 
 *     if index < 0:             # <<<<<<<<<<<<<<
 *         index += view.shape[dim]
 *         if index < 0:
 */
  }

  /* "View.MemoryView":930
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 *     if index >= shape:             # <<<<<<<<<<<<<<
 *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 */
  __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":931
 * 
 *     if index >= shape:
 *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)             # <<<<<<<<<<<<<<
 * 
 *     resultp = bufp + index * stride
 */
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 931, __pyx_L1_error)

    /* "View.MemoryView":930
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 *     if index >= shape:             # <<<<<<<<<<<<<<
 *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 */
  }

  /* "View.MemoryView":933
 *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 *     resultp = bufp + index * stride             # <<<<<<<<<<<<<<
 *     if suboffset >= 0:
 *         resultp = (<char **> resultp)[0] + suboffset
 */
  __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));

  /* "View.MemoryView":934
 * 
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
 */
  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":935
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:
 *         resultp = (<char **> resultp)[0] + suboffset             # <<<<<<<<<<<<<<
 * 
 *     return resultp
 */
    __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);

    /* "View.MemoryView":934
 * 
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
 */
  }

  /* "View.MemoryView":937
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
 *     return resultp             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_resultp;
  goto __pyx_L0;

  /* "View.MemoryView":910
 * 
 * @cname('__pyx_pybuffer_index')
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":943
 * 
 * @cname('__pyx_memslice_transpose')
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:             # <<<<<<<<<<<<<<
 *     cdef int ndim = memslice.memview.view.ndim
 * 
 */

static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
  int __pyx_v_ndim;
  Py_ssize_t *__pyx_v_shape;
  Py_ssize_t *__pyx_v_strides;
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  long __pyx_t_3;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;

  /* "View.MemoryView":944
 * @cname('__pyx_memslice_transpose')
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:
 *     cdef int ndim = memslice.memview.view.ndim             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t *shape = memslice.shape
 */
  __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
  __pyx_v_ndim = __pyx_t_1;

  /* "View.MemoryView":946
 *     cdef int ndim = memslice.memview.view.ndim
 * 
 *     cdef Py_ssize_t *shape = memslice.shape             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t *strides = memslice.strides
 * 
 */
  __pyx_t_2 = __pyx_v_memslice->shape;
  __pyx_v_shape = __pyx_t_2;

  /* "View.MemoryView":947
 * 
 *     cdef Py_ssize_t *shape = memslice.shape
 *     cdef Py_ssize_t *strides = memslice.strides             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __pyx_v_memslice->strides;
  __pyx_v_strides = __pyx_t_2;

  /* "View.MemoryView":951
 * 
 *     cdef int i, j
 *     for i in range(ndim / 2):             # <<<<<<<<<<<<<<
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]
 */
  __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":952
 *     cdef int i, j
 *     for i in range(ndim / 2):
 *         j = ndim - 1 - i             # <<<<<<<<<<<<<<
 *         strides[i], strides[j] = strides[j], strides[i]
 *         shape[i], shape[j] = shape[j], shape[i]
 */
    __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);

    /* "View.MemoryView":953
 *     for i in range(ndim / 2):
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]             # <<<<<<<<<<<<<<
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 */
    __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
    __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
    (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
    (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;

    /* "View.MemoryView":954
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]
 *         shape[i], shape[j] = shape[j], shape[i]             # <<<<<<<<<<<<<<
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
 */
    __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
    __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
    (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
    (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;

    /* "View.MemoryView":956
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
 *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
 */
    __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);
    __pyx_t_7 = __pyx_t_8;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_7) {

      /* "View.MemoryView":957
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
 *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")             # <<<<<<<<<<<<<<
 * 
 *     return 1
 */
      __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 957, __pyx_L1_error)

      /* "View.MemoryView":956
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
 *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
 */
    }
  }

  /* "View.MemoryView":959
 *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
 *     return 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "View.MemoryView":943
 * 
 * @cname('__pyx_memslice_transpose')
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:             # <<<<<<<<<<<<<<
 *     cdef int ndim = memslice.memview.view.ndim
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":976
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
 * 
 */

/* Python wrapper */
static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "View.MemoryView":977
 * 
 *     def __dealloc__(self):
 *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)             # <<<<<<<<<<<<<<
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 */
  __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);

  /* "View.MemoryView":976
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "View.MemoryView":979
 *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)
 */

static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("convert_item_to_object", 0);

  /* "View.MemoryView":980
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
 *             return self.to_object_func(itemp)
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":981
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)             # <<<<<<<<<<<<<<
 *         else:
 *             return memoryview.convert_item_to_object(self, itemp)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 981, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":980
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
 *             return self.to_object_func(itemp)
 *         else:
 */
  }

  /* "View.MemoryView":983
 *             return self.to_object_func(itemp)
 *         else:
 *             return memoryview.convert_item_to_object(self, itemp)             # <<<<<<<<<<<<<<
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":979
 *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":985
 *             return memoryview.convert_item_to_object(self, itemp)
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)
 */

static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("assign_item_from_object", 0);

  /* "View.MemoryView":986
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
 *             self.to_dtype_func(itemp, value)
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":987
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)             # <<<<<<<<<<<<<<
 *         else:
 *             memoryview.assign_item_from_object(self, itemp, value)
 */
    __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(2, 987, __pyx_L1_error)

    /* "View.MemoryView":986
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
 *             self.to_dtype_func(itemp, value)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":989
 *             self.to_dtype_func(itemp, value)
 *         else:
 *             memoryview.assign_item_from_object(self, itemp, value)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "View.MemoryView":985
 *             return memoryview.convert_item_to_object(self, itemp)
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":992
 * 
 *     @property
 *     def base(self):             # <<<<<<<<<<<<<<
 *         return self.from_object
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":993
 *     @property
 *     def base(self):
 *         return self.from_object             # <<<<<<<<<<<<<<
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->from_object);
  __pyx_r = __pyx_v_self->from_object;
  goto __pyx_L0;

  /* "View.MemoryView":992
 * 
 *     @property
 *     def base(self):             # <<<<<<<<<<<<<<
 *         return self.from_object
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__202, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__203, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":999
 * 
 * @cname('__pyx_memoryview_fromslice')
 * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
 *                           int ndim,
 *                           object (*to_object_func)(char *),
 */

static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_suboffset;
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TypeInfo *__pyx_t_4;
  Py_buffer __pyx_t_5;
  Py_ssize_t *__pyx_t_6;
  Py_ssize_t *__pyx_t_7;
  Py_ssize_t *__pyx_t_8;
  Py_ssize_t __pyx_t_9;
  __Pyx_RefNannySetupContext("memoryview_fromslice", 0);

  /* "View.MemoryView":1007
 *     cdef _memoryviewslice result
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1008
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "View.MemoryView":1007
 *     cdef _memoryviewslice result
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  }

  /* "View.MemoryView":1013
 * 
 * 
 *     result = _memoryviewslice(None, 0, dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     result.from_slice = memviewslice
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "View.MemoryView":1015
 *     result = _memoryviewslice(None, 0, dtype_is_object)
 * 
 *     result.from_slice = memviewslice             # <<<<<<<<<<<<<<
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)
 * 
 */
  __pyx_v_result->from_slice = __pyx_v_memviewslice;

  /* "View.MemoryView":1016
 * 
 *     result.from_slice = memviewslice
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)             # <<<<<<<<<<<<<<
 * 
 *     result.from_object = (<memoryview> memviewslice.memview).base
 */
  __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);

  /* "View.MemoryView":1018
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)
 * 
 *     result.from_object = (<memoryview> memviewslice.memview).base             # <<<<<<<<<<<<<<
 *     result.typeinfo = memviewslice.memview.typeinfo
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_result->from_object);
  __Pyx_DECREF(__pyx_v_result->from_object);
  __pyx_v_result->from_object = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "View.MemoryView":1019
 * 
 *     result.from_object = (<memoryview> memviewslice.memview).base
 *     result.typeinfo = memviewslice.memview.typeinfo             # <<<<<<<<<<<<<<
 * 
 *     result.view = memviewslice.memview.view
 */
  __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
  __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;

  /* "View.MemoryView":1021
 *     result.typeinfo = memviewslice.memview.typeinfo
 * 
 *     result.view = memviewslice.memview.view             # <<<<<<<<<<<<<<
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim
 */
  __pyx_t_5 = __pyx_v_memviewslice.memview->view;
  __pyx_v_result->__pyx_base.view = __pyx_t_5;

  /* "View.MemoryView":1022
 * 
 *     result.view = memviewslice.memview.view
 *     result.view.buf = <void *> memviewslice.data             # <<<<<<<<<<<<<<
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 */
  __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);

  /* "View.MemoryView":1023
 *     result.view = memviewslice.memview.view
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim             # <<<<<<<<<<<<<<
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 *     Py_INCREF(Py_None)
 */
  __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;

  /* "View.MemoryView":1024
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None             # <<<<<<<<<<<<<<
 *     Py_INCREF(Py_None)
 * 
 */
  ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;

  /* "View.MemoryView":1025
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 *     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
 */
  Py_INCREF(Py_None);

  /* "View.MemoryView":1027
 *     Py_INCREF(Py_None)
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
 *         result.flags = PyBUF_RECORDS
 *     else:
 */
  __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1028
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
 *         result.flags = PyBUF_RECORDS             # <<<<<<<<<<<<<<
 *     else:
 *         result.flags = PyBUF_RECORDS_RO
 */
    __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;

    /* "View.MemoryView":1027
 *     Py_INCREF(Py_None)
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
 *         result.flags = PyBUF_RECORDS
 *     else:
 */
    goto __pyx_L4;
  }

  /* "View.MemoryView":1030
 *         result.flags = PyBUF_RECORDS
 *     else:
 *         result.flags = PyBUF_RECORDS_RO             # <<<<<<<<<<<<<<
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
 */
  /*else*/ {
    __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
  }
  __pyx_L4:;

  /* "View.MemoryView":1032
 *         result.flags = PyBUF_RECORDS_RO
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape             # <<<<<<<<<<<<<<
 *     result.view.strides = <Py_ssize_t *> result.from_slice.strides
 * 
 */
  __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);

  /* "View.MemoryView":1033
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
 *     result.view.strides = <Py_ssize_t *> result.from_slice.strides             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);

  /* "View.MemoryView":1036
 * 
 * 
 *     result.view.suboffsets = NULL             # <<<<<<<<<<<<<<
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:
 */
  __pyx_v_result->__pyx_base.view.suboffsets = NULL;

  /* "View.MemoryView":1037
 * 
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:             # <<<<<<<<<<<<<<
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 */
  __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
  for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
    __pyx_t_6 = __pyx_t_8;
    __pyx_v_suboffset = (__pyx_t_6[0]);

    /* "View.MemoryView":1038
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break
 */
    __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":1039
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets             # <<<<<<<<<<<<<<
 *             break
 * 
 */
      __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);

      /* "View.MemoryView":1040
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break             # <<<<<<<<<<<<<<
 * 
 *     result.view.len = result.view.itemsize
 */
      goto __pyx_L6_break;

      /* "View.MemoryView":1038
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break
 */
    }
  }
  __pyx_L6_break:;

  /* "View.MemoryView":1042
 *             break
 * 
 *     result.view.len = result.view.itemsize             # <<<<<<<<<<<<<<
 *     for length in result.view.shape[:ndim]:
 *         result.view.len *= length
 */
  __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;

  /* "View.MemoryView":1043
 * 
 *     result.view.len = result.view.itemsize
 *     for length in result.view.shape[:ndim]:             # <<<<<<<<<<<<<<
 *         result.view.len *= length
 * 
 */
  __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
  for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
    __pyx_t_6 = __pyx_t_8;
    __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "View.MemoryView":1044
 *     result.view.len = result.view.itemsize
 *     for length in result.view.shape[:ndim]:
 *         result.view.len *= length             # <<<<<<<<<<<<<<
 * 
 *     result.to_object_func = to_object_func
 */
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 1044, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
  }

  /* "View.MemoryView":1046
 *         result.view.len *= length
 * 
 *     result.to_object_func = to_object_func             # <<<<<<<<<<<<<<
 *     result.to_dtype_func = to_dtype_func
 * 
 */
  __pyx_v_result->to_object_func = __pyx_v_to_object_func;

  /* "View.MemoryView":1047
 * 
 *     result.to_object_func = to_object_func
 *     result.to_dtype_func = to_dtype_func             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
  __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;

  /* "View.MemoryView":1049
 *     result.to_dtype_func = to_dtype_func
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":999
 * 
 * @cname('__pyx_memoryview_fromslice')
 * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
 *                           int ndim,
 *                           object (*to_object_func)(char *),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1052
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')
 * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 */

static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
  struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
  __Pyx_memviewslice *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("get_slice_from_memview", 0);

  /* "View.MemoryView":1055
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         obj = memview
 *         return &obj.from_slice
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1056
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):
 *         obj = memview             # <<<<<<<<<<<<<<
 *         return &obj.from_slice
 *     else:
 */
    if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(2, 1056, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_v_memview);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":1057
 *     if isinstance(memview, _memoryviewslice):
 *         obj = memview
 *         return &obj.from_slice             # <<<<<<<<<<<<<<
 *     else:
 *         slice_copy(memview, mslice)
 */
    __pyx_r = (&__pyx_v_obj->from_slice);
    goto __pyx_L0;

    /* "View.MemoryView":1055
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         obj = memview
 *         return &obj.from_slice
 */
  }

  /* "View.MemoryView":1059
 *         return &obj.from_slice
 *     else:
 *         slice_copy(memview, mslice)             # <<<<<<<<<<<<<<
 *         return mslice
 * 
 */
  /*else*/ {
    __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);

    /* "View.MemoryView":1060
 *     else:
 *         slice_copy(memview, mslice)
 *         return mslice             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_slice_copy')
 */
    __pyx_r = __pyx_v_mslice;
    goto __pyx_L0;
  }

  /* "View.MemoryView":1052
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')
 * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1063
 * 
 * @cname('__pyx_memoryview_slice_copy')
 * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst):             # <<<<<<<<<<<<<<
 *     cdef int dim
 *     cdef (Py_ssize_t*) shape, strides, suboffsets
 */

static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
  int __pyx_v_dim;
  Py_ssize_t *__pyx_v_shape;
  Py_ssize_t *__pyx_v_strides;
  Py_ssize_t *__pyx_v_suboffsets;
  __Pyx_RefNannyDeclarations
  Py_ssize_t *__pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  __Pyx_RefNannySetupContext("slice_copy", 0);

  /* "View.MemoryView":1067
 *     cdef (Py_ssize_t*) shape, strides, suboffsets
 * 
 *     shape = memview.view.shape             # <<<<<<<<<<<<<<
 *     strides = memview.view.strides
 *     suboffsets = memview.view.suboffsets
 */
  __pyx_t_1 = __pyx_v_memview->view.shape;
  __pyx_v_shape = __pyx_t_1;

  /* "View.MemoryView":1068
 * 
 *     shape = memview.view.shape
 *     strides = memview.view.strides             # <<<<<<<<<<<<<<
 *     suboffsets = memview.view.suboffsets
 * 
 */
  __pyx_t_1 = __pyx_v_memview->view.strides;
  __pyx_v_strides = __pyx_t_1;

  /* "View.MemoryView":1069
 *     shape = memview.view.shape
 *     strides = memview.view.strides
 *     suboffsets = memview.view.suboffsets             # <<<<<<<<<<<<<<
 * 
 *     dst.memview = <__pyx_memoryview *> memview
 */
  __pyx_t_1 = __pyx_v_memview->view.suboffsets;
  __pyx_v_suboffsets = __pyx_t_1;

  /* "View.MemoryView":1071
 *     suboffsets = memview.view.suboffsets
 * 
 *     dst.memview = <__pyx_memoryview *> memview             # <<<<<<<<<<<<<<
 *     dst.data = <char *> memview.view.buf
 * 
 */
  __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);

  /* "View.MemoryView":1072
 * 
 *     dst.memview = <__pyx_memoryview *> memview
 *     dst.data = <char *> memview.view.buf             # <<<<<<<<<<<<<<
 * 
 *     for dim in range(memview.view.ndim):
 */
  __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);

  /* "View.MemoryView":1074
 *     dst.data = <char *> memview.view.buf
 * 
 *     for dim in range(memview.view.ndim):             # <<<<<<<<<<<<<<
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]
 */
  __pyx_t_2 = __pyx_v_memview->view.ndim;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_dim = __pyx_t_4;

    /* "View.MemoryView":1075
 * 
 *     for dim in range(memview.view.ndim):
 *         dst.shape[dim] = shape[dim]             # <<<<<<<<<<<<<<
 *         dst.strides[dim] = strides[dim]
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
 */
    (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);

    /* "View.MemoryView":1076
 *     for dim in range(memview.view.ndim):
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]             # <<<<<<<<<<<<<<
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
 * 
 */
    (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);

    /* "View.MemoryView":1077
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_object')
 */
    if ((__pyx_v_suboffsets != 0)) {
      __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
    } else {
      __pyx_t_5 = -1L;
    }
    (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
  }

  /* "View.MemoryView":1063
 * 
 * @cname('__pyx_memoryview_slice_copy')
 * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst):             # <<<<<<<<<<<<<<
 *     cdef int dim
 *     cdef (Py_ssize_t*) shape, strides, suboffsets
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "View.MemoryView":1080
 * 
 * @cname('__pyx_memoryview_copy_object')
 * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
 *     "Create a new memoryview object"
 *     cdef __Pyx_memviewslice memviewslice
 */

static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
  __Pyx_memviewslice __pyx_v_memviewslice;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("memoryview_copy", 0);

  /* "View.MemoryView":1083
 *     "Create a new memoryview object"
 *     cdef __Pyx_memviewslice memviewslice
 *     slice_copy(memview, &memviewslice)             # <<<<<<<<<<<<<<
 *     return memoryview_copy_from_slice(memview, &memviewslice)
 * 
 */
  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));

  /* "View.MemoryView":1084
 *     cdef __Pyx_memviewslice memviewslice
 *     slice_copy(memview, &memviewslice)
 *     return memoryview_copy_from_slice(memview, &memviewslice)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1080
 * 
 * @cname('__pyx_memoryview_copy_object')
 * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
 *     "Create a new memoryview object"
 *     cdef __Pyx_memviewslice memviewslice
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1087
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')
 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
 *     """
 *     Create a new memoryview object from a given memoryview object and slice.
 */

static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
  PyObject *(*__pyx_v_to_object_func)(char *);
  int (*__pyx_v_to_dtype_func)(char *, PyObject *);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *(*__pyx_t_3)(char *);
  int (*__pyx_t_4)(char *, PyObject *);
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);

  /* "View.MemoryView":1094
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1095
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         to_object_func = (<_memoryviewslice> memview).to_object_func             # <<<<<<<<<<<<<<
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 *     else:
 */
    __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
    __pyx_v_to_object_func = __pyx_t_3;

    /* "View.MemoryView":1096
 *     if isinstance(memview, _memoryviewslice):
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func             # <<<<<<<<<<<<<<
 *     else:
 *         to_object_func = NULL
 */
    __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
    __pyx_v_to_dtype_func = __pyx_t_4;

    /* "View.MemoryView":1094
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1098
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 *     else:
 *         to_object_func = NULL             # <<<<<<<<<<<<<<
 *         to_dtype_func = NULL
 * 
 */
  /*else*/ {
    __pyx_v_to_object_func = NULL;

    /* "View.MemoryView":1099
 *     else:
 *         to_object_func = NULL
 *         to_dtype_func = NULL             # <<<<<<<<<<<<<<
 * 
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
 */
    __pyx_v_to_dtype_func = NULL;
  }
  __pyx_L3:;

  /* "View.MemoryView":1101
 *         to_dtype_func = NULL
 * 
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,             # <<<<<<<<<<<<<<
 *                                 to_object_func, to_dtype_func,
 *                                 memview.dtype_is_object)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "View.MemoryView":1103
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
 *                                 to_object_func, to_dtype_func,
 *                                 memview.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1087
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')
 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
 *     """
 *     Create a new memoryview object from a given memoryview object and slice.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1109
 * 
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:             # <<<<<<<<<<<<<<
 *     if arg < 0:
 *         return -arg
 */

static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
  Py_ssize_t __pyx_r;
  int __pyx_t_1;

  /* "View.MemoryView":1110
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
 *     if arg < 0:             # <<<<<<<<<<<<<<
 *         return -arg
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_arg < 0) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1111
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
 *     if arg < 0:
 *         return -arg             # <<<<<<<<<<<<<<
 *     else:
 *         return arg
 */
    __pyx_r = (-__pyx_v_arg);
    goto __pyx_L0;

    /* "View.MemoryView":1110
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
 *     if arg < 0:             # <<<<<<<<<<<<<<
 *         return -arg
 *     else:
 */
  }

  /* "View.MemoryView":1113
 *         return -arg
 *     else:
 *         return arg             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_get_best_slice_order')
 */
  /*else*/ {
    __pyx_r = __pyx_v_arg;
    goto __pyx_L0;
  }

  /* "View.MemoryView":1109
 * 
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:             # <<<<<<<<<<<<<<
 *     if arg < 0:
 *         return -arg
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1116
 * 
 * @cname('__pyx_get_best_slice_order')
 * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Figure out the best memory access order for a given slice.
 */

static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
  int __pyx_v_i;
  Py_ssize_t __pyx_v_c_stride;
  Py_ssize_t __pyx_v_f_stride;
  char __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1121
 *     """
 *     cdef int i
 *     cdef Py_ssize_t c_stride = 0             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t f_stride = 0
 * 
 */
  __pyx_v_c_stride = 0;

  /* "View.MemoryView":1122
 *     cdef int i
 *     cdef Py_ssize_t c_stride = 0
 *     cdef Py_ssize_t f_stride = 0             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim - 1, -1, -1):
 */
  __pyx_v_f_stride = 0;

  /* "View.MemoryView":1124
 *     cdef Py_ssize_t f_stride = 0
 * 
 *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]
 */
  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":1125
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             c_stride = mslice.strides[i]
 *             break
 */
    __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1126
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
 *             break
 * 
 */
      __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);

      /* "View.MemoryView":1127
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]
 *             break             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim):
 */
      goto __pyx_L4_break;

      /* "View.MemoryView":1125
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             c_stride = mslice.strides[i]
 *             break
 */
    }
  }
  __pyx_L4_break:;

  /* "View.MemoryView":1129
 *             break
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]
 */
  __pyx_t_1 = __pyx_v_ndim;
  __pyx_t_3 = __pyx_t_1;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "View.MemoryView":1130
 * 
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             f_stride = mslice.strides[i]
 *             break
 */
    __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1131
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
 *             break
 * 
 */
      __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);

      /* "View.MemoryView":1132
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]
 *             break             # <<<<<<<<<<<<<<
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
 */
      goto __pyx_L7_break;

      /* "View.MemoryView":1130
 * 
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             f_stride = mslice.strides[i]
 *             break
 */
    }
  }
  __pyx_L7_break:;

  /* "View.MemoryView":1134
 *             break
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
 *         return 'C'
 *     else:
 */
  __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1135
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
 *         return 'C'             # <<<<<<<<<<<<<<
 *     else:
 *         return 'F'
 */
    __pyx_r = 'C';
    goto __pyx_L0;

    /* "View.MemoryView":1134
 *             break
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
 *         return 'C'
 *     else:
 */
  }

  /* "View.MemoryView":1137
 *         return 'C'
 *     else:
 *         return 'F'             # <<<<<<<<<<<<<<
 * 
 * @cython.cdivision(True)
 */
  /*else*/ {
    __pyx_r = 'F';
    goto __pyx_L0;
  }

  /* "View.MemoryView":1116
 * 
 * @cname('__pyx_get_best_slice_order')
 * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Figure out the best memory access order for a given slice.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1140
 * 
 * @cython.cdivision(True)
 * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
 *                                    char *dst_data, Py_ssize_t *dst_strides,
 *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
 */

static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
  Py_ssize_t __pyx_v_dst_extent;
  Py_ssize_t __pyx_v_src_stride;
  Py_ssize_t __pyx_v_dst_stride;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;

  /* "View.MemoryView":1147
 * 
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t src_extent = src_shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]
 */
  __pyx_v_src_extent = (__pyx_v_src_shape[0]);

  /* "View.MemoryView":1148
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t src_extent = src_shape[0]
 *     cdef Py_ssize_t dst_extent = dst_shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t src_stride = src_strides[0]
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 */
  __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);

  /* "View.MemoryView":1149
 *     cdef Py_ssize_t src_extent = src_shape[0]
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 */
  __pyx_v_src_stride = (__pyx_v_src_strides[0]);

  /* "View.MemoryView":1150
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]
 *     cdef Py_ssize_t dst_stride = dst_strides[0]             # <<<<<<<<<<<<<<
 * 
 *     if ndim == 1:
 */
  __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);

  /* "View.MemoryView":1152
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *        if (src_stride > 0 and dst_stride > 0 and
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 */
  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1153
 * 
 *     if ndim == 1:
 *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 *            memcpy(dst_data, src_data, itemsize * dst_extent)
 */
    __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }

    /* "View.MemoryView":1154
 *     if ndim == 1:
 *        if (src_stride > 0 and dst_stride > 0 and
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):             # <<<<<<<<<<<<<<
 *            memcpy(dst_data, src_data, itemsize * dst_extent)
 *        else:
 */
    __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
    if (__pyx_t_2) {
      __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
    }
    __pyx_t_3 = (__pyx_t_2 != 0);
    __pyx_t_1 = __pyx_t_3;
    __pyx_L5_bool_binop_done:;

    /* "View.MemoryView":1153
 * 
 *     if ndim == 1:
 *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 *            memcpy(dst_data, src_data, itemsize * dst_extent)
 */
    if (__pyx_t_1) {

      /* "View.MemoryView":1155
 *        if (src_stride > 0 and dst_stride > 0 and
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 *            memcpy(dst_data, src_data, itemsize * dst_extent)             # <<<<<<<<<<<<<<
 *        else:
 *            for i in range(dst_extent):
 */
      (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));

      /* "View.MemoryView":1153
 * 
 *     if ndim == 1:
 *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 *            memcpy(dst_data, src_data, itemsize * dst_extent)
 */
      goto __pyx_L4;
    }

    /* "View.MemoryView":1157
 *            memcpy(dst_data, src_data, itemsize * dst_extent)
 *        else:
 *            for i in range(dst_extent):             # <<<<<<<<<<<<<<
 *                memcpy(dst_data, src_data, itemsize)
 *                src_data += src_stride
 */
    /*else*/ {
      __pyx_t_4 = __pyx_v_dst_extent;
      __pyx_t_5 = __pyx_t_4;
      for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
        __pyx_v_i = __pyx_t_6;

        /* "View.MemoryView":1158
 *        else:
 *            for i in range(dst_extent):
 *                memcpy(dst_data, src_data, itemsize)             # <<<<<<<<<<<<<<
 *                src_data += src_stride
 *                dst_data += dst_stride
 */
        (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));

        /* "View.MemoryView":1159
 *            for i in range(dst_extent):
 *                memcpy(dst_data, src_data, itemsize)
 *                src_data += src_stride             # <<<<<<<<<<<<<<
 *                dst_data += dst_stride
 *     else:
 */
        __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);

        /* "View.MemoryView":1160
 *                memcpy(dst_data, src_data, itemsize)
 *                src_data += src_stride
 *                dst_data += dst_stride             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(dst_extent):
 */
        __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
      }
    }
    __pyx_L4:;

    /* "View.MemoryView":1152
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *        if (src_stride > 0 and dst_stride > 0 and
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1162
 *                dst_data += dst_stride
 *     else:
 *         for i in range(dst_extent):             # <<<<<<<<<<<<<<
 *             _copy_strided_to_strided(src_data, src_strides + 1,
 *                                      dst_data, dst_strides + 1,
 */
  /*else*/ {
    __pyx_t_4 = __pyx_v_dst_extent;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "View.MemoryView":1163
 *     else:
 *         for i in range(dst_extent):
 *             _copy_strided_to_strided(src_data, src_strides + 1,             # <<<<<<<<<<<<<<
 *                                      dst_data, dst_strides + 1,
 *                                      src_shape + 1, dst_shape + 1,
 */
      _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);

      /* "View.MemoryView":1167
 *                                      src_shape + 1, dst_shape + 1,
 *                                      ndim - 1, itemsize)
 *             src_data += src_stride             # <<<<<<<<<<<<<<
 *             dst_data += dst_stride
 * 
 */
      __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);

      /* "View.MemoryView":1168
 *                                      ndim - 1, itemsize)
 *             src_data += src_stride
 *             dst_data += dst_stride             # <<<<<<<<<<<<<<
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
 */
      __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1140
 * 
 * @cython.cdivision(True)
 * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
 *                                    char *dst_data, Py_ssize_t *dst_strides,
 *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
 */

  /* function exit code */
}

/* "View.MemoryView":1170
 *             dst_data += dst_stride
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) nogil:
 */

static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {

  /* "View.MemoryView":1173
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) nogil:
 *     _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides,             # <<<<<<<<<<<<<<
 *                              src.shape, dst.shape, ndim, itemsize)
 * 
 */
  _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);

  /* "View.MemoryView":1170
 *             dst_data += dst_stride
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) nogil:
 */

  /* function exit code */
}

/* "View.MemoryView":1177
 * 
 * @cname('__pyx_memoryview_slice_get_size')
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:             # <<<<<<<<<<<<<<
 *     "Return the size of the memory occupied by the slice in number of bytes"
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
 */

static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
  Py_ssize_t __pyx_v_shape;
  Py_ssize_t __pyx_v_size;
  Py_ssize_t __pyx_r;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;

  /* "View.MemoryView":1179
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:
 *     "Return the size of the memory occupied by the slice in number of bytes"
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     for shape in src.shape[:ndim]:
 */
  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
  __pyx_v_size = __pyx_t_1;

  /* "View.MemoryView":1181
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
 * 
 *     for shape in src.shape[:ndim]:             # <<<<<<<<<<<<<<
 *         size *= shape
 * 
 */
  __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
  for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
    __pyx_t_2 = __pyx_t_4;
    __pyx_v_shape = (__pyx_t_2[0]);

    /* "View.MemoryView":1182
 * 
 *     for shape in src.shape[:ndim]:
 *         size *= shape             # <<<<<<<<<<<<<<
 * 
 *     return size
 */
    __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
  }

  /* "View.MemoryView":1184
 *         size *= shape
 * 
 *     return size             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_fill_contig_strides_array')
 */
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "View.MemoryView":1177
 * 
 * @cname('__pyx_memoryview_slice_get_size')
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:             # <<<<<<<<<<<<<<
 *     "Return the size of the memory occupied by the slice in number of bytes"
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1187
 * 
 * @cname('__pyx_fill_contig_strides_array')
 * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
 *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
 *                 int ndim, char order) nogil:
 */

static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
  int __pyx_v_idx;
  Py_ssize_t __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1196
 *     cdef int idx
 * 
 *     if order == 'F':             # <<<<<<<<<<<<<<
 *         for idx in range(ndim):
 *             strides[idx] = stride
 */
  __pyx_t_1 = ((__pyx_v_order == 'F') != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1197
 * 
 *     if order == 'F':
 *         for idx in range(ndim):             # <<<<<<<<<<<<<<
 *             strides[idx] = stride
 *             stride *= shape[idx]
 */
    __pyx_t_2 = __pyx_v_ndim;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_idx = __pyx_t_4;

      /* "View.MemoryView":1198
 *     if order == 'F':
 *         for idx in range(ndim):
 *             strides[idx] = stride             # <<<<<<<<<<<<<<
 *             stride *= shape[idx]
 *     else:
 */
      (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;

      /* "View.MemoryView":1199
 *         for idx in range(ndim):
 *             strides[idx] = stride
 *             stride *= shape[idx]             # <<<<<<<<<<<<<<
 *     else:
 *         for idx in range(ndim - 1, -1, -1):
 */
      __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
    }

    /* "View.MemoryView":1196
 *     cdef int idx
 * 
 *     if order == 'F':             # <<<<<<<<<<<<<<
 *         for idx in range(ndim):
 *             strides[idx] = stride
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1201
 *             stride *= shape[idx]
 *     else:
 *         for idx in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *             strides[idx] = stride
 *             stride *= shape[idx]
 */
  /*else*/ {
    for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
      __pyx_v_idx = __pyx_t_2;

      /* "View.MemoryView":1202
 *     else:
 *         for idx in range(ndim - 1, -1, -1):
 *             strides[idx] = stride             # <<<<<<<<<<<<<<
 *             stride *= shape[idx]
 * 
 */
      (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;

      /* "View.MemoryView":1203
 *         for idx in range(ndim - 1, -1, -1):
 *             strides[idx] = stride
 *             stride *= shape[idx]             # <<<<<<<<<<<<<<
 * 
 *     return stride
 */
      __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1205
 *             stride *= shape[idx]
 * 
 *     return stride             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')
 */
  __pyx_r = __pyx_v_stride;
  goto __pyx_L0;

  /* "View.MemoryView":1187
 * 
 * @cname('__pyx_fill_contig_strides_array')
 * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
 *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
 *                 int ndim, char order) nogil:
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1208
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')
 * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                              __Pyx_memviewslice *tmpslice,
 *                              char order,
 */

static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
  int __pyx_v_i;
  void *__pyx_v_result;
  size_t __pyx_v_itemsize;
  size_t __pyx_v_size;
  void *__pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_memoryview_obj *__pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;

  /* "View.MemoryView":1219
 *     cdef void *result
 * 
 *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 *     cdef size_t size = slice_get_size(src, ndim)
 * 
 */
  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":1220
 * 
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef size_t size = slice_get_size(src, ndim)             # <<<<<<<<<<<<<<
 * 
 *     result = malloc(size)
 */
  __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);

  /* "View.MemoryView":1222
 *     cdef size_t size = slice_get_size(src, ndim)
 * 
 *     result = malloc(size)             # <<<<<<<<<<<<<<
 *     if not result:
 *         _err(MemoryError, NULL)
 */
  __pyx_v_result = malloc(__pyx_v_size);

  /* "View.MemoryView":1223
 * 
 *     result = malloc(size)
 *     if not result:             # <<<<<<<<<<<<<<
 *         _err(MemoryError, NULL)
 * 
 */
  __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1224
 *     result = malloc(size)
 *     if not result:
 *         _err(MemoryError, NULL)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 1224, __pyx_L1_error)

    /* "View.MemoryView":1223
 * 
 *     result = malloc(size)
 *     if not result:             # <<<<<<<<<<<<<<
 *         _err(MemoryError, NULL)
 * 
 */
  }

  /* "View.MemoryView":1227
 * 
 * 
 *     tmpslice.data = <char *> result             # <<<<<<<<<<<<<<
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):
 */
  __pyx_v_tmpslice->data = ((char *)__pyx_v_result);

  /* "View.MemoryView":1228
 * 
 *     tmpslice.data = <char *> result
 *     tmpslice.memview = src.memview             # <<<<<<<<<<<<<<
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]
 */
  __pyx_t_4 = __pyx_v_src->memview;
  __pyx_v_tmpslice->memview = __pyx_t_4;

  /* "View.MemoryView":1229
 *     tmpslice.data = <char *> result
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         tmpslice.shape[i] = src.shape[i]
 *         tmpslice.suboffsets[i] = -1
 */
  __pyx_t_3 = __pyx_v_ndim;
  __pyx_t_5 = __pyx_t_3;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "View.MemoryView":1230
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]             # <<<<<<<<<<<<<<
 *         tmpslice.suboffsets[i] = -1
 * 
 */
    (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);

    /* "View.MemoryView":1231
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]
 *         tmpslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
 * 
 *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,
 */
    (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
  }

  /* "View.MemoryView":1233
 *         tmpslice.suboffsets[i] = -1
 * 
 *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,             # <<<<<<<<<<<<<<
 *                               ndim, order)
 * 
 */
  (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));

  /* "View.MemoryView":1237
 * 
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if tmpslice.shape[i] == 1:
 *             tmpslice.strides[i] = 0
 */
  __pyx_t_3 = __pyx_v_ndim;
  __pyx_t_5 = __pyx_t_3;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "View.MemoryView":1238
 * 
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
 *             tmpslice.strides[i] = 0
 * 
 */
    __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1239
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:
 *             tmpslice.strides[i] = 0             # <<<<<<<<<<<<<<
 * 
 *     if slice_is_contig(src[0], order, ndim):
 */
      (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;

      /* "View.MemoryView":1238
 * 
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
 *             tmpslice.strides[i] = 0
 * 
 */
    }
  }

  /* "View.MemoryView":1241
 *             tmpslice.strides[i] = 0
 * 
 *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
 *         memcpy(result, src.data, size)
 *     else:
 */
  __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1242
 * 
 *     if slice_is_contig(src[0], order, ndim):
 *         memcpy(result, src.data, size)             # <<<<<<<<<<<<<<
 *     else:
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
 */
    (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));

    /* "View.MemoryView":1241
 *             tmpslice.strides[i] = 0
 * 
 *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
 *         memcpy(result, src.data, size)
 *     else:
 */
    goto __pyx_L9;
  }

  /* "View.MemoryView":1244
 *         memcpy(result, src.data, size)
 *     else:
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
  /*else*/ {
    copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
  }
  __pyx_L9:;

  /* "View.MemoryView":1246
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "View.MemoryView":1208
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')
 * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                              __Pyx_memviewslice *tmpslice,
 *                              char order,
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1251
 * 
 * @cname('__pyx_memoryview_err_extents')
 * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
 */

static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("_err_extents", 0);

  /* "View.MemoryView":1254
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
 *                                                         (i, extent1, extent2))             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_err_dim')
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;

  /* "View.MemoryView":1253
 * cdef int _err_extents(int i, Py_ssize_t extent1,
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %             # <<<<<<<<<<<<<<
 *                                                         (i, extent1, extent2))
 * 
 */
  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __PYX_ERR(2, 1253, __pyx_L1_error)

  /* "View.MemoryView":1251
 * 
 * @cname('__pyx_memoryview_err_extents')
 * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "View.MemoryView":1257
 * 
 * @cname('__pyx_memoryview_err_dim')
 * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
 *     raise error(msg.decode('ascii') % dim)
 * 
 */

static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("_err_dim", 0);
  __Pyx_INCREF(__pyx_v_error);

  /* "View.MemoryView":1258
 * @cname('__pyx_memoryview_err_dim')
 * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
 *     raise error(msg.decode('ascii') % dim)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_err')
 */
  __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_v_error);
  __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(2, 1258, __pyx_L1_error)

  /* "View.MemoryView":1257
 * 
 * @cname('__pyx_memoryview_err_dim')
 * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
 *     raise error(msg.decode('ascii') % dim)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_error);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "View.MemoryView":1261
 * 
 * @cname('__pyx_memoryview_err')
 * cdef int _err(object error, char *msg) except -1 with gil:             # <<<<<<<<<<<<<<
 *     if msg != NULL:
 *         raise error(msg.decode('ascii'))
 */

static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("_err", 0);
  __Pyx_INCREF(__pyx_v_error);

  /* "View.MemoryView":1262
 * @cname('__pyx_memoryview_err')
 * cdef int _err(object error, char *msg) except -1 with gil:
 *     if msg != NULL:             # <<<<<<<<<<<<<<
 *         raise error(msg.decode('ascii'))
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_msg != NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":1263
 * cdef int _err(object error, char *msg) except -1 with gil:
 *     if msg != NULL:
 *         raise error(msg.decode('ascii'))             # <<<<<<<<<<<<<<
 *     else:
 *         raise error
 */
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_error);
    __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1263, __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(2, 1263, __pyx_L1_error)

    /* "View.MemoryView":1262
 * @cname('__pyx_memoryview_err')
 * cdef int _err(object error, char *msg) except -1 with gil:
 *     if msg != NULL:             # <<<<<<<<<<<<<<
 *         raise error(msg.decode('ascii'))
 *     else:
 */
  }

  /* "View.MemoryView":1265
 *         raise error(msg.decode('ascii'))
 *     else:
 *         raise error             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_contents')
 */
  /*else*/ {
    __Pyx_Raise(__pyx_v_error, 0, 0, 0);
    __PYX_ERR(2, 1265, __pyx_L1_error)
  }

  /* "View.MemoryView":1261
 * 
 * @cname('__pyx_memoryview_err')
 * cdef int _err(object error, char *msg) except -1 with gil:             # <<<<<<<<<<<<<<
 *     if msg != NULL:
 *         raise error(msg.decode('ascii'))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_error);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "View.MemoryView":1268
 * 
 * @cname('__pyx_memoryview_copy_contents')
 * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice dst,
 *                                   int src_ndim, int dst_ndim,
 */

static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
  void *__pyx_v_tmpdata;
  size_t __pyx_v_itemsize;
  int __pyx_v_i;
  char __pyx_v_order;
  int __pyx_v_broadcasting;
  int __pyx_v_direct_copy;
  __Pyx_memviewslice __pyx_v_tmp;
  int __pyx_v_ndim;
  int __pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  void *__pyx_t_7;
  int __pyx_t_8;

  /* "View.MemoryView":1276
 *     Check for overlapping memory and verify the shapes.
 *     """
 *     cdef void *tmpdata = NULL             # <<<<<<<<<<<<<<
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef int i
 */
  __pyx_v_tmpdata = NULL;

  /* "View.MemoryView":1277
 *     """
 *     cdef void *tmpdata = NULL
 *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)
 */
  __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":1279
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)             # <<<<<<<<<<<<<<
 *     cdef bint broadcasting = False
 *     cdef bint direct_copy = False
 */
  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);

  /* "View.MemoryView":1280
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)
 *     cdef bint broadcasting = False             # <<<<<<<<<<<<<<
 *     cdef bint direct_copy = False
 *     cdef __Pyx_memviewslice tmp
 */
  __pyx_v_broadcasting = 0;

  /* "View.MemoryView":1281
 *     cdef char order = get_best_order(&src, src_ndim)
 *     cdef bint broadcasting = False
 *     cdef bint direct_copy = False             # <<<<<<<<<<<<<<
 *     cdef __Pyx_memviewslice tmp
 * 
 */
  __pyx_v_direct_copy = 0;

  /* "View.MemoryView":1284
 *     cdef __Pyx_memviewslice tmp
 * 
 *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
 */
  __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1285
 * 
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
 *     elif dst_ndim < src_ndim:
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 */
    __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);

    /* "View.MemoryView":1284
 *     cdef __Pyx_memviewslice tmp
 * 
 *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1286
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
 */
  __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1287
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
 *         broadcast_leading(&dst, dst_ndim, src_ndim)             # <<<<<<<<<<<<<<
 * 
 *     cdef int ndim = max(src_ndim, dst_ndim)
 */
    __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);

    /* "View.MemoryView":1286
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
 */
  }
  __pyx_L3:;

  /* "View.MemoryView":1289
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
 *     cdef int ndim = max(src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim):
 */
  __pyx_t_3 = __pyx_v_dst_ndim;
  __pyx_t_4 = __pyx_v_src_ndim;
  if (((__pyx_t_3 > __pyx_t_4) != 0)) {
    __pyx_t_5 = __pyx_t_3;
  } else {
    __pyx_t_5 = __pyx_t_4;
  }
  __pyx_v_ndim = __pyx_t_5;

  /* "View.MemoryView":1291
 *     cdef int ndim = max(src_ndim, dst_ndim)
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:
 */
  __pyx_t_5 = __pyx_v_ndim;
  __pyx_t_3 = __pyx_t_5;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "View.MemoryView":1292
 * 
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
 *             if src.shape[i] == 1:
 *                 broadcasting = True
 */
    __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1293
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
 *                 broadcasting = True
 *                 src.strides[i] = 0
 */
      __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":1294
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:
 *                 broadcasting = True             # <<<<<<<<<<<<<<
 *                 src.strides[i] = 0
 *             else:
 */
        __pyx_v_broadcasting = 1;

        /* "View.MemoryView":1295
 *             if src.shape[i] == 1:
 *                 broadcasting = True
 *                 src.strides[i] = 0             # <<<<<<<<<<<<<<
 *             else:
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 */
        (__pyx_v_src.strides[__pyx_v_i]) = 0;

        /* "View.MemoryView":1293
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
 *                 broadcasting = True
 *                 src.strides[i] = 0
 */
        goto __pyx_L7;
      }

      /* "View.MemoryView":1297
 *                 src.strides[i] = 0
 *             else:
 *                 _err_extents(i, dst.shape[i], src.shape[i])             # <<<<<<<<<<<<<<
 * 
 *         if src.suboffsets[i] >= 0:
 */
      /*else*/ {
        __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 1297, __pyx_L1_error)
      }
      __pyx_L7:;

      /* "View.MemoryView":1292
 * 
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
 *             if src.shape[i] == 1:
 *                 broadcasting = True
 */
    }

    /* "View.MemoryView":1299
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 * 
 *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
 *             _err_dim(ValueError, "Dimension %d is not direct", i)
 * 
 */
    __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1300
 * 
 *         if src.suboffsets[i] >= 0:
 *             _err_dim(ValueError, "Dimension %d is not direct", i)             # <<<<<<<<<<<<<<
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 */
      __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 1300, __pyx_L1_error)

      /* "View.MemoryView":1299
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 * 
 *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
 *             _err_dim(ValueError, "Dimension %d is not direct", i)
 * 
 */
    }
  }

  /* "View.MemoryView":1302
 *             _err_dim(ValueError, "Dimension %d is not direct", i)
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
 * 
 *         if not slice_is_contig(src, order, ndim):
 */
  __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1304
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 * 
 *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
 *             order = get_best_order(&dst, ndim)
 * 
 */
    __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1305
 * 
 *         if not slice_is_contig(src, order, ndim):
 *             order = get_best_order(&dst, ndim)             # <<<<<<<<<<<<<<
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
 */
      __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);

      /* "View.MemoryView":1304
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 * 
 *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
 *             order = get_best_order(&dst, ndim)
 * 
 */
    }

    /* "View.MemoryView":1307
 *             order = get_best_order(&dst, ndim)
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)             # <<<<<<<<<<<<<<
 *         src = tmp
 * 
 */
    __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(2, 1307, __pyx_L1_error)
    __pyx_v_tmpdata = __pyx_t_7;

    /* "View.MemoryView":1308
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
 *         src = tmp             # <<<<<<<<<<<<<<
 * 
 *     if not broadcasting:
 */
    __pyx_v_src = __pyx_v_tmp;

    /* "View.MemoryView":1302
 *             _err_dim(ValueError, "Dimension %d is not direct", i)
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
 * 
 *         if not slice_is_contig(src, order, ndim):
 */
  }

  /* "View.MemoryView":1310
 *         src = tmp
 * 
 *     if not broadcasting:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1313
 * 
 * 
 *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
 */
    __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1314
 * 
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)             # <<<<<<<<<<<<<<
 *         elif slice_is_contig(src, 'F', ndim):
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 */
      __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);

      /* "View.MemoryView":1313
 * 
 * 
 *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
 */
      goto __pyx_L12;
    }

    /* "View.MemoryView":1315
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 */
    __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1316
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
 *             direct_copy = slice_is_contig(dst, 'F', ndim)             # <<<<<<<<<<<<<<
 * 
 *         if direct_copy:
 */
      __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);

      /* "View.MemoryView":1315
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 */
    }
    __pyx_L12:;

    /* "View.MemoryView":1318
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 *         if direct_copy:             # <<<<<<<<<<<<<<
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, False)
 */
    __pyx_t_2 = (__pyx_v_direct_copy != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1320
 *         if direct_copy:
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, True)
 */
      __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

      /* "View.MemoryView":1321
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, False)
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))             # <<<<<<<<<<<<<<
 *             refcount_copying(&dst, dtype_is_object, ndim, True)
 *             free(tmpdata)
 */
      (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));

      /* "View.MemoryView":1322
 *             refcount_copying(&dst, dtype_is_object, ndim, False)
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
 *             free(tmpdata)
 *             return 0
 */
      __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

      /* "View.MemoryView":1323
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, True)
 *             free(tmpdata)             # <<<<<<<<<<<<<<
 *             return 0
 * 
 */
      free(__pyx_v_tmpdata);

      /* "View.MemoryView":1324
 *             refcount_copying(&dst, dtype_is_object, ndim, True)
 *             free(tmpdata)
 *             return 0             # <<<<<<<<<<<<<<
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):
 */
      __pyx_r = 0;
      goto __pyx_L0;

      /* "View.MemoryView":1318
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 *         if direct_copy:             # <<<<<<<<<<<<<<
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, False)
 */
    }

    /* "View.MemoryView":1310
 *         src = tmp
 * 
 *     if not broadcasting:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  }

  /* "View.MemoryView":1326
 *             return 0
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (__pyx_v_order == 'F');
  if (__pyx_t_2) {
    __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
  }
  __pyx_t_8 = (__pyx_t_2 != 0);
  if (__pyx_t_8) {

    /* "View.MemoryView":1329
 * 
 * 
 *         transpose_memslice(&src)             # <<<<<<<<<<<<<<
 *         transpose_memslice(&dst)
 * 
 */
    __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(2, 1329, __pyx_L1_error)

    /* "View.MemoryView":1330
 * 
 *         transpose_memslice(&src)
 *         transpose_memslice(&dst)             # <<<<<<<<<<<<<<
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, False)
 */
    __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(2, 1330, __pyx_L1_error)

    /* "View.MemoryView":1326
 *             return 0
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
 * 
 * 
 */
  }

  /* "View.MemoryView":1332
 *         transpose_memslice(&dst)
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
 *     refcount_copying(&dst, dtype_is_object, ndim, True)
 */
  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

  /* "View.MemoryView":1333
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, False)
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)             # <<<<<<<<<<<<<<
 *     refcount_copying(&dst, dtype_is_object, ndim, True)
 * 
 */
  copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);

  /* "View.MemoryView":1334
 *     refcount_copying(&dst, dtype_is_object, ndim, False)
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
 *     refcount_copying(&dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
 * 
 *     free(tmpdata)
 */
  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

  /* "View.MemoryView":1336
 *     refcount_copying(&dst, dtype_is_object, ndim, True)
 * 
 *     free(tmpdata)             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
  free(__pyx_v_tmpdata);

  /* "View.MemoryView":1337
 * 
 *     free(tmpdata)
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_broadcast_leading')
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1268
 * 
 * @cname('__pyx_memoryview_copy_contents')
 * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice dst,
 *                                   int src_ndim, int dst_ndim,
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1340
 * 
 * @cname('__pyx_memoryview_broadcast_leading')
 * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
 *                             int ndim,
 *                             int ndim_other) nogil:
 */

static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
  int __pyx_v_i;
  int __pyx_v_offset;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "View.MemoryView":1344
 *                             int ndim_other) nogil:
 *     cdef int i
 *     cdef int offset = ndim_other - ndim             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim - 1, -1, -1):
 */
  __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);

  /* "View.MemoryView":1346
 *     cdef int offset = ndim_other - ndim
 * 
 *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]
 */
  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":1347
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         mslice.shape[i + offset] = mslice.shape[i]             # <<<<<<<<<<<<<<
 *         mslice.strides[i + offset] = mslice.strides[i]
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 */
    (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);

    /* "View.MemoryView":1348
 *     for i in range(ndim - 1, -1, -1):
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]             # <<<<<<<<<<<<<<
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 * 
 */
    (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);

    /* "View.MemoryView":1349
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]             # <<<<<<<<<<<<<<
 * 
 *     for i in range(offset):
 */
    (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
  }

  /* "View.MemoryView":1351
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 * 
 *     for i in range(offset):             # <<<<<<<<<<<<<<
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]
 */
  __pyx_t_1 = __pyx_v_offset;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "View.MemoryView":1352
 * 
 *     for i in range(offset):
 *         mslice.shape[i] = 1             # <<<<<<<<<<<<<<
 *         mslice.strides[i] = mslice.strides[0]
 *         mslice.suboffsets[i] = -1
 */
    (__pyx_v_mslice->shape[__pyx_v_i]) = 1;

    /* "View.MemoryView":1353
 *     for i in range(offset):
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]             # <<<<<<<<<<<<<<
 *         mslice.suboffsets[i] = -1
 * 
 */
    (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);

    /* "View.MemoryView":1354
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]
 *         mslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
 * 
 * 
 */
    (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
  }

  /* "View.MemoryView":1340
 * 
 * @cname('__pyx_memoryview_broadcast_leading')
 * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
 *                             int ndim,
 *                             int ndim_other) nogil:
 */

  /* function exit code */
}

/* "View.MemoryView":1362
 * 
 * @cname('__pyx_memoryview_refcount_copying')
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object,             # <<<<<<<<<<<<<<
 *                            int ndim, bint inc) nogil:
 * 
 */

static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
  int __pyx_t_1;

  /* "View.MemoryView":1366
 * 
 * 
 *     if dtype_is_object:             # <<<<<<<<<<<<<<
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,
 *                                            dst.strides, ndim, inc)
 */
  __pyx_t_1 = (__pyx_v_dtype_is_object != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1367
 * 
 *     if dtype_is_object:
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,             # <<<<<<<<<<<<<<
 *                                            dst.strides, ndim, inc)
 * 
 */
    __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);

    /* "View.MemoryView":1366
 * 
 * 
 *     if dtype_is_object:             # <<<<<<<<<<<<<<
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,
 *                                            dst.strides, ndim, inc)
 */
  }

  /* "View.MemoryView":1362
 * 
 * @cname('__pyx_memoryview_refcount_copying')
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object,             # <<<<<<<<<<<<<<
 *                            int ndim, bint inc) nogil:
 * 
 */

  /* function exit code */
}

/* "View.MemoryView":1371
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
 * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                              Py_ssize_t *strides, int ndim,
 *                                              bint inc) with gil:
 */

static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
  __Pyx_RefNannyDeclarations
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0);

  /* "View.MemoryView":1374
 *                                              Py_ssize_t *strides, int ndim,
 *                                              bint inc) with gil:
 *     refcount_objects_in_slice(data, shape, strides, ndim, inc)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')
 */
  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);

  /* "View.MemoryView":1371
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
 * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                              Py_ssize_t *strides, int ndim,
 *                                              bint inc) with gil:
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "View.MemoryView":1377
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')
 * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                     Py_ssize_t *strides, int ndim, bint inc):
 *     cdef Py_ssize_t i
 */

static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0);

  /* "View.MemoryView":1381
 *     cdef Py_ssize_t i
 * 
 *     for i in range(shape[0]):             # <<<<<<<<<<<<<<
 *         if ndim == 1:
 *             if inc:
 */
  __pyx_t_1 = (__pyx_v_shape[0]);
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "View.MemoryView":1382
 * 
 *     for i in range(shape[0]):
 *         if ndim == 1:             # <<<<<<<<<<<<<<
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])
 */
    __pyx_t_4 = ((__pyx_v_ndim == 1) != 0);
    if (__pyx_t_4) {

      /* "View.MemoryView":1383
 *     for i in range(shape[0]):
 *         if ndim == 1:
 *             if inc:             # <<<<<<<<<<<<<<
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
 */
      __pyx_t_4 = (__pyx_v_inc != 0);
      if (__pyx_t_4) {

        /* "View.MemoryView":1384
 *         if ndim == 1:
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
 *             else:
 *                 Py_DECREF((<PyObject **> data)[0])
 */
        Py_INCREF((((PyObject **)__pyx_v_data)[0]));

        /* "View.MemoryView":1383
 *     for i in range(shape[0]):
 *         if ndim == 1:
 *             if inc:             # <<<<<<<<<<<<<<
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
 */
        goto __pyx_L6;
      }

      /* "View.MemoryView":1386
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
 *                 Py_DECREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
 *         else:
 *             refcount_objects_in_slice(data, shape + 1, strides + 1,
 */
      /*else*/ {
        Py_DECREF((((PyObject **)__pyx_v_data)[0]));
      }
      __pyx_L6:;

      /* "View.MemoryView":1382
 * 
 *     for i in range(shape[0]):
 *         if ndim == 1:             # <<<<<<<<<<<<<<
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])
 */
      goto __pyx_L5;
    }

    /* "View.MemoryView":1388
 *                 Py_DECREF((<PyObject **> data)[0])
 *         else:
 *             refcount_objects_in_slice(data, shape + 1, strides + 1,             # <<<<<<<<<<<<<<
 *                                       ndim - 1, inc)
 * 
 */
    /*else*/ {

      /* "View.MemoryView":1389
 *         else:
 *             refcount_objects_in_slice(data, shape + 1, strides + 1,
 *                                       ndim - 1, inc)             # <<<<<<<<<<<<<<
 * 
 *         data += strides[0]
 */
      __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
    }
    __pyx_L5:;

    /* "View.MemoryView":1391
 *                                       ndim - 1, inc)
 * 
 *         data += strides[0]             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));
  }

  /* "View.MemoryView":1377
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')
 * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                     Py_ssize_t *strides, int ndim, bint inc):
 *     cdef Py_ssize_t i
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "View.MemoryView":1397
 * 
 * @cname('__pyx_memoryview_slice_assign_scalar')
 * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
 *                               size_t itemsize, void *item,
 *                               bint dtype_is_object) nogil:
 */

static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {

  /* "View.MemoryView":1400
 *                               size_t itemsize, void *item,
 *                               bint dtype_is_object) nogil:
 *     refcount_copying(dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
 *                          itemsize, item)
 */
  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

  /* "View.MemoryView":1401
 *                               bint dtype_is_object) nogil:
 *     refcount_copying(dst, dtype_is_object, ndim, False)
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,             # <<<<<<<<<<<<<<
 *                          itemsize, item)
 *     refcount_copying(dst, dtype_is_object, ndim, True)
 */
  __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);

  /* "View.MemoryView":1403
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
 *                          itemsize, item)
 *     refcount_copying(dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

  /* "View.MemoryView":1397
 * 
 * @cname('__pyx_memoryview_slice_assign_scalar')
 * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
 *                               size_t itemsize, void *item,
 *                               bint dtype_is_object) nogil:
 */

  /* function exit code */
}

/* "View.MemoryView":1407
 * 
 * @cname('__pyx_memoryview__slice_assign_scalar')
 * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                               Py_ssize_t *strides, int ndim,
 *                               size_t itemsize, void *item) nogil:
 */

static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_stride;
  Py_ssize_t __pyx_v_extent;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;

  /* "View.MemoryView":1411
 *                               size_t itemsize, void *item) nogil:
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t extent = shape[0]
 * 
 */
  __pyx_v_stride = (__pyx_v_strides[0]);

  /* "View.MemoryView":1412
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t stride = strides[0]
 *     cdef Py_ssize_t extent = shape[0]             # <<<<<<<<<<<<<<
 * 
 *     if ndim == 1:
 */
  __pyx_v_extent = (__pyx_v_shape[0]);

  /* "View.MemoryView":1414
 *     cdef Py_ssize_t extent = shape[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
 */
  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1415
 * 
 *     if ndim == 1:
 *         for i in range(extent):             # <<<<<<<<<<<<<<
 *             memcpy(data, item, itemsize)
 *             data += stride
 */
    __pyx_t_2 = __pyx_v_extent;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":1416
 *     if ndim == 1:
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)             # <<<<<<<<<<<<<<
 *             data += stride
 *     else:
 */
      (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));

      /* "View.MemoryView":1417
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
 *             data += stride             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(extent):
 */
      __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
    }

    /* "View.MemoryView":1414
 *     cdef Py_ssize_t extent = shape[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1419
 *             data += stride
 *     else:
 *         for i in range(extent):             # <<<<<<<<<<<<<<
 *             _slice_assign_scalar(data, shape + 1, strides + 1,
 *                                 ndim - 1, itemsize, item)
 */
  /*else*/ {
    __pyx_t_2 = __pyx_v_extent;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":1420
 *     else:
 *         for i in range(extent):
 *             _slice_assign_scalar(data, shape + 1, strides + 1,             # <<<<<<<<<<<<<<
 *                                 ndim - 1, itemsize, item)
 *             data += stride
 */
      __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);

      /* "View.MemoryView":1422
 *             _slice_assign_scalar(data, shape + 1, strides + 1,
 *                                 ndim - 1, itemsize, item)
 *             data += stride             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1407
 * 
 * @cname('__pyx_memoryview__slice_assign_scalar')
 * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                               Py_ssize_t *strides, int ndim,
 *                               size_t itemsize, void *item) nogil:
 */

  /* function exit code */
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb068931:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb068931) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb068931:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
 *     __pyx_result = Enum.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __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)":6
 *     if __pyx_checksum != 0xb068931:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __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);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb068931:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
 *     __pyx_result = Enum.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->name);
  __Pyx_DECREF(__pyx_v___pyx_result->name);
  __pyx_v___pyx_result->name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 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(2, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_12pyrosm_proto_Blob __pyx_vtable_12pyrosm_proto_Blob;

static PyObject *__pyx_tp_new_12pyrosm_proto_Blob(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_12pyrosm_proto_Blob *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_12pyrosm_proto_Blob *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrosm_proto_Blob;
  p->_raw = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_zlib_data = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_lzma_data = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_OBSOLETE_bzip2_data = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_cached_serialization = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_12pyrosm_proto_4Blob_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_12pyrosm_proto_Blob(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto_Blob *p = (struct __pyx_obj_12pyrosm_proto_Blob *)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_CLEAR(p->_raw);
  Py_CLEAR(p->_zlib_data);
  Py_CLEAR(p->_lzma_data);
  Py_CLEAR(p->_OBSOLETE_bzip2_data);
  Py_CLEAR(p->_cached_serialization);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Blob_raw(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Blob_3raw_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Blob_raw(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Blob_3raw_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Blob_raw_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Blob_8raw_size_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Blob_raw_size(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Blob_8raw_size_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Blob_zlib_data(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Blob_9zlib_data_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Blob_zlib_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Blob_9zlib_data_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Blob_lzma_data(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Blob_9lzma_data_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Blob_lzma_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Blob_9lzma_data_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Blob_OBSOLETE_bzip2_data(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Blob_19OBSOLETE_bzip2_data_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Blob_OBSOLETE_bzip2_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Blob_19OBSOLETE_bzip2_data_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Blob__is_present_in_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Blob_21_is_present_in_parent_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Blob__is_present_in_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Blob_21_is_present_in_parent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrosm_proto_Blob[] = {
  {"reset", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_7reset, METH_NOARGS, 0},
  {"Clear", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_9Clear, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Blob_8Clear},
  {"ClearField", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_11ClearField, METH_O, __pyx_doc_12pyrosm_proto_4Blob_10ClearField},
  {"CopyFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_13CopyFrom, METH_O, __pyx_doc_12pyrosm_proto_4Blob_12CopyFrom},
  {"HasField", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_15HasField, METH_O, __pyx_doc_12pyrosm_proto_4Blob_14HasField},
  {"IsInitialized", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_17IsInitialized, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Blob_16IsInitialized},
  {"MergeFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_19MergeFrom, METH_O, __pyx_doc_12pyrosm_proto_4Blob_18MergeFrom},
  {"MergeFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Blob_21MergeFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Blob_20MergeFromString},
  {"ParseFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Blob_23ParseFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Blob_22ParseFromString},
  {"FromString", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_25FromString, METH_O, 0},
  {"_Modified", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_27_Modified, METH_NOARGS, 0},
  {"SerializeToString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Blob_29SerializeToString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Blob_28SerializeToString},
  {"SerializePartialToString", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_31SerializePartialToString, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Blob_30SerializePartialToString},
  {"SetInParent", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_33SetInParent, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Blob_32SetInParent},
  {"ParseFromJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Blob_35ParseFromJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Blob_34ParseFromJson},
  {"SerializeToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Blob_37SerializeToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Blob_36SerializeToJson},
  {"SerializePartialToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Blob_39SerializePartialToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Blob_38SerializePartialToJson},
  {"ParseFromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Blob_41ParseFromDict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Blob_40ParseFromDict},
  {"SerializeToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_43SerializeToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Blob_42SerializeToDict},
  {"SerializePartialToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_45SerializePartialToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Blob_44SerializePartialToDict},
  {"Items", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_47Items, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Blob_46Items},
  {"Fields", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_50Fields, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Blob_49Fields},
  {"Values", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_53Values, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Blob_52Values},
  {"Setters", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_56Setters, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Blob_55Setters},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_59__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_4Blob_61__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrosm_proto_Blob[] = {
  {(char *)"raw", __pyx_getprop_12pyrosm_proto_4Blob_raw, __pyx_setprop_12pyrosm_proto_4Blob_raw, (char *)0, 0},
  {(char *)"raw_size", __pyx_getprop_12pyrosm_proto_4Blob_raw_size, __pyx_setprop_12pyrosm_proto_4Blob_raw_size, (char *)0, 0},
  {(char *)"zlib_data", __pyx_getprop_12pyrosm_proto_4Blob_zlib_data, __pyx_setprop_12pyrosm_proto_4Blob_zlib_data, (char *)0, 0},
  {(char *)"lzma_data", __pyx_getprop_12pyrosm_proto_4Blob_lzma_data, __pyx_setprop_12pyrosm_proto_4Blob_lzma_data, (char *)0, 0},
  {(char *)"OBSOLETE_bzip2_data", __pyx_getprop_12pyrosm_proto_4Blob_OBSOLETE_bzip2_data, __pyx_setprop_12pyrosm_proto_4Blob_OBSOLETE_bzip2_data, (char *)0, 0},
  {(char *)"_is_present_in_parent", __pyx_getprop_12pyrosm_proto_4Blob__is_present_in_parent, __pyx_setprop_12pyrosm_proto_4Blob__is_present_in_parent, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_12pyrosm_proto_Blob = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.Blob", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto_Blob), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto_Blob, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrosm_proto_4Blob_5__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrosm_proto_Blob, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrosm_proto_Blob, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_12pyrosm_proto_4Blob_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto_Blob, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_12pyrosm_proto_BlobHeader __pyx_vtable_12pyrosm_proto_BlobHeader;

static PyObject *__pyx_tp_new_12pyrosm_proto_BlobHeader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_12pyrosm_proto_BlobHeader *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_12pyrosm_proto_BlobHeader *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrosm_proto_BlobHeader;
  p->_type = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_indexdata = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_cached_serialization = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_12pyrosm_proto_10BlobHeader_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_12pyrosm_proto_BlobHeader(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto_BlobHeader *p = (struct __pyx_obj_12pyrosm_proto_BlobHeader *)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_CLEAR(p->_type);
  Py_CLEAR(p->_indexdata);
  Py_CLEAR(p->_cached_serialization);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_12pyrosm_proto_10BlobHeader_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_10BlobHeader_4type_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_10BlobHeader_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_10BlobHeader_4type_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_10BlobHeader_indexdata(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_10BlobHeader_9indexdata_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_10BlobHeader_indexdata(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_10BlobHeader_9indexdata_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_10BlobHeader_datasize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_10BlobHeader_8datasize_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_10BlobHeader_datasize(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_10BlobHeader_8datasize_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_10BlobHeader__is_present_in_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_10BlobHeader_21_is_present_in_parent_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_10BlobHeader__is_present_in_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_10BlobHeader_21_is_present_in_parent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrosm_proto_BlobHeader[] = {
  {"reset", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_7reset, METH_NOARGS, 0},
  {"Clear", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_9Clear, METH_NOARGS, __pyx_doc_12pyrosm_proto_10BlobHeader_8Clear},
  {"ClearField", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_11ClearField, METH_O, __pyx_doc_12pyrosm_proto_10BlobHeader_10ClearField},
  {"CopyFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_13CopyFrom, METH_O, __pyx_doc_12pyrosm_proto_10BlobHeader_12CopyFrom},
  {"HasField", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_15HasField, METH_O, __pyx_doc_12pyrosm_proto_10BlobHeader_14HasField},
  {"IsInitialized", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_17IsInitialized, METH_NOARGS, __pyx_doc_12pyrosm_proto_10BlobHeader_16IsInitialized},
  {"MergeFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_19MergeFrom, METH_O, __pyx_doc_12pyrosm_proto_10BlobHeader_18MergeFrom},
  {"MergeFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10BlobHeader_21MergeFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10BlobHeader_20MergeFromString},
  {"ParseFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10BlobHeader_23ParseFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10BlobHeader_22ParseFromString},
  {"FromString", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_25FromString, METH_O, 0},
  {"_Modified", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_27_Modified, METH_NOARGS, 0},
  {"SerializeToString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10BlobHeader_29SerializeToString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10BlobHeader_28SerializeToString},
  {"SerializePartialToString", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_31SerializePartialToString, METH_NOARGS, __pyx_doc_12pyrosm_proto_10BlobHeader_30SerializePartialToString},
  {"SetInParent", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_33SetInParent, METH_NOARGS, __pyx_doc_12pyrosm_proto_10BlobHeader_32SetInParent},
  {"ParseFromJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10BlobHeader_35ParseFromJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10BlobHeader_34ParseFromJson},
  {"SerializeToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10BlobHeader_37SerializeToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10BlobHeader_36SerializeToJson},
  {"SerializePartialToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10BlobHeader_39SerializePartialToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10BlobHeader_38SerializePartialToJson},
  {"ParseFromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10BlobHeader_41ParseFromDict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10BlobHeader_40ParseFromDict},
  {"SerializeToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_43SerializeToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_10BlobHeader_42SerializeToDict},
  {"SerializePartialToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_45SerializePartialToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_10BlobHeader_44SerializePartialToDict},
  {"Items", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_47Items, METH_NOARGS, __pyx_doc_12pyrosm_proto_10BlobHeader_46Items},
  {"Fields", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_50Fields, METH_NOARGS, __pyx_doc_12pyrosm_proto_10BlobHeader_49Fields},
  {"Values", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_53Values, METH_NOARGS, __pyx_doc_12pyrosm_proto_10BlobHeader_52Values},
  {"Setters", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_56Setters, METH_NOARGS, __pyx_doc_12pyrosm_proto_10BlobHeader_55Setters},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_59__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_10BlobHeader_61__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrosm_proto_BlobHeader[] = {
  {(char *)"type", __pyx_getprop_12pyrosm_proto_10BlobHeader_type, __pyx_setprop_12pyrosm_proto_10BlobHeader_type, (char *)0, 0},
  {(char *)"indexdata", __pyx_getprop_12pyrosm_proto_10BlobHeader_indexdata, __pyx_setprop_12pyrosm_proto_10BlobHeader_indexdata, (char *)0, 0},
  {(char *)"datasize", __pyx_getprop_12pyrosm_proto_10BlobHeader_datasize, __pyx_setprop_12pyrosm_proto_10BlobHeader_datasize, (char *)0, 0},
  {(char *)"_is_present_in_parent", __pyx_getprop_12pyrosm_proto_10BlobHeader__is_present_in_parent, __pyx_setprop_12pyrosm_proto_10BlobHeader__is_present_in_parent, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_12pyrosm_proto_BlobHeader = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.BlobHeader", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto_BlobHeader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto_BlobHeader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrosm_proto_10BlobHeader_5__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrosm_proto_BlobHeader, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrosm_proto_BlobHeader, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_12pyrosm_proto_10BlobHeader_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto_BlobHeader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_12pyrosm_proto_HeaderBlock __pyx_vtable_12pyrosm_proto_HeaderBlock;

static PyObject *__pyx_tp_new_12pyrosm_proto_HeaderBlock(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_12pyrosm_proto_HeaderBlock *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_12pyrosm_proto_HeaderBlock *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrosm_proto_HeaderBlock;
  p->_bbox = ((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)Py_None); Py_INCREF(Py_None);
  p->_required_features = ((struct __pyx_obj_12pyrobuf_list_StringList *)Py_None); Py_INCREF(Py_None);
  p->_optional_features = ((struct __pyx_obj_12pyrobuf_list_StringList *)Py_None); Py_INCREF(Py_None);
  p->_writingprogram = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_source = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_osmosis_replication_base_url = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_cached_serialization = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_12pyrosm_proto_11HeaderBlock_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_12pyrosm_proto_HeaderBlock(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto_HeaderBlock *p = (struct __pyx_obj_12pyrosm_proto_HeaderBlock *)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);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrosm_proto_11HeaderBlock_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_bbox);
  Py_CLEAR(p->_required_features);
  Py_CLEAR(p->_optional_features);
  Py_CLEAR(p->_writingprogram);
  Py_CLEAR(p->_source);
  Py_CLEAR(p->_osmosis_replication_base_url);
  Py_CLEAR(p->_cached_serialization);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_12pyrosm_proto_HeaderBlock(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto_HeaderBlock *p = (struct __pyx_obj_12pyrosm_proto_HeaderBlock *)o;
  if (p->_bbox) {
    e = (*v)(((PyObject *)p->_bbox), a); if (e) return e;
  }
  if (p->_required_features) {
    e = (*v)(((PyObject *)p->_required_features), a); if (e) return e;
  }
  if (p->_optional_features) {
    e = (*v)(((PyObject *)p->_optional_features), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrosm_proto_HeaderBlock(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrosm_proto_HeaderBlock *p = (struct __pyx_obj_12pyrosm_proto_HeaderBlock *)o;
  tmp = ((PyObject*)p->_bbox);
  p->_bbox = ((struct __pyx_obj_12pyrosm_proto_HeaderBBox *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_required_features);
  p->_required_features = ((struct __pyx_obj_12pyrobuf_list_StringList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_optional_features);
  p->_optional_features = ((struct __pyx_obj_12pyrobuf_list_StringList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_12pyrosm_proto_11HeaderBlock_bbox(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_11HeaderBlock_4bbox_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_11HeaderBlock_bbox(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_11HeaderBlock_4bbox_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_11HeaderBlock_required_features(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_11HeaderBlock_17required_features_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_11HeaderBlock_required_features(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_11HeaderBlock_17required_features_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_11HeaderBlock_optional_features(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_11HeaderBlock_17optional_features_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_11HeaderBlock_optional_features(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_11HeaderBlock_17optional_features_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_11HeaderBlock_writingprogram(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_11HeaderBlock_14writingprogram_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_11HeaderBlock_writingprogram(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_11HeaderBlock_14writingprogram_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_11HeaderBlock_source(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_11HeaderBlock_6source_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_11HeaderBlock_source(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_11HeaderBlock_6source_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_11HeaderBlock_osmosis_replication_timestamp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_11HeaderBlock_29osmosis_replication_timestamp_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_11HeaderBlock_osmosis_replication_timestamp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_11HeaderBlock_29osmosis_replication_timestamp_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_11HeaderBlock_osmosis_replication_sequence_number(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_11HeaderBlock_35osmosis_replication_sequence_number_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_11HeaderBlock_osmosis_replication_sequence_number(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_11HeaderBlock_35osmosis_replication_sequence_number_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_11HeaderBlock_osmosis_replication_base_url(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_11HeaderBlock_28osmosis_replication_base_url_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_11HeaderBlock_osmosis_replication_base_url(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_11HeaderBlock_28osmosis_replication_base_url_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_11HeaderBlock__is_present_in_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_11HeaderBlock_21_is_present_in_parent_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_11HeaderBlock__is_present_in_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_11HeaderBlock_21_is_present_in_parent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrosm_proto_HeaderBlock[] = {
  {"reset", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_9reset, METH_NOARGS, 0},
  {"Clear", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_11Clear, METH_NOARGS, __pyx_doc_12pyrosm_proto_11HeaderBlock_10Clear},
  {"ClearField", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_13ClearField, METH_O, __pyx_doc_12pyrosm_proto_11HeaderBlock_12ClearField},
  {"CopyFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_15CopyFrom, METH_O, __pyx_doc_12pyrosm_proto_11HeaderBlock_14CopyFrom},
  {"HasField", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_17HasField, METH_O, __pyx_doc_12pyrosm_proto_11HeaderBlock_16HasField},
  {"IsInitialized", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_19IsInitialized, METH_NOARGS, __pyx_doc_12pyrosm_proto_11HeaderBlock_18IsInitialized},
  {"MergeFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_21MergeFrom, METH_O, __pyx_doc_12pyrosm_proto_11HeaderBlock_20MergeFrom},
  {"MergeFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_11HeaderBlock_23MergeFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_11HeaderBlock_22MergeFromString},
  {"ParseFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_11HeaderBlock_25ParseFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_11HeaderBlock_24ParseFromString},
  {"FromString", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_27FromString, METH_O, 0},
  {"_Modified", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_29_Modified, METH_NOARGS, 0},
  {"SerializeToString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_11HeaderBlock_31SerializeToString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_11HeaderBlock_30SerializeToString},
  {"SerializePartialToString", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_33SerializePartialToString, METH_NOARGS, __pyx_doc_12pyrosm_proto_11HeaderBlock_32SerializePartialToString},
  {"SetInParent", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_35SetInParent, METH_NOARGS, __pyx_doc_12pyrosm_proto_11HeaderBlock_34SetInParent},
  {"ParseFromJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_11HeaderBlock_37ParseFromJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_11HeaderBlock_36ParseFromJson},
  {"SerializeToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_11HeaderBlock_39SerializeToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_11HeaderBlock_38SerializeToJson},
  {"SerializePartialToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_11HeaderBlock_41SerializePartialToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_11HeaderBlock_40SerializePartialToJson},
  {"ParseFromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_11HeaderBlock_43ParseFromDict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_11HeaderBlock_42ParseFromDict},
  {"SerializeToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_45SerializeToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_11HeaderBlock_44SerializeToDict},
  {"SerializePartialToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_47SerializePartialToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_11HeaderBlock_46SerializePartialToDict},
  {"Items", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_49Items, METH_NOARGS, __pyx_doc_12pyrosm_proto_11HeaderBlock_48Items},
  {"Fields", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_52Fields, METH_NOARGS, __pyx_doc_12pyrosm_proto_11HeaderBlock_51Fields},
  {"Values", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_55Values, METH_NOARGS, __pyx_doc_12pyrosm_proto_11HeaderBlock_54Values},
  {"Setters", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_58Setters, METH_NOARGS, __pyx_doc_12pyrosm_proto_11HeaderBlock_57Setters},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_61__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_11HeaderBlock_63__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrosm_proto_HeaderBlock[] = {
  {(char *)"bbox", __pyx_getprop_12pyrosm_proto_11HeaderBlock_bbox, __pyx_setprop_12pyrosm_proto_11HeaderBlock_bbox, (char *)0, 0},
  {(char *)"required_features", __pyx_getprop_12pyrosm_proto_11HeaderBlock_required_features, __pyx_setprop_12pyrosm_proto_11HeaderBlock_required_features, (char *)0, 0},
  {(char *)"optional_features", __pyx_getprop_12pyrosm_proto_11HeaderBlock_optional_features, __pyx_setprop_12pyrosm_proto_11HeaderBlock_optional_features, (char *)0, 0},
  {(char *)"writingprogram", __pyx_getprop_12pyrosm_proto_11HeaderBlock_writingprogram, __pyx_setprop_12pyrosm_proto_11HeaderBlock_writingprogram, (char *)0, 0},
  {(char *)"source", __pyx_getprop_12pyrosm_proto_11HeaderBlock_source, __pyx_setprop_12pyrosm_proto_11HeaderBlock_source, (char *)0, 0},
  {(char *)"osmosis_replication_timestamp", __pyx_getprop_12pyrosm_proto_11HeaderBlock_osmosis_replication_timestamp, __pyx_setprop_12pyrosm_proto_11HeaderBlock_osmosis_replication_timestamp, (char *)0, 0},
  {(char *)"osmosis_replication_sequence_number", __pyx_getprop_12pyrosm_proto_11HeaderBlock_osmosis_replication_sequence_number, __pyx_setprop_12pyrosm_proto_11HeaderBlock_osmosis_replication_sequence_number, (char *)0, 0},
  {(char *)"osmosis_replication_base_url", __pyx_getprop_12pyrosm_proto_11HeaderBlock_osmosis_replication_base_url, __pyx_setprop_12pyrosm_proto_11HeaderBlock_osmosis_replication_base_url, (char *)0, 0},
  {(char *)"_is_present_in_parent", __pyx_getprop_12pyrosm_proto_11HeaderBlock__is_present_in_parent, __pyx_setprop_12pyrosm_proto_11HeaderBlock__is_present_in_parent, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_12pyrosm_proto_HeaderBlock = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.HeaderBlock", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto_HeaderBlock), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto_HeaderBlock, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrosm_proto_11HeaderBlock_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto_HeaderBlock, /*tp_traverse*/
  __pyx_tp_clear_12pyrosm_proto_HeaderBlock, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrosm_proto_HeaderBlock, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrosm_proto_HeaderBlock, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_12pyrosm_proto_11HeaderBlock_5__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto_HeaderBlock, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_12pyrosm_proto_HeaderBBox __pyx_vtable_12pyrosm_proto_HeaderBBox;

static PyObject *__pyx_tp_new_12pyrosm_proto_HeaderBBox(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_12pyrosm_proto_HeaderBBox *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_12pyrosm_proto_HeaderBBox *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrosm_proto_HeaderBBox;
  p->_cached_serialization = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_12pyrosm_proto_10HeaderBBox_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_12pyrosm_proto_HeaderBBox(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto_HeaderBBox *p = (struct __pyx_obj_12pyrosm_proto_HeaderBBox *)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_CLEAR(p->_cached_serialization);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_12pyrosm_proto_10HeaderBBox_left(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_10HeaderBBox_4left_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_10HeaderBBox_left(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_10HeaderBBox_4left_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_10HeaderBBox_right(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_10HeaderBBox_5right_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_10HeaderBBox_right(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_10HeaderBBox_5right_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_10HeaderBBox_top(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_10HeaderBBox_3top_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_10HeaderBBox_top(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_10HeaderBBox_3top_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_10HeaderBBox_bottom(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_10HeaderBBox_6bottom_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_10HeaderBBox_bottom(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_10HeaderBBox_6bottom_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_10HeaderBBox__is_present_in_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_10HeaderBBox_21_is_present_in_parent_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_10HeaderBBox__is_present_in_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_10HeaderBBox_21_is_present_in_parent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrosm_proto_HeaderBBox[] = {
  {"reset", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_7reset, METH_NOARGS, 0},
  {"Clear", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_9Clear, METH_NOARGS, __pyx_doc_12pyrosm_proto_10HeaderBBox_8Clear},
  {"ClearField", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_11ClearField, METH_O, __pyx_doc_12pyrosm_proto_10HeaderBBox_10ClearField},
  {"CopyFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_13CopyFrom, METH_O, __pyx_doc_12pyrosm_proto_10HeaderBBox_12CopyFrom},
  {"HasField", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_15HasField, METH_O, __pyx_doc_12pyrosm_proto_10HeaderBBox_14HasField},
  {"IsInitialized", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_17IsInitialized, METH_NOARGS, __pyx_doc_12pyrosm_proto_10HeaderBBox_16IsInitialized},
  {"MergeFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_19MergeFrom, METH_O, __pyx_doc_12pyrosm_proto_10HeaderBBox_18MergeFrom},
  {"MergeFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10HeaderBBox_21MergeFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10HeaderBBox_20MergeFromString},
  {"ParseFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10HeaderBBox_23ParseFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10HeaderBBox_22ParseFromString},
  {"FromString", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_25FromString, METH_O, 0},
  {"_Modified", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_27_Modified, METH_NOARGS, 0},
  {"SerializeToString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10HeaderBBox_29SerializeToString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10HeaderBBox_28SerializeToString},
  {"SerializePartialToString", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_31SerializePartialToString, METH_NOARGS, __pyx_doc_12pyrosm_proto_10HeaderBBox_30SerializePartialToString},
  {"SetInParent", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_33SetInParent, METH_NOARGS, __pyx_doc_12pyrosm_proto_10HeaderBBox_32SetInParent},
  {"ParseFromJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10HeaderBBox_35ParseFromJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10HeaderBBox_34ParseFromJson},
  {"SerializeToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10HeaderBBox_37SerializeToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10HeaderBBox_36SerializeToJson},
  {"SerializePartialToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10HeaderBBox_39SerializePartialToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10HeaderBBox_38SerializePartialToJson},
  {"ParseFromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10HeaderBBox_41ParseFromDict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10HeaderBBox_40ParseFromDict},
  {"SerializeToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_43SerializeToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_10HeaderBBox_42SerializeToDict},
  {"SerializePartialToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_45SerializePartialToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_10HeaderBBox_44SerializePartialToDict},
  {"Items", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_47Items, METH_NOARGS, __pyx_doc_12pyrosm_proto_10HeaderBBox_46Items},
  {"Fields", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_50Fields, METH_NOARGS, __pyx_doc_12pyrosm_proto_10HeaderBBox_49Fields},
  {"Values", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_53Values, METH_NOARGS, __pyx_doc_12pyrosm_proto_10HeaderBBox_52Values},
  {"Setters", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_56Setters, METH_NOARGS, __pyx_doc_12pyrosm_proto_10HeaderBBox_55Setters},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_59__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_10HeaderBBox_61__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrosm_proto_HeaderBBox[] = {
  {(char *)"left", __pyx_getprop_12pyrosm_proto_10HeaderBBox_left, __pyx_setprop_12pyrosm_proto_10HeaderBBox_left, (char *)0, 0},
  {(char *)"right", __pyx_getprop_12pyrosm_proto_10HeaderBBox_right, __pyx_setprop_12pyrosm_proto_10HeaderBBox_right, (char *)0, 0},
  {(char *)"top", __pyx_getprop_12pyrosm_proto_10HeaderBBox_top, __pyx_setprop_12pyrosm_proto_10HeaderBBox_top, (char *)0, 0},
  {(char *)"bottom", __pyx_getprop_12pyrosm_proto_10HeaderBBox_bottom, __pyx_setprop_12pyrosm_proto_10HeaderBBox_bottom, (char *)0, 0},
  {(char *)"_is_present_in_parent", __pyx_getprop_12pyrosm_proto_10HeaderBBox__is_present_in_parent, __pyx_setprop_12pyrosm_proto_10HeaderBBox__is_present_in_parent, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_12pyrosm_proto_HeaderBBox = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.HeaderBBox", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto_HeaderBBox), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto_HeaderBBox, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrosm_proto_10HeaderBBox_5__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrosm_proto_HeaderBBox, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrosm_proto_HeaderBBox, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_12pyrosm_proto_10HeaderBBox_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto_HeaderBBox, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveBlock __pyx_vtable_12pyrosm_proto_PrimitiveBlock;

static PyObject *__pyx_tp_new_12pyrosm_proto_PrimitiveBlock(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *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_12pyrosm_proto_PrimitiveBlock *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrosm_proto_PrimitiveBlock;
  p->_stringtable = ((struct __pyx_obj_12pyrosm_proto_StringTable *)Py_None); Py_INCREF(Py_None);
  p->_primitivegroup = ((struct __pyx_obj_12pyrobuf_list_TypedList *)Py_None); Py_INCREF(Py_None);
  p->_cached_serialization = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_12pyrosm_proto_14PrimitiveBlock_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_12pyrosm_proto_PrimitiveBlock(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *p = (struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)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);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrosm_proto_14PrimitiveBlock_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_stringtable);
  Py_CLEAR(p->_primitivegroup);
  Py_CLEAR(p->_cached_serialization);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_12pyrosm_proto_PrimitiveBlock(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *p = (struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)o;
  if (p->_stringtable) {
    e = (*v)(((PyObject *)p->_stringtable), a); if (e) return e;
  }
  if (p->_primitivegroup) {
    e = (*v)(((PyObject *)p->_primitivegroup), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrosm_proto_PrimitiveBlock(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *p = (struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *)o;
  tmp = ((PyObject*)p->_stringtable);
  p->_stringtable = ((struct __pyx_obj_12pyrosm_proto_StringTable *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_primitivegroup);
  p->_primitivegroup = ((struct __pyx_obj_12pyrobuf_list_TypedList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_12pyrosm_proto_14PrimitiveBlock_stringtable(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_14PrimitiveBlock_11stringtable_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_14PrimitiveBlock_stringtable(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_14PrimitiveBlock_11stringtable_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_14PrimitiveBlock_primitivegroup(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_14PrimitiveBlock_14primitivegroup_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_14PrimitiveBlock_primitivegroup(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_14PrimitiveBlock_14primitivegroup_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_14PrimitiveBlock_granularity(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_14PrimitiveBlock_11granularity_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_14PrimitiveBlock_granularity(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_14PrimitiveBlock_11granularity_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_14PrimitiveBlock_date_granularity(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_14PrimitiveBlock_16date_granularity_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_14PrimitiveBlock_date_granularity(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_14PrimitiveBlock_16date_granularity_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_14PrimitiveBlock_lat_offset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_14PrimitiveBlock_10lat_offset_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_14PrimitiveBlock_lat_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_14PrimitiveBlock_10lat_offset_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_14PrimitiveBlock_lon_offset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_14PrimitiveBlock_10lon_offset_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_14PrimitiveBlock_lon_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_14PrimitiveBlock_10lon_offset_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_14PrimitiveBlock__is_present_in_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_14PrimitiveBlock_21_is_present_in_parent_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_14PrimitiveBlock__is_present_in_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_14PrimitiveBlock_21_is_present_in_parent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrosm_proto_PrimitiveBlock[] = {
  {"reset", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_9reset, METH_NOARGS, 0},
  {"Clear", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_11Clear, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_10Clear},
  {"ClearField", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_13ClearField, METH_O, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_12ClearField},
  {"CopyFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_15CopyFrom, METH_O, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_14CopyFrom},
  {"HasField", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_17HasField, METH_O, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_16HasField},
  {"IsInitialized", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_19IsInitialized, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_18IsInitialized},
  {"MergeFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_21MergeFrom, METH_O, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_20MergeFrom},
  {"MergeFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_23MergeFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_22MergeFromString},
  {"ParseFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_25ParseFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_24ParseFromString},
  {"FromString", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_27FromString, METH_O, 0},
  {"_Modified", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_29_Modified, METH_NOARGS, 0},
  {"SerializeToString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_31SerializeToString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_30SerializeToString},
  {"SerializePartialToString", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_33SerializePartialToString, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_32SerializePartialToString},
  {"SetInParent", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_35SetInParent, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_34SetInParent},
  {"ParseFromJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_37ParseFromJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_36ParseFromJson},
  {"SerializeToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_39SerializeToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_38SerializeToJson},
  {"SerializePartialToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_41SerializePartialToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_40SerializePartialToJson},
  {"ParseFromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_43ParseFromDict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_42ParseFromDict},
  {"SerializeToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_45SerializeToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_44SerializeToDict},
  {"SerializePartialToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_47SerializePartialToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_46SerializePartialToDict},
  {"Items", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_49Items, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_48Items},
  {"Fields", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_52Fields, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_51Fields},
  {"Values", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_55Values, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_54Values},
  {"Setters", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_58Setters, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveBlock_57Setters},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_61__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveBlock_63__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrosm_proto_PrimitiveBlock[] = {
  {(char *)"stringtable", __pyx_getprop_12pyrosm_proto_14PrimitiveBlock_stringtable, __pyx_setprop_12pyrosm_proto_14PrimitiveBlock_stringtable, (char *)0, 0},
  {(char *)"primitivegroup", __pyx_getprop_12pyrosm_proto_14PrimitiveBlock_primitivegroup, __pyx_setprop_12pyrosm_proto_14PrimitiveBlock_primitivegroup, (char *)0, 0},
  {(char *)"granularity", __pyx_getprop_12pyrosm_proto_14PrimitiveBlock_granularity, __pyx_setprop_12pyrosm_proto_14PrimitiveBlock_granularity, (char *)0, 0},
  {(char *)"date_granularity", __pyx_getprop_12pyrosm_proto_14PrimitiveBlock_date_granularity, __pyx_setprop_12pyrosm_proto_14PrimitiveBlock_date_granularity, (char *)0, 0},
  {(char *)"lat_offset", __pyx_getprop_12pyrosm_proto_14PrimitiveBlock_lat_offset, __pyx_setprop_12pyrosm_proto_14PrimitiveBlock_lat_offset, (char *)0, 0},
  {(char *)"lon_offset", __pyx_getprop_12pyrosm_proto_14PrimitiveBlock_lon_offset, __pyx_setprop_12pyrosm_proto_14PrimitiveBlock_lon_offset, (char *)0, 0},
  {(char *)"_is_present_in_parent", __pyx_getprop_12pyrosm_proto_14PrimitiveBlock__is_present_in_parent, __pyx_setprop_12pyrosm_proto_14PrimitiveBlock__is_present_in_parent, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_12pyrosm_proto_PrimitiveBlock = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.PrimitiveBlock", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto_PrimitiveBlock, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrosm_proto_14PrimitiveBlock_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto_PrimitiveBlock, /*tp_traverse*/
  __pyx_tp_clear_12pyrosm_proto_PrimitiveBlock, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrosm_proto_PrimitiveBlock, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrosm_proto_PrimitiveBlock, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_12pyrosm_proto_14PrimitiveBlock_5__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto_PrimitiveBlock, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_12pyrosm_proto_PrimitiveGroup __pyx_vtable_12pyrosm_proto_PrimitiveGroup;

static PyObject *__pyx_tp_new_12pyrosm_proto_PrimitiveGroup(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *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_12pyrosm_proto_PrimitiveGroup *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrosm_proto_PrimitiveGroup;
  p->_nodes = ((struct __pyx_obj_12pyrobuf_list_TypedList *)Py_None); Py_INCREF(Py_None);
  p->_dense = ((struct __pyx_obj_12pyrosm_proto_DenseNodes *)Py_None); Py_INCREF(Py_None);
  p->_ways = ((struct __pyx_obj_12pyrobuf_list_TypedList *)Py_None); Py_INCREF(Py_None);
  p->_relations = ((struct __pyx_obj_12pyrobuf_list_TypedList *)Py_None); Py_INCREF(Py_None);
  p->_changesets = ((struct __pyx_obj_12pyrobuf_list_TypedList *)Py_None); Py_INCREF(Py_None);
  p->_cached_serialization = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_12pyrosm_proto_14PrimitiveGroup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_12pyrosm_proto_PrimitiveGroup(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *p = (struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)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);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrosm_proto_14PrimitiveGroup_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_nodes);
  Py_CLEAR(p->_dense);
  Py_CLEAR(p->_ways);
  Py_CLEAR(p->_relations);
  Py_CLEAR(p->_changesets);
  Py_CLEAR(p->_cached_serialization);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_12pyrosm_proto_PrimitiveGroup(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *p = (struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)o;
  if (p->_nodes) {
    e = (*v)(((PyObject *)p->_nodes), a); if (e) return e;
  }
  if (p->_dense) {
    e = (*v)(((PyObject *)p->_dense), a); if (e) return e;
  }
  if (p->_ways) {
    e = (*v)(((PyObject *)p->_ways), a); if (e) return e;
  }
  if (p->_relations) {
    e = (*v)(((PyObject *)p->_relations), a); if (e) return e;
  }
  if (p->_changesets) {
    e = (*v)(((PyObject *)p->_changesets), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrosm_proto_PrimitiveGroup(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *p = (struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *)o;
  tmp = ((PyObject*)p->_nodes);
  p->_nodes = ((struct __pyx_obj_12pyrobuf_list_TypedList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_dense);
  p->_dense = ((struct __pyx_obj_12pyrosm_proto_DenseNodes *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_ways);
  p->_ways = ((struct __pyx_obj_12pyrobuf_list_TypedList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_relations);
  p->_relations = ((struct __pyx_obj_12pyrobuf_list_TypedList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_changesets);
  p->_changesets = ((struct __pyx_obj_12pyrobuf_list_TypedList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_12pyrosm_proto_14PrimitiveGroup_nodes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_14PrimitiveGroup_5nodes_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_14PrimitiveGroup_nodes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_14PrimitiveGroup_5nodes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_14PrimitiveGroup_dense(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_14PrimitiveGroup_5dense_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_14PrimitiveGroup_dense(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_14PrimitiveGroup_5dense_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_14PrimitiveGroup_ways(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_14PrimitiveGroup_4ways_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_14PrimitiveGroup_ways(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_14PrimitiveGroup_4ways_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_14PrimitiveGroup_relations(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_14PrimitiveGroup_9relations_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_14PrimitiveGroup_relations(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_14PrimitiveGroup_9relations_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_14PrimitiveGroup_changesets(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_14PrimitiveGroup_10changesets_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_14PrimitiveGroup_changesets(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_14PrimitiveGroup_10changesets_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_14PrimitiveGroup__is_present_in_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_14PrimitiveGroup_21_is_present_in_parent_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_14PrimitiveGroup__is_present_in_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_14PrimitiveGroup_21_is_present_in_parent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrosm_proto_PrimitiveGroup[] = {
  {"reset", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_9reset, METH_NOARGS, 0},
  {"Clear", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_11Clear, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_10Clear},
  {"ClearField", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_13ClearField, METH_O, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_12ClearField},
  {"CopyFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_15CopyFrom, METH_O, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_14CopyFrom},
  {"HasField", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_17HasField, METH_O, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_16HasField},
  {"IsInitialized", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_19IsInitialized, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_18IsInitialized},
  {"MergeFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_21MergeFrom, METH_O, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_20MergeFrom},
  {"MergeFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_23MergeFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_22MergeFromString},
  {"ParseFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_25ParseFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_24ParseFromString},
  {"FromString", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_27FromString, METH_O, 0},
  {"_Modified", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_29_Modified, METH_NOARGS, 0},
  {"SerializeToString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_31SerializeToString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_30SerializeToString},
  {"SerializePartialToString", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_33SerializePartialToString, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_32SerializePartialToString},
  {"SetInParent", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_35SetInParent, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_34SetInParent},
  {"ParseFromJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_37ParseFromJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_36ParseFromJson},
  {"SerializeToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_39SerializeToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_38SerializeToJson},
  {"SerializePartialToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_41SerializePartialToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_40SerializePartialToJson},
  {"ParseFromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_43ParseFromDict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_42ParseFromDict},
  {"SerializeToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_45SerializeToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_44SerializeToDict},
  {"SerializePartialToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_47SerializePartialToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_46SerializePartialToDict},
  {"Items", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_49Items, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_48Items},
  {"Fields", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_52Fields, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_51Fields},
  {"Values", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_55Values, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_54Values},
  {"Setters", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_58Setters, METH_NOARGS, __pyx_doc_12pyrosm_proto_14PrimitiveGroup_57Setters},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_61__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_14PrimitiveGroup_63__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrosm_proto_PrimitiveGroup[] = {
  {(char *)"nodes", __pyx_getprop_12pyrosm_proto_14PrimitiveGroup_nodes, __pyx_setprop_12pyrosm_proto_14PrimitiveGroup_nodes, (char *)0, 0},
  {(char *)"dense", __pyx_getprop_12pyrosm_proto_14PrimitiveGroup_dense, __pyx_setprop_12pyrosm_proto_14PrimitiveGroup_dense, (char *)0, 0},
  {(char *)"ways", __pyx_getprop_12pyrosm_proto_14PrimitiveGroup_ways, __pyx_setprop_12pyrosm_proto_14PrimitiveGroup_ways, (char *)0, 0},
  {(char *)"relations", __pyx_getprop_12pyrosm_proto_14PrimitiveGroup_relations, __pyx_setprop_12pyrosm_proto_14PrimitiveGroup_relations, (char *)0, 0},
  {(char *)"changesets", __pyx_getprop_12pyrosm_proto_14PrimitiveGroup_changesets, __pyx_setprop_12pyrosm_proto_14PrimitiveGroup_changesets, (char *)0, 0},
  {(char *)"_is_present_in_parent", __pyx_getprop_12pyrosm_proto_14PrimitiveGroup__is_present_in_parent, __pyx_setprop_12pyrosm_proto_14PrimitiveGroup__is_present_in_parent, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_12pyrosm_proto_PrimitiveGroup = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.PrimitiveGroup", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto_PrimitiveGroup, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrosm_proto_14PrimitiveGroup_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto_PrimitiveGroup, /*tp_traverse*/
  __pyx_tp_clear_12pyrosm_proto_PrimitiveGroup, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrosm_proto_PrimitiveGroup, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrosm_proto_PrimitiveGroup, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_12pyrosm_proto_14PrimitiveGroup_5__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto_PrimitiveGroup, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_12pyrosm_proto_StringTable __pyx_vtable_12pyrosm_proto_StringTable;

static PyObject *__pyx_tp_new_12pyrosm_proto_StringTable(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_12pyrosm_proto_StringTable *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_12pyrosm_proto_StringTable *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrosm_proto_StringTable;
  p->_s = ((struct __pyx_obj_12pyrobuf_list_BytesList *)Py_None); Py_INCREF(Py_None);
  p->_cached_serialization = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_12pyrosm_proto_11StringTable_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_12pyrosm_proto_StringTable(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto_StringTable *p = (struct __pyx_obj_12pyrosm_proto_StringTable *)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);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrosm_proto_11StringTable_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_s);
  Py_CLEAR(p->_cached_serialization);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_12pyrosm_proto_StringTable(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto_StringTable *p = (struct __pyx_obj_12pyrosm_proto_StringTable *)o;
  if (p->_s) {
    e = (*v)(((PyObject *)p->_s), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrosm_proto_StringTable(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrosm_proto_StringTable *p = (struct __pyx_obj_12pyrosm_proto_StringTable *)o;
  tmp = ((PyObject*)p->_s);
  p->_s = ((struct __pyx_obj_12pyrobuf_list_BytesList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_12pyrosm_proto_11StringTable_s(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_11StringTable_1s_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_11StringTable_s(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_11StringTable_1s_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_11StringTable__is_present_in_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_11StringTable_21_is_present_in_parent_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_11StringTable__is_present_in_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_11StringTable_21_is_present_in_parent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrosm_proto_StringTable[] = {
  {"reset", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_9reset, METH_NOARGS, 0},
  {"Clear", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_11Clear, METH_NOARGS, __pyx_doc_12pyrosm_proto_11StringTable_10Clear},
  {"ClearField", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_13ClearField, METH_O, __pyx_doc_12pyrosm_proto_11StringTable_12ClearField},
  {"CopyFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_15CopyFrom, METH_O, __pyx_doc_12pyrosm_proto_11StringTable_14CopyFrom},
  {"HasField", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_17HasField, METH_O, __pyx_doc_12pyrosm_proto_11StringTable_16HasField},
  {"IsInitialized", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_19IsInitialized, METH_NOARGS, __pyx_doc_12pyrosm_proto_11StringTable_18IsInitialized},
  {"MergeFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_21MergeFrom, METH_O, __pyx_doc_12pyrosm_proto_11StringTable_20MergeFrom},
  {"MergeFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_11StringTable_23MergeFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_11StringTable_22MergeFromString},
  {"ParseFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_11StringTable_25ParseFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_11StringTable_24ParseFromString},
  {"FromString", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_27FromString, METH_O, 0},
  {"_Modified", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_29_Modified, METH_NOARGS, 0},
  {"SerializeToString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_11StringTable_31SerializeToString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_11StringTable_30SerializeToString},
  {"SerializePartialToString", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_33SerializePartialToString, METH_NOARGS, __pyx_doc_12pyrosm_proto_11StringTable_32SerializePartialToString},
  {"SetInParent", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_35SetInParent, METH_NOARGS, __pyx_doc_12pyrosm_proto_11StringTable_34SetInParent},
  {"ParseFromJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_11StringTable_37ParseFromJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_11StringTable_36ParseFromJson},
  {"SerializeToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_11StringTable_39SerializeToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_11StringTable_38SerializeToJson},
  {"SerializePartialToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_11StringTable_41SerializePartialToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_11StringTable_40SerializePartialToJson},
  {"ParseFromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_11StringTable_43ParseFromDict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_11StringTable_42ParseFromDict},
  {"SerializeToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_45SerializeToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_11StringTable_44SerializeToDict},
  {"SerializePartialToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_47SerializePartialToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_11StringTable_46SerializePartialToDict},
  {"Items", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_49Items, METH_NOARGS, __pyx_doc_12pyrosm_proto_11StringTable_48Items},
  {"Fields", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_52Fields, METH_NOARGS, __pyx_doc_12pyrosm_proto_11StringTable_51Fields},
  {"Values", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_55Values, METH_NOARGS, __pyx_doc_12pyrosm_proto_11StringTable_54Values},
  {"Setters", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_58Setters, METH_NOARGS, __pyx_doc_12pyrosm_proto_11StringTable_57Setters},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_61__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_11StringTable_63__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrosm_proto_StringTable[] = {
  {(char *)"s", __pyx_getprop_12pyrosm_proto_11StringTable_s, __pyx_setprop_12pyrosm_proto_11StringTable_s, (char *)0, 0},
  {(char *)"_is_present_in_parent", __pyx_getprop_12pyrosm_proto_11StringTable__is_present_in_parent, __pyx_setprop_12pyrosm_proto_11StringTable__is_present_in_parent, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_12pyrosm_proto_StringTable = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.StringTable", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto_StringTable), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto_StringTable, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrosm_proto_11StringTable_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto_StringTable, /*tp_traverse*/
  __pyx_tp_clear_12pyrosm_proto_StringTable, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrosm_proto_StringTable, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrosm_proto_StringTable, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_12pyrosm_proto_11StringTable_5__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto_StringTable, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_12pyrosm_proto_Info __pyx_vtable_12pyrosm_proto_Info;

static PyObject *__pyx_tp_new_12pyrosm_proto_Info(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_12pyrosm_proto_Info *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_12pyrosm_proto_Info *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrosm_proto_Info;
  p->_cached_serialization = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_12pyrosm_proto_4Info_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_12pyrosm_proto_Info(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto_Info *p = (struct __pyx_obj_12pyrosm_proto_Info *)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_CLEAR(p->_cached_serialization);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Info_version(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Info_7version_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Info_version(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Info_7version_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Info_timestamp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Info_9timestamp_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Info_timestamp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Info_9timestamp_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Info_changeset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Info_9changeset_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Info_changeset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Info_9changeset_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Info_uid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Info_3uid_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Info_uid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Info_3uid_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Info_user_sid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Info_8user_sid_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Info_user_sid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Info_8user_sid_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Info_visible(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Info_7visible_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Info_visible(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Info_7visible_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Info__is_present_in_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Info_21_is_present_in_parent_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Info__is_present_in_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Info_21_is_present_in_parent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrosm_proto_Info[] = {
  {"reset", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_7reset, METH_NOARGS, 0},
  {"Clear", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_9Clear, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Info_8Clear},
  {"ClearField", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_11ClearField, METH_O, __pyx_doc_12pyrosm_proto_4Info_10ClearField},
  {"CopyFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_13CopyFrom, METH_O, __pyx_doc_12pyrosm_proto_4Info_12CopyFrom},
  {"HasField", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_15HasField, METH_O, __pyx_doc_12pyrosm_proto_4Info_14HasField},
  {"IsInitialized", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_17IsInitialized, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Info_16IsInitialized},
  {"MergeFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_19MergeFrom, METH_O, __pyx_doc_12pyrosm_proto_4Info_18MergeFrom},
  {"MergeFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Info_21MergeFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Info_20MergeFromString},
  {"ParseFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Info_23ParseFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Info_22ParseFromString},
  {"FromString", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_25FromString, METH_O, 0},
  {"_Modified", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_27_Modified, METH_NOARGS, 0},
  {"SerializeToString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Info_29SerializeToString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Info_28SerializeToString},
  {"SerializePartialToString", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_31SerializePartialToString, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Info_30SerializePartialToString},
  {"SetInParent", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_33SetInParent, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Info_32SetInParent},
  {"ParseFromJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Info_35ParseFromJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Info_34ParseFromJson},
  {"SerializeToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Info_37SerializeToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Info_36SerializeToJson},
  {"SerializePartialToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Info_39SerializePartialToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Info_38SerializePartialToJson},
  {"ParseFromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Info_41ParseFromDict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Info_40ParseFromDict},
  {"SerializeToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_43SerializeToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Info_42SerializeToDict},
  {"SerializePartialToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_45SerializePartialToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Info_44SerializePartialToDict},
  {"Items", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_47Items, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Info_46Items},
  {"Fields", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_50Fields, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Info_49Fields},
  {"Values", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_53Values, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Info_52Values},
  {"Setters", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_56Setters, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Info_55Setters},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_59__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_4Info_61__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrosm_proto_Info[] = {
  {(char *)"version", __pyx_getprop_12pyrosm_proto_4Info_version, __pyx_setprop_12pyrosm_proto_4Info_version, (char *)0, 0},
  {(char *)"timestamp", __pyx_getprop_12pyrosm_proto_4Info_timestamp, __pyx_setprop_12pyrosm_proto_4Info_timestamp, (char *)0, 0},
  {(char *)"changeset", __pyx_getprop_12pyrosm_proto_4Info_changeset, __pyx_setprop_12pyrosm_proto_4Info_changeset, (char *)0, 0},
  {(char *)"uid", __pyx_getprop_12pyrosm_proto_4Info_uid, __pyx_setprop_12pyrosm_proto_4Info_uid, (char *)0, 0},
  {(char *)"user_sid", __pyx_getprop_12pyrosm_proto_4Info_user_sid, __pyx_setprop_12pyrosm_proto_4Info_user_sid, (char *)0, 0},
  {(char *)"visible", __pyx_getprop_12pyrosm_proto_4Info_visible, __pyx_setprop_12pyrosm_proto_4Info_visible, (char *)0, 0},
  {(char *)"_is_present_in_parent", __pyx_getprop_12pyrosm_proto_4Info__is_present_in_parent, __pyx_setprop_12pyrosm_proto_4Info__is_present_in_parent, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_12pyrosm_proto_Info = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.Info", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto_Info), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto_Info, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrosm_proto_4Info_5__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrosm_proto_Info, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrosm_proto_Info, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_12pyrosm_proto_4Info_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto_Info, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_12pyrosm_proto_DenseInfo __pyx_vtable_12pyrosm_proto_DenseInfo;

static PyObject *__pyx_tp_new_12pyrosm_proto_DenseInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_12pyrosm_proto_DenseInfo *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_12pyrosm_proto_DenseInfo *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrosm_proto_DenseInfo;
  p->_version = ((struct __pyx_obj_12pyrobuf_list_Int32List *)Py_None); Py_INCREF(Py_None);
  p->_timestamp = ((struct __pyx_obj_12pyrobuf_list_Int64List *)Py_None); Py_INCREF(Py_None);
  p->_changeset = ((struct __pyx_obj_12pyrobuf_list_Int64List *)Py_None); Py_INCREF(Py_None);
  p->_uid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)Py_None); Py_INCREF(Py_None);
  p->_user_sid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)Py_None); Py_INCREF(Py_None);
  p->_visible = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)Py_None); Py_INCREF(Py_None);
  p->_cached_serialization = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_12pyrosm_proto_9DenseInfo_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_12pyrosm_proto_DenseInfo(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto_DenseInfo *p = (struct __pyx_obj_12pyrosm_proto_DenseInfo *)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);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrosm_proto_9DenseInfo_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_version);
  Py_CLEAR(p->_timestamp);
  Py_CLEAR(p->_changeset);
  Py_CLEAR(p->_uid);
  Py_CLEAR(p->_user_sid);
  Py_CLEAR(p->_visible);
  Py_CLEAR(p->_cached_serialization);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_12pyrosm_proto_DenseInfo(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto_DenseInfo *p = (struct __pyx_obj_12pyrosm_proto_DenseInfo *)o;
  if (p->_version) {
    e = (*v)(((PyObject *)p->_version), a); if (e) return e;
  }
  if (p->_timestamp) {
    e = (*v)(((PyObject *)p->_timestamp), a); if (e) return e;
  }
  if (p->_changeset) {
    e = (*v)(((PyObject *)p->_changeset), a); if (e) return e;
  }
  if (p->_uid) {
    e = (*v)(((PyObject *)p->_uid), a); if (e) return e;
  }
  if (p->_user_sid) {
    e = (*v)(((PyObject *)p->_user_sid), a); if (e) return e;
  }
  if (p->_visible) {
    e = (*v)(((PyObject *)p->_visible), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrosm_proto_DenseInfo(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrosm_proto_DenseInfo *p = (struct __pyx_obj_12pyrosm_proto_DenseInfo *)o;
  tmp = ((PyObject*)p->_version);
  p->_version = ((struct __pyx_obj_12pyrobuf_list_Int32List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_timestamp);
  p->_timestamp = ((struct __pyx_obj_12pyrobuf_list_Int64List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_changeset);
  p->_changeset = ((struct __pyx_obj_12pyrobuf_list_Int64List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_uid);
  p->_uid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_user_sid);
  p->_user_sid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_visible);
  p->_visible = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_12pyrosm_proto_9DenseInfo_version(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_9DenseInfo_7version_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_9DenseInfo_version(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_9DenseInfo_7version_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_9DenseInfo_timestamp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_9DenseInfo_9timestamp_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_9DenseInfo_timestamp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_9DenseInfo_9timestamp_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_9DenseInfo_changeset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_9DenseInfo_9changeset_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_9DenseInfo_changeset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_9DenseInfo_9changeset_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_9DenseInfo_uid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_9DenseInfo_3uid_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_9DenseInfo_uid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_9DenseInfo_3uid_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_9DenseInfo_user_sid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_9DenseInfo_8user_sid_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_9DenseInfo_user_sid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_9DenseInfo_8user_sid_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_9DenseInfo_visible(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_9DenseInfo_7visible_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_9DenseInfo_visible(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_9DenseInfo_7visible_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_9DenseInfo__is_present_in_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_9DenseInfo_21_is_present_in_parent_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_9DenseInfo__is_present_in_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_9DenseInfo_21_is_present_in_parent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrosm_proto_DenseInfo[] = {
  {"reset", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_9reset, METH_NOARGS, 0},
  {"Clear", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_11Clear, METH_NOARGS, __pyx_doc_12pyrosm_proto_9DenseInfo_10Clear},
  {"ClearField", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_13ClearField, METH_O, __pyx_doc_12pyrosm_proto_9DenseInfo_12ClearField},
  {"CopyFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_15CopyFrom, METH_O, __pyx_doc_12pyrosm_proto_9DenseInfo_14CopyFrom},
  {"HasField", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_17HasField, METH_O, __pyx_doc_12pyrosm_proto_9DenseInfo_16HasField},
  {"IsInitialized", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_19IsInitialized, METH_NOARGS, __pyx_doc_12pyrosm_proto_9DenseInfo_18IsInitialized},
  {"MergeFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_21MergeFrom, METH_O, __pyx_doc_12pyrosm_proto_9DenseInfo_20MergeFrom},
  {"MergeFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_9DenseInfo_23MergeFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_9DenseInfo_22MergeFromString},
  {"ParseFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_9DenseInfo_25ParseFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_9DenseInfo_24ParseFromString},
  {"FromString", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_27FromString, METH_O, 0},
  {"_Modified", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_29_Modified, METH_NOARGS, 0},
  {"SerializeToString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_9DenseInfo_31SerializeToString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_9DenseInfo_30SerializeToString},
  {"SerializePartialToString", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_33SerializePartialToString, METH_NOARGS, __pyx_doc_12pyrosm_proto_9DenseInfo_32SerializePartialToString},
  {"SetInParent", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_35SetInParent, METH_NOARGS, __pyx_doc_12pyrosm_proto_9DenseInfo_34SetInParent},
  {"ParseFromJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_9DenseInfo_37ParseFromJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_9DenseInfo_36ParseFromJson},
  {"SerializeToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_9DenseInfo_39SerializeToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_9DenseInfo_38SerializeToJson},
  {"SerializePartialToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_9DenseInfo_41SerializePartialToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_9DenseInfo_40SerializePartialToJson},
  {"ParseFromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_9DenseInfo_43ParseFromDict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_9DenseInfo_42ParseFromDict},
  {"SerializeToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_45SerializeToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_9DenseInfo_44SerializeToDict},
  {"SerializePartialToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_47SerializePartialToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_9DenseInfo_46SerializePartialToDict},
  {"Items", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_49Items, METH_NOARGS, __pyx_doc_12pyrosm_proto_9DenseInfo_48Items},
  {"Fields", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_52Fields, METH_NOARGS, __pyx_doc_12pyrosm_proto_9DenseInfo_51Fields},
  {"Values", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_55Values, METH_NOARGS, __pyx_doc_12pyrosm_proto_9DenseInfo_54Values},
  {"Setters", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_58Setters, METH_NOARGS, __pyx_doc_12pyrosm_proto_9DenseInfo_57Setters},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_61__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_9DenseInfo_63__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrosm_proto_DenseInfo[] = {
  {(char *)"version", __pyx_getprop_12pyrosm_proto_9DenseInfo_version, __pyx_setprop_12pyrosm_proto_9DenseInfo_version, (char *)0, 0},
  {(char *)"timestamp", __pyx_getprop_12pyrosm_proto_9DenseInfo_timestamp, __pyx_setprop_12pyrosm_proto_9DenseInfo_timestamp, (char *)0, 0},
  {(char *)"changeset", __pyx_getprop_12pyrosm_proto_9DenseInfo_changeset, __pyx_setprop_12pyrosm_proto_9DenseInfo_changeset, (char *)0, 0},
  {(char *)"uid", __pyx_getprop_12pyrosm_proto_9DenseInfo_uid, __pyx_setprop_12pyrosm_proto_9DenseInfo_uid, (char *)0, 0},
  {(char *)"user_sid", __pyx_getprop_12pyrosm_proto_9DenseInfo_user_sid, __pyx_setprop_12pyrosm_proto_9DenseInfo_user_sid, (char *)0, 0},
  {(char *)"visible", __pyx_getprop_12pyrosm_proto_9DenseInfo_visible, __pyx_setprop_12pyrosm_proto_9DenseInfo_visible, (char *)0, 0},
  {(char *)"_is_present_in_parent", __pyx_getprop_12pyrosm_proto_9DenseInfo__is_present_in_parent, __pyx_setprop_12pyrosm_proto_9DenseInfo__is_present_in_parent, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_12pyrosm_proto_DenseInfo = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.DenseInfo", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto_DenseInfo), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto_DenseInfo, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrosm_proto_9DenseInfo_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto_DenseInfo, /*tp_traverse*/
  __pyx_tp_clear_12pyrosm_proto_DenseInfo, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrosm_proto_DenseInfo, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrosm_proto_DenseInfo, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_12pyrosm_proto_9DenseInfo_5__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto_DenseInfo, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_12pyrosm_proto_ChangeSet __pyx_vtable_12pyrosm_proto_ChangeSet;

static PyObject *__pyx_tp_new_12pyrosm_proto_ChangeSet(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_12pyrosm_proto_ChangeSet *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_12pyrosm_proto_ChangeSet *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrosm_proto_ChangeSet;
  p->_cached_serialization = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_12pyrosm_proto_9ChangeSet_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_12pyrosm_proto_ChangeSet(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto_ChangeSet *p = (struct __pyx_obj_12pyrosm_proto_ChangeSet *)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_CLEAR(p->_cached_serialization);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_12pyrosm_proto_9ChangeSet_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_9ChangeSet_2id_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_9ChangeSet_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_9ChangeSet_2id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_9ChangeSet__is_present_in_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_9ChangeSet_21_is_present_in_parent_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_9ChangeSet__is_present_in_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_9ChangeSet_21_is_present_in_parent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrosm_proto_ChangeSet[] = {
  {"reset", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_7reset, METH_NOARGS, 0},
  {"Clear", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_9Clear, METH_NOARGS, __pyx_doc_12pyrosm_proto_9ChangeSet_8Clear},
  {"ClearField", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_11ClearField, METH_O, __pyx_doc_12pyrosm_proto_9ChangeSet_10ClearField},
  {"CopyFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_13CopyFrom, METH_O, __pyx_doc_12pyrosm_proto_9ChangeSet_12CopyFrom},
  {"HasField", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_15HasField, METH_O, __pyx_doc_12pyrosm_proto_9ChangeSet_14HasField},
  {"IsInitialized", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_17IsInitialized, METH_NOARGS, __pyx_doc_12pyrosm_proto_9ChangeSet_16IsInitialized},
  {"MergeFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_19MergeFrom, METH_O, __pyx_doc_12pyrosm_proto_9ChangeSet_18MergeFrom},
  {"MergeFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_9ChangeSet_21MergeFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_9ChangeSet_20MergeFromString},
  {"ParseFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_9ChangeSet_23ParseFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_9ChangeSet_22ParseFromString},
  {"FromString", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_25FromString, METH_O, 0},
  {"_Modified", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_27_Modified, METH_NOARGS, 0},
  {"SerializeToString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_9ChangeSet_29SerializeToString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_9ChangeSet_28SerializeToString},
  {"SerializePartialToString", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_31SerializePartialToString, METH_NOARGS, __pyx_doc_12pyrosm_proto_9ChangeSet_30SerializePartialToString},
  {"SetInParent", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_33SetInParent, METH_NOARGS, __pyx_doc_12pyrosm_proto_9ChangeSet_32SetInParent},
  {"ParseFromJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_9ChangeSet_35ParseFromJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_9ChangeSet_34ParseFromJson},
  {"SerializeToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_9ChangeSet_37SerializeToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_9ChangeSet_36SerializeToJson},
  {"SerializePartialToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_9ChangeSet_39SerializePartialToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_9ChangeSet_38SerializePartialToJson},
  {"ParseFromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_9ChangeSet_41ParseFromDict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_9ChangeSet_40ParseFromDict},
  {"SerializeToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_43SerializeToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_9ChangeSet_42SerializeToDict},
  {"SerializePartialToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_45SerializePartialToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_9ChangeSet_44SerializePartialToDict},
  {"Items", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_47Items, METH_NOARGS, __pyx_doc_12pyrosm_proto_9ChangeSet_46Items},
  {"Fields", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_50Fields, METH_NOARGS, __pyx_doc_12pyrosm_proto_9ChangeSet_49Fields},
  {"Values", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_53Values, METH_NOARGS, __pyx_doc_12pyrosm_proto_9ChangeSet_52Values},
  {"Setters", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_56Setters, METH_NOARGS, __pyx_doc_12pyrosm_proto_9ChangeSet_55Setters},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_59__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_9ChangeSet_61__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrosm_proto_ChangeSet[] = {
  {(char *)"id", __pyx_getprop_12pyrosm_proto_9ChangeSet_id, __pyx_setprop_12pyrosm_proto_9ChangeSet_id, (char *)0, 0},
  {(char *)"_is_present_in_parent", __pyx_getprop_12pyrosm_proto_9ChangeSet__is_present_in_parent, __pyx_setprop_12pyrosm_proto_9ChangeSet__is_present_in_parent, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_12pyrosm_proto_ChangeSet = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.ChangeSet", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto_ChangeSet), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto_ChangeSet, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrosm_proto_9ChangeSet_5__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrosm_proto_ChangeSet, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrosm_proto_ChangeSet, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_12pyrosm_proto_9ChangeSet_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto_ChangeSet, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_12pyrosm_proto_Node __pyx_vtable_12pyrosm_proto_Node;

static PyObject *__pyx_tp_new_12pyrosm_proto_Node(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_12pyrosm_proto_Node *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_12pyrosm_proto_Node *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrosm_proto_Node;
  p->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)Py_None); Py_INCREF(Py_None);
  p->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)Py_None); Py_INCREF(Py_None);
  p->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)Py_None); Py_INCREF(Py_None);
  p->_cached_serialization = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_12pyrosm_proto_4Node_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_12pyrosm_proto_Node(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto_Node *p = (struct __pyx_obj_12pyrosm_proto_Node *)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);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrosm_proto_4Node_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_keys);
  Py_CLEAR(p->_vals);
  Py_CLEAR(p->_info);
  Py_CLEAR(p->_cached_serialization);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_12pyrosm_proto_Node(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto_Node *p = (struct __pyx_obj_12pyrosm_proto_Node *)o;
  if (p->_keys) {
    e = (*v)(((PyObject *)p->_keys), a); if (e) return e;
  }
  if (p->_vals) {
    e = (*v)(((PyObject *)p->_vals), a); if (e) return e;
  }
  if (p->_info) {
    e = (*v)(((PyObject *)p->_info), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrosm_proto_Node(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrosm_proto_Node *p = (struct __pyx_obj_12pyrosm_proto_Node *)o;
  tmp = ((PyObject*)p->_keys);
  p->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_vals);
  p->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_info);
  p->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Node_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Node_2id_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Node_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Node_2id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Node_keys(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Node_4keys_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Node_keys(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Node_4keys_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Node_vals(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Node_4vals_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Node_vals(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Node_4vals_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Node_info(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Node_4info_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Node_info(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Node_4info_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Node_lat(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Node_3lat_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Node_lat(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Node_3lat_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Node_lon(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Node_3lon_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Node_lon(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Node_3lon_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_4Node__is_present_in_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_4Node_21_is_present_in_parent_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_4Node__is_present_in_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_4Node_21_is_present_in_parent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrosm_proto_Node[] = {
  {"reset", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_9reset, METH_NOARGS, 0},
  {"Clear", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_11Clear, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Node_10Clear},
  {"ClearField", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_13ClearField, METH_O, __pyx_doc_12pyrosm_proto_4Node_12ClearField},
  {"CopyFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_15CopyFrom, METH_O, __pyx_doc_12pyrosm_proto_4Node_14CopyFrom},
  {"HasField", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_17HasField, METH_O, __pyx_doc_12pyrosm_proto_4Node_16HasField},
  {"IsInitialized", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_19IsInitialized, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Node_18IsInitialized},
  {"MergeFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_21MergeFrom, METH_O, __pyx_doc_12pyrosm_proto_4Node_20MergeFrom},
  {"MergeFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Node_23MergeFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Node_22MergeFromString},
  {"ParseFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Node_25ParseFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Node_24ParseFromString},
  {"FromString", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_27FromString, METH_O, 0},
  {"_Modified", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_29_Modified, METH_NOARGS, 0},
  {"SerializeToString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Node_31SerializeToString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Node_30SerializeToString},
  {"SerializePartialToString", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_33SerializePartialToString, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Node_32SerializePartialToString},
  {"SetInParent", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_35SetInParent, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Node_34SetInParent},
  {"ParseFromJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Node_37ParseFromJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Node_36ParseFromJson},
  {"SerializeToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Node_39SerializeToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Node_38SerializeToJson},
  {"SerializePartialToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Node_41SerializePartialToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Node_40SerializePartialToJson},
  {"ParseFromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_4Node_43ParseFromDict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_4Node_42ParseFromDict},
  {"SerializeToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_45SerializeToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Node_44SerializeToDict},
  {"SerializePartialToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_47SerializePartialToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Node_46SerializePartialToDict},
  {"Items", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_49Items, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Node_48Items},
  {"Fields", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_52Fields, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Node_51Fields},
  {"Values", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_55Values, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Node_54Values},
  {"Setters", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_58Setters, METH_NOARGS, __pyx_doc_12pyrosm_proto_4Node_57Setters},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_61__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_4Node_63__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrosm_proto_Node[] = {
  {(char *)"id", __pyx_getprop_12pyrosm_proto_4Node_id, __pyx_setprop_12pyrosm_proto_4Node_id, (char *)0, 0},
  {(char *)"keys", __pyx_getprop_12pyrosm_proto_4Node_keys, __pyx_setprop_12pyrosm_proto_4Node_keys, (char *)0, 0},
  {(char *)"vals", __pyx_getprop_12pyrosm_proto_4Node_vals, __pyx_setprop_12pyrosm_proto_4Node_vals, (char *)0, 0},
  {(char *)"info", __pyx_getprop_12pyrosm_proto_4Node_info, __pyx_setprop_12pyrosm_proto_4Node_info, (char *)0, 0},
  {(char *)"lat", __pyx_getprop_12pyrosm_proto_4Node_lat, __pyx_setprop_12pyrosm_proto_4Node_lat, (char *)0, 0},
  {(char *)"lon", __pyx_getprop_12pyrosm_proto_4Node_lon, __pyx_setprop_12pyrosm_proto_4Node_lon, (char *)0, 0},
  {(char *)"_is_present_in_parent", __pyx_getprop_12pyrosm_proto_4Node__is_present_in_parent, __pyx_setprop_12pyrosm_proto_4Node__is_present_in_parent, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_12pyrosm_proto_Node = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.Node", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto_Node), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto_Node, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrosm_proto_4Node_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto_Node, /*tp_traverse*/
  __pyx_tp_clear_12pyrosm_proto_Node, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrosm_proto_Node, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrosm_proto_Node, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_12pyrosm_proto_4Node_5__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto_Node, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_12pyrosm_proto_DenseNodes __pyx_vtable_12pyrosm_proto_DenseNodes;

static PyObject *__pyx_tp_new_12pyrosm_proto_DenseNodes(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_12pyrosm_proto_DenseNodes *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_12pyrosm_proto_DenseNodes *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrosm_proto_DenseNodes;
  p->_id = ((struct __pyx_obj_12pyrobuf_list_Int64List *)Py_None); Py_INCREF(Py_None);
  p->_denseinfo = ((struct __pyx_obj_12pyrosm_proto_DenseInfo *)Py_None); Py_INCREF(Py_None);
  p->_lat = ((struct __pyx_obj_12pyrobuf_list_Int64List *)Py_None); Py_INCREF(Py_None);
  p->_lon = ((struct __pyx_obj_12pyrobuf_list_Int64List *)Py_None); Py_INCREF(Py_None);
  p->_keys_vals = ((struct __pyx_obj_12pyrobuf_list_Int32List *)Py_None); Py_INCREF(Py_None);
  p->_cached_serialization = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_12pyrosm_proto_10DenseNodes_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_12pyrosm_proto_DenseNodes(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto_DenseNodes *p = (struct __pyx_obj_12pyrosm_proto_DenseNodes *)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);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrosm_proto_10DenseNodes_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_id);
  Py_CLEAR(p->_denseinfo);
  Py_CLEAR(p->_lat);
  Py_CLEAR(p->_lon);
  Py_CLEAR(p->_keys_vals);
  Py_CLEAR(p->_cached_serialization);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_12pyrosm_proto_DenseNodes(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto_DenseNodes *p = (struct __pyx_obj_12pyrosm_proto_DenseNodes *)o;
  if (p->_id) {
    e = (*v)(((PyObject *)p->_id), a); if (e) return e;
  }
  if (p->_denseinfo) {
    e = (*v)(((PyObject *)p->_denseinfo), a); if (e) return e;
  }
  if (p->_lat) {
    e = (*v)(((PyObject *)p->_lat), a); if (e) return e;
  }
  if (p->_lon) {
    e = (*v)(((PyObject *)p->_lon), a); if (e) return e;
  }
  if (p->_keys_vals) {
    e = (*v)(((PyObject *)p->_keys_vals), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrosm_proto_DenseNodes(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrosm_proto_DenseNodes *p = (struct __pyx_obj_12pyrosm_proto_DenseNodes *)o;
  tmp = ((PyObject*)p->_id);
  p->_id = ((struct __pyx_obj_12pyrobuf_list_Int64List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_denseinfo);
  p->_denseinfo = ((struct __pyx_obj_12pyrosm_proto_DenseInfo *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_lat);
  p->_lat = ((struct __pyx_obj_12pyrobuf_list_Int64List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_lon);
  p->_lon = ((struct __pyx_obj_12pyrobuf_list_Int64List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_keys_vals);
  p->_keys_vals = ((struct __pyx_obj_12pyrobuf_list_Int32List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_12pyrosm_proto_10DenseNodes_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_10DenseNodes_2id_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_10DenseNodes_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_10DenseNodes_2id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_10DenseNodes_denseinfo(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_10DenseNodes_9denseinfo_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_10DenseNodes_denseinfo(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_10DenseNodes_9denseinfo_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_10DenseNodes_lat(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_10DenseNodes_3lat_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_10DenseNodes_lat(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_10DenseNodes_3lat_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_10DenseNodes_lon(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_10DenseNodes_3lon_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_10DenseNodes_lon(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_10DenseNodes_3lon_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_10DenseNodes_keys_vals(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_10DenseNodes_9keys_vals_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_10DenseNodes_keys_vals(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_10DenseNodes_9keys_vals_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_10DenseNodes__is_present_in_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_10DenseNodes_21_is_present_in_parent_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_10DenseNodes__is_present_in_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_10DenseNodes_21_is_present_in_parent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrosm_proto_DenseNodes[] = {
  {"reset", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_9reset, METH_NOARGS, 0},
  {"Clear", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_11Clear, METH_NOARGS, __pyx_doc_12pyrosm_proto_10DenseNodes_10Clear},
  {"ClearField", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_13ClearField, METH_O, __pyx_doc_12pyrosm_proto_10DenseNodes_12ClearField},
  {"CopyFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_15CopyFrom, METH_O, __pyx_doc_12pyrosm_proto_10DenseNodes_14CopyFrom},
  {"HasField", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_17HasField, METH_O, __pyx_doc_12pyrosm_proto_10DenseNodes_16HasField},
  {"IsInitialized", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_19IsInitialized, METH_NOARGS, __pyx_doc_12pyrosm_proto_10DenseNodes_18IsInitialized},
  {"MergeFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_21MergeFrom, METH_O, __pyx_doc_12pyrosm_proto_10DenseNodes_20MergeFrom},
  {"MergeFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10DenseNodes_23MergeFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10DenseNodes_22MergeFromString},
  {"ParseFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10DenseNodes_25ParseFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10DenseNodes_24ParseFromString},
  {"FromString", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_27FromString, METH_O, 0},
  {"_Modified", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_29_Modified, METH_NOARGS, 0},
  {"SerializeToString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10DenseNodes_31SerializeToString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10DenseNodes_30SerializeToString},
  {"SerializePartialToString", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_33SerializePartialToString, METH_NOARGS, __pyx_doc_12pyrosm_proto_10DenseNodes_32SerializePartialToString},
  {"SetInParent", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_35SetInParent, METH_NOARGS, __pyx_doc_12pyrosm_proto_10DenseNodes_34SetInParent},
  {"ParseFromJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10DenseNodes_37ParseFromJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10DenseNodes_36ParseFromJson},
  {"SerializeToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10DenseNodes_39SerializeToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10DenseNodes_38SerializeToJson},
  {"SerializePartialToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10DenseNodes_41SerializePartialToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10DenseNodes_40SerializePartialToJson},
  {"ParseFromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_10DenseNodes_43ParseFromDict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_10DenseNodes_42ParseFromDict},
  {"SerializeToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_45SerializeToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_10DenseNodes_44SerializeToDict},
  {"SerializePartialToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_47SerializePartialToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_10DenseNodes_46SerializePartialToDict},
  {"Items", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_49Items, METH_NOARGS, __pyx_doc_12pyrosm_proto_10DenseNodes_48Items},
  {"Fields", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_52Fields, METH_NOARGS, __pyx_doc_12pyrosm_proto_10DenseNodes_51Fields},
  {"Values", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_55Values, METH_NOARGS, __pyx_doc_12pyrosm_proto_10DenseNodes_54Values},
  {"Setters", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_58Setters, METH_NOARGS, __pyx_doc_12pyrosm_proto_10DenseNodes_57Setters},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_61__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_10DenseNodes_63__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrosm_proto_DenseNodes[] = {
  {(char *)"id", __pyx_getprop_12pyrosm_proto_10DenseNodes_id, __pyx_setprop_12pyrosm_proto_10DenseNodes_id, (char *)0, 0},
  {(char *)"denseinfo", __pyx_getprop_12pyrosm_proto_10DenseNodes_denseinfo, __pyx_setprop_12pyrosm_proto_10DenseNodes_denseinfo, (char *)0, 0},
  {(char *)"lat", __pyx_getprop_12pyrosm_proto_10DenseNodes_lat, __pyx_setprop_12pyrosm_proto_10DenseNodes_lat, (char *)0, 0},
  {(char *)"lon", __pyx_getprop_12pyrosm_proto_10DenseNodes_lon, __pyx_setprop_12pyrosm_proto_10DenseNodes_lon, (char *)0, 0},
  {(char *)"keys_vals", __pyx_getprop_12pyrosm_proto_10DenseNodes_keys_vals, __pyx_setprop_12pyrosm_proto_10DenseNodes_keys_vals, (char *)0, 0},
  {(char *)"_is_present_in_parent", __pyx_getprop_12pyrosm_proto_10DenseNodes__is_present_in_parent, __pyx_setprop_12pyrosm_proto_10DenseNodes__is_present_in_parent, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_12pyrosm_proto_DenseNodes = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.DenseNodes", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto_DenseNodes), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto_DenseNodes, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrosm_proto_10DenseNodes_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto_DenseNodes, /*tp_traverse*/
  __pyx_tp_clear_12pyrosm_proto_DenseNodes, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrosm_proto_DenseNodes, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrosm_proto_DenseNodes, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_12pyrosm_proto_10DenseNodes_5__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto_DenseNodes, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_12pyrosm_proto_Way __pyx_vtable_12pyrosm_proto_Way;

static PyObject *__pyx_tp_new_12pyrosm_proto_Way(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_12pyrosm_proto_Way *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_12pyrosm_proto_Way *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrosm_proto_Way;
  p->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)Py_None); Py_INCREF(Py_None);
  p->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)Py_None); Py_INCREF(Py_None);
  p->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)Py_None); Py_INCREF(Py_None);
  p->_refs = ((struct __pyx_obj_12pyrobuf_list_Int64List *)Py_None); Py_INCREF(Py_None);
  p->_cached_serialization = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_12pyrosm_proto_3Way_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_12pyrosm_proto_Way(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto_Way *p = (struct __pyx_obj_12pyrosm_proto_Way *)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);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrosm_proto_3Way_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_keys);
  Py_CLEAR(p->_vals);
  Py_CLEAR(p->_info);
  Py_CLEAR(p->_refs);
  Py_CLEAR(p->_cached_serialization);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_12pyrosm_proto_Way(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto_Way *p = (struct __pyx_obj_12pyrosm_proto_Way *)o;
  if (p->_keys) {
    e = (*v)(((PyObject *)p->_keys), a); if (e) return e;
  }
  if (p->_vals) {
    e = (*v)(((PyObject *)p->_vals), a); if (e) return e;
  }
  if (p->_info) {
    e = (*v)(((PyObject *)p->_info), a); if (e) return e;
  }
  if (p->_refs) {
    e = (*v)(((PyObject *)p->_refs), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrosm_proto_Way(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrosm_proto_Way *p = (struct __pyx_obj_12pyrosm_proto_Way *)o;
  tmp = ((PyObject*)p->_keys);
  p->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_vals);
  p->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_info);
  p->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_refs);
  p->_refs = ((struct __pyx_obj_12pyrobuf_list_Int64List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_12pyrosm_proto_3Way_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_3Way_2id_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_3Way_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_3Way_2id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_3Way_keys(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_3Way_4keys_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_3Way_keys(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_3Way_4keys_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_3Way_vals(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_3Way_4vals_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_3Way_vals(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_3Way_4vals_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_3Way_info(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_3Way_4info_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_3Way_info(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_3Way_4info_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_3Way_refs(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_3Way_4refs_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_3Way_refs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_3Way_4refs_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_3Way__is_present_in_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_3Way_21_is_present_in_parent_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_3Way__is_present_in_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_3Way_21_is_present_in_parent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrosm_proto_Way[] = {
  {"reset", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_9reset, METH_NOARGS, 0},
  {"Clear", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_11Clear, METH_NOARGS, __pyx_doc_12pyrosm_proto_3Way_10Clear},
  {"ClearField", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_13ClearField, METH_O, __pyx_doc_12pyrosm_proto_3Way_12ClearField},
  {"CopyFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_15CopyFrom, METH_O, __pyx_doc_12pyrosm_proto_3Way_14CopyFrom},
  {"HasField", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_17HasField, METH_O, __pyx_doc_12pyrosm_proto_3Way_16HasField},
  {"IsInitialized", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_19IsInitialized, METH_NOARGS, __pyx_doc_12pyrosm_proto_3Way_18IsInitialized},
  {"MergeFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_21MergeFrom, METH_O, __pyx_doc_12pyrosm_proto_3Way_20MergeFrom},
  {"MergeFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_3Way_23MergeFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_3Way_22MergeFromString},
  {"ParseFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_3Way_25ParseFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_3Way_24ParseFromString},
  {"FromString", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_27FromString, METH_O, 0},
  {"_Modified", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_29_Modified, METH_NOARGS, 0},
  {"SerializeToString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_3Way_31SerializeToString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_3Way_30SerializeToString},
  {"SerializePartialToString", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_33SerializePartialToString, METH_NOARGS, __pyx_doc_12pyrosm_proto_3Way_32SerializePartialToString},
  {"SetInParent", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_35SetInParent, METH_NOARGS, __pyx_doc_12pyrosm_proto_3Way_34SetInParent},
  {"ParseFromJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_3Way_37ParseFromJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_3Way_36ParseFromJson},
  {"SerializeToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_3Way_39SerializeToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_3Way_38SerializeToJson},
  {"SerializePartialToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_3Way_41SerializePartialToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_3Way_40SerializePartialToJson},
  {"ParseFromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_3Way_43ParseFromDict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_3Way_42ParseFromDict},
  {"SerializeToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_45SerializeToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_3Way_44SerializeToDict},
  {"SerializePartialToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_47SerializePartialToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_3Way_46SerializePartialToDict},
  {"Items", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_49Items, METH_NOARGS, __pyx_doc_12pyrosm_proto_3Way_48Items},
  {"Fields", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_52Fields, METH_NOARGS, __pyx_doc_12pyrosm_proto_3Way_51Fields},
  {"Values", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_55Values, METH_NOARGS, __pyx_doc_12pyrosm_proto_3Way_54Values},
  {"Setters", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_58Setters, METH_NOARGS, __pyx_doc_12pyrosm_proto_3Way_57Setters},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_61__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_3Way_63__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrosm_proto_Way[] = {
  {(char *)"id", __pyx_getprop_12pyrosm_proto_3Way_id, __pyx_setprop_12pyrosm_proto_3Way_id, (char *)0, 0},
  {(char *)"keys", __pyx_getprop_12pyrosm_proto_3Way_keys, __pyx_setprop_12pyrosm_proto_3Way_keys, (char *)0, 0},
  {(char *)"vals", __pyx_getprop_12pyrosm_proto_3Way_vals, __pyx_setprop_12pyrosm_proto_3Way_vals, (char *)0, 0},
  {(char *)"info", __pyx_getprop_12pyrosm_proto_3Way_info, __pyx_setprop_12pyrosm_proto_3Way_info, (char *)0, 0},
  {(char *)"refs", __pyx_getprop_12pyrosm_proto_3Way_refs, __pyx_setprop_12pyrosm_proto_3Way_refs, (char *)0, 0},
  {(char *)"_is_present_in_parent", __pyx_getprop_12pyrosm_proto_3Way__is_present_in_parent, __pyx_setprop_12pyrosm_proto_3Way__is_present_in_parent, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_12pyrosm_proto_Way = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.Way", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto_Way), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto_Way, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrosm_proto_3Way_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto_Way, /*tp_traverse*/
  __pyx_tp_clear_12pyrosm_proto_Way, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrosm_proto_Way, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrosm_proto_Way, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_12pyrosm_proto_3Way_5__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto_Way, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_12pyrosm_proto_Relation __pyx_vtable_12pyrosm_proto_Relation;

static PyObject *__pyx_tp_new_12pyrosm_proto_Relation(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_12pyrosm_proto_Relation *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_12pyrosm_proto_Relation *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrosm_proto_Relation;
  p->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)Py_None); Py_INCREF(Py_None);
  p->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)Py_None); Py_INCREF(Py_None);
  p->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)Py_None); Py_INCREF(Py_None);
  p->_roles_sid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)Py_None); Py_INCREF(Py_None);
  p->_memids = ((struct __pyx_obj_12pyrobuf_list_Int64List *)Py_None); Py_INCREF(Py_None);
  p->_types = ((struct __pyx_obj_12pyrobuf_list_Int32List *)Py_None); Py_INCREF(Py_None);
  p->_cached_serialization = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_12pyrosm_proto_8Relation_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_12pyrosm_proto_Relation(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto_Relation *p = (struct __pyx_obj_12pyrosm_proto_Relation *)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);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrosm_proto_8Relation_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_keys);
  Py_CLEAR(p->_vals);
  Py_CLEAR(p->_info);
  Py_CLEAR(p->_roles_sid);
  Py_CLEAR(p->_memids);
  Py_CLEAR(p->_types);
  Py_CLEAR(p->_cached_serialization);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_12pyrosm_proto_Relation(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto_Relation *p = (struct __pyx_obj_12pyrosm_proto_Relation *)o;
  if (p->_keys) {
    e = (*v)(((PyObject *)p->_keys), a); if (e) return e;
  }
  if (p->_vals) {
    e = (*v)(((PyObject *)p->_vals), a); if (e) return e;
  }
  if (p->_info) {
    e = (*v)(((PyObject *)p->_info), a); if (e) return e;
  }
  if (p->_roles_sid) {
    e = (*v)(((PyObject *)p->_roles_sid), a); if (e) return e;
  }
  if (p->_memids) {
    e = (*v)(((PyObject *)p->_memids), a); if (e) return e;
  }
  if (p->_types) {
    e = (*v)(((PyObject *)p->_types), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrosm_proto_Relation(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrosm_proto_Relation *p = (struct __pyx_obj_12pyrosm_proto_Relation *)o;
  tmp = ((PyObject*)p->_keys);
  p->_keys = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_vals);
  p->_vals = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_info);
  p->_info = ((struct __pyx_obj_12pyrosm_proto_Info *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_roles_sid);
  p->_roles_sid = ((struct __pyx_obj_12pyrobuf_list_Int32List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_memids);
  p->_memids = ((struct __pyx_obj_12pyrobuf_list_Int64List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_types);
  p->_types = ((struct __pyx_obj_12pyrobuf_list_Int32List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_12pyrosm_proto_8Relation_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_8Relation_2id_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_8Relation_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_8Relation_2id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_8Relation_keys(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_8Relation_4keys_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_8Relation_keys(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_8Relation_4keys_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_8Relation_vals(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_8Relation_4vals_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_8Relation_vals(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_8Relation_4vals_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_8Relation_info(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_8Relation_4info_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_8Relation_info(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_8Relation_4info_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_8Relation_roles_sid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_8Relation_9roles_sid_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_8Relation_roles_sid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_8Relation_9roles_sid_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_8Relation_memids(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_8Relation_6memids_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_8Relation_memids(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_8Relation_6memids_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_8Relation_types(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_8Relation_5types_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_8Relation_types(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_8Relation_5types_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrosm_proto_8Relation__is_present_in_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrosm_proto_8Relation_21_is_present_in_parent_1__get__(o);
}

static int __pyx_setprop_12pyrosm_proto_8Relation__is_present_in_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_12pyrosm_proto_8Relation_21_is_present_in_parent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrosm_proto_Relation[] = {
  {"reset", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_9reset, METH_NOARGS, 0},
  {"Clear", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_11Clear, METH_NOARGS, __pyx_doc_12pyrosm_proto_8Relation_10Clear},
  {"ClearField", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_13ClearField, METH_O, __pyx_doc_12pyrosm_proto_8Relation_12ClearField},
  {"CopyFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_15CopyFrom, METH_O, __pyx_doc_12pyrosm_proto_8Relation_14CopyFrom},
  {"HasField", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_17HasField, METH_O, __pyx_doc_12pyrosm_proto_8Relation_16HasField},
  {"IsInitialized", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_19IsInitialized, METH_NOARGS, __pyx_doc_12pyrosm_proto_8Relation_18IsInitialized},
  {"MergeFrom", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_21MergeFrom, METH_O, __pyx_doc_12pyrosm_proto_8Relation_20MergeFrom},
  {"MergeFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_8Relation_23MergeFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_8Relation_22MergeFromString},
  {"ParseFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_8Relation_25ParseFromString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_8Relation_24ParseFromString},
  {"FromString", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_27FromString, METH_O, 0},
  {"_Modified", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_29_Modified, METH_NOARGS, 0},
  {"SerializeToString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_8Relation_31SerializeToString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_8Relation_30SerializeToString},
  {"SerializePartialToString", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_33SerializePartialToString, METH_NOARGS, __pyx_doc_12pyrosm_proto_8Relation_32SerializePartialToString},
  {"SetInParent", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_35SetInParent, METH_NOARGS, __pyx_doc_12pyrosm_proto_8Relation_34SetInParent},
  {"ParseFromJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_8Relation_37ParseFromJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_8Relation_36ParseFromJson},
  {"SerializeToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_8Relation_39SerializeToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_8Relation_38SerializeToJson},
  {"SerializePartialToJson", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_8Relation_41SerializePartialToJson, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_8Relation_40SerializePartialToJson},
  {"ParseFromDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12pyrosm_proto_8Relation_43ParseFromDict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12pyrosm_proto_8Relation_42ParseFromDict},
  {"SerializeToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_45SerializeToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_8Relation_44SerializeToDict},
  {"SerializePartialToDict", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_47SerializePartialToDict, METH_NOARGS, __pyx_doc_12pyrosm_proto_8Relation_46SerializePartialToDict},
  {"Items", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_49Items, METH_NOARGS, __pyx_doc_12pyrosm_proto_8Relation_48Items},
  {"Fields", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_52Fields, METH_NOARGS, __pyx_doc_12pyrosm_proto_8Relation_51Fields},
  {"Values", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_55Values, METH_NOARGS, __pyx_doc_12pyrosm_proto_8Relation_54Values},
  {"Setters", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_58Setters, METH_NOARGS, __pyx_doc_12pyrosm_proto_8Relation_57Setters},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_61__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_12pyrosm_proto_8Relation_63__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrosm_proto_Relation[] = {
  {(char *)"id", __pyx_getprop_12pyrosm_proto_8Relation_id, __pyx_setprop_12pyrosm_proto_8Relation_id, (char *)0, 0},
  {(char *)"keys", __pyx_getprop_12pyrosm_proto_8Relation_keys, __pyx_setprop_12pyrosm_proto_8Relation_keys, (char *)0, 0},
  {(char *)"vals", __pyx_getprop_12pyrosm_proto_8Relation_vals, __pyx_setprop_12pyrosm_proto_8Relation_vals, (char *)0, 0},
  {(char *)"info", __pyx_getprop_12pyrosm_proto_8Relation_info, __pyx_setprop_12pyrosm_proto_8Relation_info, (char *)0, 0},
  {(char *)"roles_sid", __pyx_getprop_12pyrosm_proto_8Relation_roles_sid, __pyx_setprop_12pyrosm_proto_8Relation_roles_sid, (char *)0, 0},
  {(char *)"memids", __pyx_getprop_12pyrosm_proto_8Relation_memids, __pyx_setprop_12pyrosm_proto_8Relation_memids, (char *)0, 0},
  {(char *)"types", __pyx_getprop_12pyrosm_proto_8Relation_types, __pyx_setprop_12pyrosm_proto_8Relation_types, (char *)0, 0},
  {(char *)"_is_present_in_parent", __pyx_getprop_12pyrosm_proto_8Relation__is_present_in_parent, __pyx_setprop_12pyrosm_proto_8Relation__is_present_in_parent, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_12pyrosm_proto_Relation = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.Relation", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto_Relation), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto_Relation, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrosm_proto_8Relation_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto_Relation, /*tp_traverse*/
  __pyx_tp_clear_12pyrosm_proto_Relation, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrosm_proto_Relation, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrosm_proto_Relation, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_12pyrosm_proto_8Relation_5__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto_Relation, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items *__pyx_freelist_12pyrosm_proto___pyx_scope_struct__Items[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct__Items = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct__Items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct__Items > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct__Items[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct__Items];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct__Items(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct__Items < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct__Items[__pyx_freecount_12pyrosm_proto___pyx_scope_struct__Items++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct__Items(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct__Items = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct__Items", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct__Items), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct__Items, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct__Items, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct__Items, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_1_Fields[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_1_Fields = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_1_Fields(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_1_Fields > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_1_Fields[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_1_Fields];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_1_Fields(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_1_Fields < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_1_Fields[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_1_Fields++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_1_Fields(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_1_Fields = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_1_Fields", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_1_Fields), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_1_Fields, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_1_Fields, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_1_Fields, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_2_Values[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_2_Values = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_2_Values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_2_Values > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_2_Values[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_2_Values];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_2_Values(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_2_Values < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_2_Values[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_2_Values++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_2_Values(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_2_Values = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_2_Values", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_2_Values), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_2_Values, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_2_Values, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_2_Values, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_3_Setters[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_3_Setters = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_3_Setters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_3_Setters > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_3_Setters[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_3_Setters];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_3_Setters(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_setter);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_3_Setters < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_3_Setters[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_3_Setters++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_3_Setters(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_setter) {
    e = (*v)(p->__pyx_v_setter, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_3_Setters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_3_Setters", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_3_Setters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_3_Setters, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_3_Setters, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_3_Setters, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_4_Items[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_4_Items = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_4_Items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_4_Items > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_4_Items[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_4_Items];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_4_Items(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_4_Items < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_4_Items[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_4_Items++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_4_Items(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_4_Items = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_4_Items", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_4_Items), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_4_Items, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_4_Items, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_4_Items, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_5_Fields[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_5_Fields = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_5_Fields(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_5_Fields > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_5_Fields[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_5_Fields];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_5_Fields(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_5_Fields < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_5_Fields[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_5_Fields++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_5_Fields(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_5_Fields = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_5_Fields", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_5_Fields), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_5_Fields, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_5_Fields, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_5_Fields, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_6_Values[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_6_Values = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_6_Values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_6_Values > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_6_Values[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_6_Values];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_6_Values(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_6_Values < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_6_Values[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_6_Values++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_6_Values(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_6_Values = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_6_Values", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_6_Values), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_6_Values, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_6_Values, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_6_Values, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_7_Setters[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_7_Setters = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_7_Setters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_7_Setters > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_7_Setters[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_7_Setters];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_7_Setters(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_setter);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_7_Setters < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_7_Setters[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_7_Setters++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_7_Setters(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_setter) {
    e = (*v)(p->__pyx_v_setter, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_7_Setters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_7_Setters", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_7_Setters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_7_Setters, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_7_Setters, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_7_Setters, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_8_Items[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_8_Items = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_8_Items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_8_Items > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_8_Items[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_8_Items];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_8_Items(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_8_Items < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_8_Items[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_8_Items++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_8_Items(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_8_Items = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_8_Items", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_8_Items), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_8_Items, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_8_Items, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_8_Items, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_9_Fields[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_9_Fields = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_9_Fields(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_9_Fields > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_9_Fields[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_9_Fields];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_9_Fields(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_9_Fields < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_9_Fields[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_9_Fields++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_9_Fields(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_9_Fields = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_9_Fields", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_9_Fields), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_9_Fields, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_9_Fields, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_9_Fields, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_10_Values[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_10_Values = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_10_Values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_10_Values > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_10_Values[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_10_Values];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_10_Values(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_10_Values < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_10_Values[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_10_Values++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_10_Values(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_10_Values = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_10_Values", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_10_Values), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_10_Values, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_10_Values, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_10_Values, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_11_Setters[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_11_Setters = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_11_Setters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_11_Setters > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_11_Setters[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_11_Setters];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_11_Setters(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_setter);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_11_Setters < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_11_Setters[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_11_Setters++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_11_Setters(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_setter) {
    e = (*v)(p->__pyx_v_setter, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_11_Setters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_11_Setters", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_11_Setters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_11_Setters, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_11_Setters, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_11_Setters, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_12_Items[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_12_Items = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_12_Items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_12_Items > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_12_Items[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_12_Items];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_12_Items(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_12_Items < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_12_Items[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_12_Items++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_12_Items(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_12_Items = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_12_Items", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_12_Items), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_12_Items, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_12_Items, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_12_Items, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_13_Fields[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_13_Fields = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_13_Fields(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_13_Fields > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_13_Fields[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_13_Fields];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_13_Fields(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_13_Fields < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_13_Fields[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_13_Fields++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_13_Fields(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_13_Fields = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_13_Fields", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_13_Fields), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_13_Fields, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_13_Fields, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_13_Fields, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_14_Values[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_14_Values = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_14_Values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_14_Values > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_14_Values[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_14_Values];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_14_Values(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_14_Values < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_14_Values[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_14_Values++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_14_Values(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_14_Values = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_14_Values", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_14_Values), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_14_Values, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_14_Values, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_14_Values, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_15_Setters[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_15_Setters = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_15_Setters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_15_Setters > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_15_Setters[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_15_Setters];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_15_Setters(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_setter);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_15_Setters < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_15_Setters[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_15_Setters++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_15_Setters(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_setter) {
    e = (*v)(p->__pyx_v_setter, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_15_Setters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_15_Setters", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_15_Setters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_15_Setters, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_15_Setters, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_15_Setters, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_16_Items[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_16_Items = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_16_Items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_16_Items > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_16_Items[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_16_Items];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_16_Items(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_16_Items < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_16_Items[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_16_Items++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_16_Items(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_16_Items = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_16_Items", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_16_Items), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_16_Items, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_16_Items, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_16_Items, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_17_Fields[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_17_Fields = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_17_Fields(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_17_Fields > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_17_Fields[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_17_Fields];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_17_Fields(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_17_Fields < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_17_Fields[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_17_Fields++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_17_Fields(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_17_Fields = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_17_Fields", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_17_Fields), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_17_Fields, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_17_Fields, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_17_Fields, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_18_Values[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_18_Values = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_18_Values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_18_Values > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_18_Values[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_18_Values];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_18_Values(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_18_Values < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_18_Values[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_18_Values++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_18_Values(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_18_Values = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_18_Values", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_18_Values), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_18_Values, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_18_Values, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_18_Values, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_19_Setters[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_19_Setters = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_19_Setters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_19_Setters > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_19_Setters[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_19_Setters];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_19_Setters(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_setter);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_19_Setters < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_19_Setters[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_19_Setters++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_19_Setters(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_setter) {
    e = (*v)(p->__pyx_v_setter, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_19_Setters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_19_Setters", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_19_Setters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_19_Setters, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_19_Setters, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_19_Setters, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_20_Items[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_20_Items = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_20_Items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_20_Items > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_20_Items[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_20_Items];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_20_Items(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_20_Items < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_20_Items[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_20_Items++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_20_Items(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_20_Items = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_20_Items", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_20_Items), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_20_Items, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_20_Items, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_20_Items, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_21_Fields[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_21_Fields = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_21_Fields(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_21_Fields > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_21_Fields[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_21_Fields];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_21_Fields(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_21_Fields < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_21_Fields[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_21_Fields++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_21_Fields(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_21_Fields = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_21_Fields", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_21_Fields), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_21_Fields, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_21_Fields, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_21_Fields, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_22_Values[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_22_Values = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_22_Values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_22_Values > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_22_Values[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_22_Values];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_22_Values(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_22_Values < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_22_Values[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_22_Values++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_22_Values(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_22_Values = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_22_Values", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_22_Values), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_22_Values, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_22_Values, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_22_Values, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_23_Setters[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_23_Setters = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_23_Setters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_23_Setters > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_23_Setters[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_23_Setters];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_23_Setters(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_setter);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_23_Setters < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_23_Setters[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_23_Setters++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_23_Setters(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_setter) {
    e = (*v)(p->__pyx_v_setter, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_23_Setters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_23_Setters", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_23_Setters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_23_Setters, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_23_Setters, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_23_Setters, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_24_Items[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_24_Items = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_24_Items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_24_Items > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_24_Items[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_24_Items];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_24_Items(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_24_Items < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_24_Items[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_24_Items++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_24_Items(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_24_Items = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_24_Items", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_24_Items), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_24_Items, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_24_Items, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_24_Items, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_25_Fields[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_25_Fields = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_25_Fields(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_25_Fields > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_25_Fields[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_25_Fields];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_25_Fields(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_25_Fields < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_25_Fields[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_25_Fields++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_25_Fields(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_25_Fields = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_25_Fields", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_25_Fields), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_25_Fields, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_25_Fields, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_25_Fields, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_26_Values[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_26_Values = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_26_Values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_26_Values > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_26_Values[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_26_Values];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_26_Values(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_26_Values < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_26_Values[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_26_Values++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_26_Values(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_26_Values = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_26_Values", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_26_Values), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_26_Values, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_26_Values, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_26_Values, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_27_Setters[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_27_Setters = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_27_Setters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_27_Setters > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_27_Setters[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_27_Setters];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_27_Setters(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_setter);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_27_Setters < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_27_Setters[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_27_Setters++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_27_Setters(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_setter) {
    e = (*v)(p->__pyx_v_setter, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_27_Setters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_27_Setters", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_27_Setters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_27_Setters, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_27_Setters, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_27_Setters, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_28_Items[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_28_Items = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_28_Items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_28_Items > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_28_Items[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_28_Items];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_28_Items(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_28_Items < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_28_Items[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_28_Items++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_28_Items(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_28_Items = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_28_Items", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_28_Items), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_28_Items, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_28_Items, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_28_Items, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_29_Fields[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_29_Fields = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_29_Fields(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_29_Fields > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_29_Fields[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_29_Fields];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_29_Fields(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_29_Fields < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_29_Fields[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_29_Fields++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_29_Fields(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_29_Fields = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_29_Fields", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_29_Fields), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_29_Fields, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_29_Fields, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_29_Fields, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_30_Values[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_30_Values = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_30_Values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_30_Values > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_30_Values[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_30_Values];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_30_Values(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_30_Values < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_30_Values[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_30_Values++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_30_Values(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_30_Values = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_30_Values", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_30_Values), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_30_Values, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_30_Values, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_30_Values, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_31_Setters[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_31_Setters = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_31_Setters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_31_Setters > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_31_Setters[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_31_Setters];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_31_Setters(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_setter);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_31_Setters < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_31_Setters[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_31_Setters++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_31_Setters(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_setter) {
    e = (*v)(p->__pyx_v_setter, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_31_Setters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_31_Setters", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_31_Setters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_31_Setters, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_31_Setters, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_31_Setters, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_32_Items[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_32_Items = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_32_Items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_32_Items > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_32_Items[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_32_Items];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_32_Items(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_32_Items < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_32_Items[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_32_Items++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_32_Items(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_32_Items = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_32_Items", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_32_Items), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_32_Items, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_32_Items, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_32_Items, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_33_Fields[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_33_Fields = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_33_Fields(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_33_Fields > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_33_Fields[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_33_Fields];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_33_Fields(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_33_Fields < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_33_Fields[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_33_Fields++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_33_Fields(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_33_Fields = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_33_Fields", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_33_Fields), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_33_Fields, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_33_Fields, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_33_Fields, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_34_Values[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_34_Values = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_34_Values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_34_Values > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_34_Values[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_34_Values];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_34_Values(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_34_Values < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_34_Values[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_34_Values++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_34_Values(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_34_Values = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_34_Values", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_34_Values), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_34_Values, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_34_Values, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_34_Values, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_35_Setters[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_35_Setters = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_35_Setters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_35_Setters > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_35_Setters[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_35_Setters];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_35_Setters(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_setter);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_35_Setters < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_35_Setters[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_35_Setters++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_35_Setters(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_setter) {
    e = (*v)(p->__pyx_v_setter, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_35_Setters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_35_Setters", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_35_Setters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_35_Setters, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_35_Setters, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_35_Setters, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_36_Items[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_36_Items = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_36_Items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_36_Items > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_36_Items[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_36_Items];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_36_Items(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_36_Items < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_36_Items[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_36_Items++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_36_Items(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_36_Items = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_36_Items", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_36_Items), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_36_Items, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_36_Items, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_36_Items, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_37_Fields[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_37_Fields = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_37_Fields(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_37_Fields > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_37_Fields[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_37_Fields];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_37_Fields(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_37_Fields < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_37_Fields[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_37_Fields++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_37_Fields(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_37_Fields = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_37_Fields", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_37_Fields), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_37_Fields, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_37_Fields, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_37_Fields, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_38_Values[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_38_Values = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_38_Values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_38_Values > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_38_Values[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_38_Values];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_38_Values(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_38_Values < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_38_Values[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_38_Values++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_38_Values(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_38_Values = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_38_Values", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_38_Values), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_38_Values, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_38_Values, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_38_Values, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_39_Setters[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_39_Setters = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_39_Setters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_39_Setters > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_39_Setters[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_39_Setters];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_39_Setters(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_setter);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_39_Setters < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_39_Setters[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_39_Setters++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_39_Setters(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_setter) {
    e = (*v)(p->__pyx_v_setter, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_39_Setters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_39_Setters", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_39_Setters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_39_Setters, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_39_Setters, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_39_Setters, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_40_Items[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_40_Items = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_40_Items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_40_Items > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_40_Items[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_40_Items];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_40_Items(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_40_Items < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_40_Items[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_40_Items++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_40_Items(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_40_Items = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_40_Items", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_40_Items), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_40_Items, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_40_Items, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_40_Items, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_41_Fields[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_41_Fields = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_41_Fields(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_41_Fields > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_41_Fields[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_41_Fields];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_41_Fields(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_41_Fields < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_41_Fields[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_41_Fields++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_41_Fields(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_41_Fields = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_41_Fields", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_41_Fields), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_41_Fields, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_41_Fields, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_41_Fields, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_42_Values[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_42_Values = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_42_Values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_42_Values > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_42_Values[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_42_Values];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_42_Values(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_42_Values < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_42_Values[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_42_Values++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_42_Values(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_42_Values = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_42_Values", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_42_Values), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_42_Values, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_42_Values, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_42_Values, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_43_Setters[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_43_Setters = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_43_Setters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_43_Setters > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_43_Setters[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_43_Setters];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_43_Setters(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_setter);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_43_Setters < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_43_Setters[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_43_Setters++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_43_Setters(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_setter) {
    e = (*v)(p->__pyx_v_setter, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_43_Setters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_43_Setters", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_43_Setters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_43_Setters, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_43_Setters, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_43_Setters, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_44_Items[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_44_Items = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_44_Items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_44_Items > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_44_Items[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_44_Items];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_44_Items(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_44_Items < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_44_Items[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_44_Items++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_44_Items(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_44_Items = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_44_Items", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_44_Items), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_44_Items, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_44_Items, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_44_Items, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_45_Fields[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_45_Fields = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_45_Fields(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_45_Fields > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_45_Fields[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_45_Fields];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_45_Fields(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_45_Fields < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_45_Fields[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_45_Fields++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_45_Fields(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_45_Fields = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_45_Fields", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_45_Fields), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_45_Fields, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_45_Fields, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_45_Fields, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_46_Values[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_46_Values = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_46_Values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_46_Values > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_46_Values[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_46_Values];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_46_Values(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_46_Values < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_46_Values[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_46_Values++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_46_Values(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_46_Values = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_46_Values", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_46_Values), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_46_Values, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_46_Values, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_46_Values, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_47_Setters[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_47_Setters = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_47_Setters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_47_Setters > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_47_Setters[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_47_Setters];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_47_Setters(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_setter);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_47_Setters < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_47_Setters[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_47_Setters++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_47_Setters(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_setter) {
    e = (*v)(p->__pyx_v_setter, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_47_Setters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_47_Setters", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_47_Setters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_47_Setters, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_47_Setters, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_47_Setters, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_48_Items[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_48_Items = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_48_Items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_48_Items > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_48_Items[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_48_Items];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_48_Items(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_48_Items < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_48_Items[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_48_Items++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_48_Items(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_48_Items = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_48_Items", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_48_Items), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_48_Items, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_48_Items, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_48_Items, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_49_Fields[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_49_Fields = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_49_Fields(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_49_Fields > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_49_Fields[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_49_Fields];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_49_Fields(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_49_Fields < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_49_Fields[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_49_Fields++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_49_Fields(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_49_Fields = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_49_Fields", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_49_Fields), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_49_Fields, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_49_Fields, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_49_Fields, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_50_Values[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_50_Values = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_50_Values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_50_Values > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_50_Values[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_50_Values];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_50_Values(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_50_Values < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_50_Values[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_50_Values++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_50_Values(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_50_Values = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_50_Values", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_50_Values), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_50_Values, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_50_Values, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_50_Values, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_51_Setters[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_51_Setters = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_51_Setters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_51_Setters > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_51_Setters[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_51_Setters];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_51_Setters(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_setter);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_51_Setters < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_51_Setters[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_51_Setters++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_51_Setters(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_setter) {
    e = (*v)(p->__pyx_v_setter, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_51_Setters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_51_Setters", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_51_Setters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_51_Setters, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_51_Setters, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_51_Setters, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_52_Items[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_52_Items = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_52_Items(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_52_Items > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_52_Items[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_52_Items];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_52_Items(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_52_Items < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_52_Items[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_52_Items++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_52_Items(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_52_Items = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_52_Items", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_52_Items), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_52_Items, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_52_Items, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_52_Items, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_53_Fields[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_53_Fields = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_53_Fields(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_53_Fields > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_53_Fields[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_53_Fields];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_53_Fields(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_53_Fields < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_53_Fields[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_53_Fields++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_53_Fields(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_53_Fields = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_53_Fields", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_53_Fields), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_53_Fields, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_53_Fields, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_53_Fields, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_54_Values[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_54_Values = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_54_Values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_54_Values > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_54_Values[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_54_Values];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_54_Values(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_54_Values < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_54_Values[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_54_Values++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_54_Values(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_54_Values = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_54_Values", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_54_Values), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_54_Values, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_54_Values, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_54_Values, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *__pyx_freelist_12pyrosm_proto___pyx_scope_struct_55_Setters[8];
static int __pyx_freecount_12pyrosm_proto___pyx_scope_struct_55_Setters = 0;

static PyObject *__pyx_tp_new_12pyrosm_proto___pyx_scope_struct_55_Setters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_55_Setters > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters)))) {
    o = (PyObject*)__pyx_freelist_12pyrosm_proto___pyx_scope_struct_55_Setters[--__pyx_freecount_12pyrosm_proto___pyx_scope_struct_55_Setters];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_55_Setters(PyObject *o) {
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_setter);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrosm_proto___pyx_scope_struct_55_Setters < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters)))) {
    __pyx_freelist_12pyrosm_proto___pyx_scope_struct_55_Setters[__pyx_freecount_12pyrosm_proto___pyx_scope_struct_55_Setters++] = ((struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_55_Setters(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *p = (struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_setter) {
    e = (*v)(p->__pyx_v_setter, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_12pyrosm_proto___pyx_scope_struct_55_Setters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.__pyx_scope_struct_55_Setters", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrosm_proto___pyx_scope_struct_55_Setters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrosm_proto___pyx_scope_struct_55_Setters, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrosm_proto___pyx_scope_struct_55_Setters, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrosm_proto___pyx_scope_struct_55_Setters, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_array __pyx_vtable_array;

static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_array_obj *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_array_obj *)o);
  p->__pyx_vtab = __pyx_vtabptr_array;
  p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_array(PyObject *o) {
  struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_array___dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->mode);
  Py_CLEAR(p->_format);
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_array___setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_array___getattr__(o, n);
  }
  return v;
}

static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
}

static PyMethodDef __pyx_methods_array[] = {
  {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_array[] = {
  {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_array = {
  __pyx_array___len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_array, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_array = {
  __pyx_array___len__, /*mp_length*/
  __pyx_array___getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_array = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  __pyx_array_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type___pyx_array = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.array", /*tp_name*/
  sizeof(struct __pyx_array_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_array, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  __pyx_tp_getattro_array, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_array, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_array, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_array, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_MemviewEnum_obj *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_MemviewEnum_obj *)o);
  p->name = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_Enum(PyObject *o) {
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->name);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  if (p->name) {
    e = (*v)(p->name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_Enum(PyObject *o) {
  PyObject* tmp;
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  tmp = ((PyObject*)p->name);
  p->name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_Enum[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type___pyx_MemviewEnum = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.Enum", /*tp_name*/
  sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_Enum, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_MemviewEnum___repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_Enum, /*tp_traverse*/
  __pyx_tp_clear_Enum, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_Enum, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_MemviewEnum___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_Enum, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;

static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_memoryview_obj *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_memoryview_obj *)o);
  p->__pyx_vtab = __pyx_vtabptr_memoryview;
  p->obj = Py_None; Py_INCREF(Py_None);
  p->_size = Py_None; Py_INCREF(Py_None);
  p->_array_interface = Py_None; Py_INCREF(Py_None);
  p->view.obj = NULL;
  if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_memoryview(PyObject *o) {
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_memoryview___dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->obj);
  Py_CLEAR(p->_size);
  Py_CLEAR(p->_array_interface);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  if (p->obj) {
    e = (*v)(p->obj, a); if (e) return e;
  }
  if (p->_size) {
    e = (*v)(p->_size, a); if (e) return e;
  }
  if (p->_array_interface) {
    e = (*v)(p->_array_interface, a); if (e) return e;
  }
  if (p->view.obj) {
    e = (*v)(p->view.obj, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_memoryview(PyObject *o) {
  PyObject* tmp;
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  tmp = ((PyObject*)p->obj);
  p->obj = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_size);
  p->_size = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_array_interface);
  p->_array_interface = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  Py_CLEAR(p->view.obj);
  return 0;
}
static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_memoryview___setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
}

static PyMethodDef __pyx_methods_memoryview[] = {
  {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0},
  {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0},
  {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0},
  {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_memoryview[] = {
  {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
  {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
  {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
  {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
  {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
  {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
  {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
  {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
  {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
  __pyx_memoryview___len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_memoryview, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
  __pyx_memoryview___len__, /*mp_length*/
  __pyx_memoryview___getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type___pyx_memoryview = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto.memoryview", /*tp_name*/
  sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_memoryview___repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_memoryview___str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_memoryview, /*tp_traverse*/
  __pyx_tp_clear_memoryview, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_memoryview, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_memoryview, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_memoryview, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;

static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_memoryviewslice_obj *p;
  PyObject *o = __pyx_tp_new_memoryview(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_memoryviewslice_obj *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
  p->from_object = Py_None; Py_INCREF(Py_None);
  p->from_slice.memview = NULL;
  return o;
}

static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_memoryviewslice___dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->from_object);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_memoryview(o);
}

static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
  if (p->from_object) {
    e = (*v)(p->from_object, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
  PyObject* tmp;
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  __pyx_tp_clear_memoryview(o);
  tmp = ((PyObject*)p->from_object);
  p->from_object = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  __PYX_XDEC_MEMVIEW(&p->from_slice, 1);
  return 0;
}

static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o);
}

static PyMethodDef __pyx_methods__memoryviewslice[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = {
  {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type___pyx_memoryviewslice = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrosm_proto._memoryviewslice", /*tp_name*/
  sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_memoryview___repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_memoryview___str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "Internal class for passing memoryview slices to Python", /*tp_doc*/
  __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
  __pyx_tp_clear__memoryviewslice, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods__memoryviewslice, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets__memoryviewslice, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new__memoryviewslice, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #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_pyrosm_proto(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_pyrosm_proto},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "pyrosm_proto",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
  {&__pyx_kp_s_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 1, 0},
  {&__pyx_kp_s_0_1, __pyx_k_0_1, sizeof(__pyx_k_0_1), 0, 0, 1, 0},
  {&__pyx_kp_s_0_2, __pyx_k_0_2, sizeof(__pyx_k_0_2), 0, 0, 1, 0},
  {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_n_s_Blob, __pyx_k_Blob, sizeof(__pyx_k_Blob), 0, 0, 1, 1},
  {&__pyx_n_s_BlobHeader, __pyx_k_BlobHeader, sizeof(__pyx_k_BlobHeader), 0, 0, 1, 1},
  {&__pyx_n_s_BlobHeader_Fields, __pyx_k_BlobHeader_Fields, sizeof(__pyx_k_BlobHeader_Fields), 0, 0, 1, 1},
  {&__pyx_n_s_BlobHeader_Items, __pyx_k_BlobHeader_Items, sizeof(__pyx_k_BlobHeader_Items), 0, 0, 1, 1},
  {&__pyx_n_s_BlobHeader_Setters, __pyx_k_BlobHeader_Setters, sizeof(__pyx_k_BlobHeader_Setters), 0, 0, 1, 1},
  {&__pyx_n_s_BlobHeader_Values, __pyx_k_BlobHeader_Values, sizeof(__pyx_k_BlobHeader_Values), 0, 0, 1, 1},
  {&__pyx_n_s_Blob_Fields, __pyx_k_Blob_Fields, sizeof(__pyx_k_Blob_Fields), 0, 0, 1, 1},
  {&__pyx_n_s_Blob_Items, __pyx_k_Blob_Items, sizeof(__pyx_k_Blob_Items), 0, 0, 1, 1},
  {&__pyx_n_s_Blob_Setters, __pyx_k_Blob_Setters, sizeof(__pyx_k_Blob_Setters), 0, 0, 1, 1},
  {&__pyx_n_s_Blob_Values, __pyx_k_Blob_Values, sizeof(__pyx_k_Blob_Values), 0, 0, 1, 1},
  {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
  {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0},
  {&__pyx_n_s_ChangeSet, __pyx_k_ChangeSet, sizeof(__pyx_k_ChangeSet), 0, 0, 1, 1},
  {&__pyx_n_s_ChangeSet_Fields, __pyx_k_ChangeSet_Fields, sizeof(__pyx_k_ChangeSet_Fields), 0, 0, 1, 1},
  {&__pyx_n_s_ChangeSet_Items, __pyx_k_ChangeSet_Items, sizeof(__pyx_k_ChangeSet_Items), 0, 0, 1, 1},
  {&__pyx_n_s_ChangeSet_Setters, __pyx_k_ChangeSet_Setters, sizeof(__pyx_k_ChangeSet_Setters), 0, 0, 1, 1},
  {&__pyx_n_s_ChangeSet_Values, __pyx_k_ChangeSet_Values, sizeof(__pyx_k_ChangeSet_Values), 0, 0, 1, 1},
  {&__pyx_n_s_Clear, __pyx_k_Clear, sizeof(__pyx_k_Clear), 0, 0, 1, 1},
  {&__pyx_n_s_ClearField, __pyx_k_ClearField, sizeof(__pyx_k_ClearField), 0, 0, 1, 1},
  {&__pyx_n_s_CopyFrom, __pyx_k_CopyFrom, sizeof(__pyx_k_CopyFrom), 0, 0, 1, 1},
  {&__pyx_n_s_DecodeError, __pyx_k_DecodeError, sizeof(__pyx_k_DecodeError), 0, 0, 1, 1},
  {&__pyx_n_s_DenseInfo, __pyx_k_DenseInfo, sizeof(__pyx_k_DenseInfo), 0, 0, 1, 1},
  {&__pyx_n_s_DenseInfo_Fields, __pyx_k_DenseInfo_Fields, sizeof(__pyx_k_DenseInfo_Fields), 0, 0, 1, 1},
  {&__pyx_n_s_DenseInfo_Items, __pyx_k_DenseInfo_Items, sizeof(__pyx_k_DenseInfo_Items), 0, 0, 1, 1},
  {&__pyx_n_s_DenseInfo_Setters, __pyx_k_DenseInfo_Setters, sizeof(__pyx_k_DenseInfo_Setters), 0, 0, 1, 1},
  {&__pyx_n_s_DenseInfo_Values, __pyx_k_DenseInfo_Values, sizeof(__pyx_k_DenseInfo_Values), 0, 0, 1, 1},
  {&__pyx_n_s_DenseNodes, __pyx_k_DenseNodes, sizeof(__pyx_k_DenseNodes), 0, 0, 1, 1},
  {&__pyx_n_s_DenseNodes_Fields, __pyx_k_DenseNodes_Fields, sizeof(__pyx_k_DenseNodes_Fields), 0, 0, 1, 1},
  {&__pyx_n_s_DenseNodes_Items, __pyx_k_DenseNodes_Items, sizeof(__pyx_k_DenseNodes_Items), 0, 0, 1, 1},
  {&__pyx_n_s_DenseNodes_Setters, __pyx_k_DenseNodes_Setters, sizeof(__pyx_k_DenseNodes_Setters), 0, 0, 1, 1},
  {&__pyx_n_s_DenseNodes_Values, __pyx_k_DenseNodes_Values, sizeof(__pyx_k_DenseNodes_Values), 0, 0, 1, 1},
  {&__pyx_n_s_DeprecationWarning, __pyx_k_DeprecationWarning, sizeof(__pyx_k_DeprecationWarning), 0, 0, 1, 1},
  {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
  {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
  {&__pyx_n_s_Fields, __pyx_k_Fields, sizeof(__pyx_k_Fields), 0, 0, 1, 1},
  {&__pyx_n_s_FromString, __pyx_k_FromString, sizeof(__pyx_k_FromString), 0, 0, 1, 1},
  {&__pyx_n_s_HasField, __pyx_k_HasField, sizeof(__pyx_k_HasField), 0, 0, 1, 1},
  {&__pyx_n_s_HeaderBBox, __pyx_k_HeaderBBox, sizeof(__pyx_k_HeaderBBox), 0, 0, 1, 1},
  {&__pyx_n_s_HeaderBBox_Fields, __pyx_k_HeaderBBox_Fields, sizeof(__pyx_k_HeaderBBox_Fields), 0, 0, 1, 1},
  {&__pyx_n_s_HeaderBBox_Items, __pyx_k_HeaderBBox_Items, sizeof(__pyx_k_HeaderBBox_Items), 0, 0, 1, 1},
  {&__pyx_n_s_HeaderBBox_Setters, __pyx_k_HeaderBBox_Setters, sizeof(__pyx_k_HeaderBBox_Setters), 0, 0, 1, 1},
  {&__pyx_n_s_HeaderBBox_Values, __pyx_k_HeaderBBox_Values, sizeof(__pyx_k_HeaderBBox_Values), 0, 0, 1, 1},
  {&__pyx_n_s_HeaderBlock, __pyx_k_HeaderBlock, sizeof(__pyx_k_HeaderBlock), 0, 0, 1, 1},
  {&__pyx_n_s_HeaderBlock_Fields, __pyx_k_HeaderBlock_Fields, sizeof(__pyx_k_HeaderBlock_Fields), 0, 0, 1, 1},
  {&__pyx_n_s_HeaderBlock_Items, __pyx_k_HeaderBlock_Items, sizeof(__pyx_k_HeaderBlock_Items), 0, 0, 1, 1},
  {&__pyx_n_s_HeaderBlock_Setters, __pyx_k_HeaderBlock_Setters, sizeof(__pyx_k_HeaderBlock_Setters), 0, 0, 1, 1},
  {&__pyx_n_s_HeaderBlock_Values, __pyx_k_HeaderBlock_Values, sizeof(__pyx_k_HeaderBlock_Values), 0, 0, 1, 1},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_k_Incompatible_checksums_s_vs_0xb0, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xb0), 0, 0, 1, 0},
  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
  {&__pyx_n_s_Info, __pyx_k_Info, sizeof(__pyx_k_Info), 0, 0, 1, 1},
  {&__pyx_n_s_Info_Fields, __pyx_k_Info_Fields, sizeof(__pyx_k_Info_Fields), 0, 0, 1, 1},
  {&__pyx_n_s_Info_Items, __pyx_k_Info_Items, sizeof(__pyx_k_Info_Items), 0, 0, 1, 1},
  {&__pyx_n_s_Info_Setters, __pyx_k_Info_Setters, sizeof(__pyx_k_Info_Setters), 0, 0, 1, 1},
  {&__pyx_n_s_Info_Values, __pyx_k_Info_Values, sizeof(__pyx_k_Info_Values), 0, 0, 1, 1},
  {&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0},
  {&__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_k_Invalid_shape_in_axis_d_d, sizeof(__pyx_k_Invalid_shape_in_axis_d_d), 0, 0, 1, 0},
  {&__pyx_n_s_IsInitialized, __pyx_k_IsInitialized, sizeof(__pyx_k_IsInitialized), 0, 0, 1, 1},
  {&__pyx_n_s_Items, __pyx_k_Items, sizeof(__pyx_k_Items), 0, 0, 1, 1},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
  {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
  {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
  {&__pyx_n_s_MergeFrom, __pyx_k_MergeFrom, sizeof(__pyx_k_MergeFrom), 0, 0, 1, 1},
  {&__pyx_n_s_MergeFromString, __pyx_k_MergeFromString, sizeof(__pyx_k_MergeFromString), 0, 0, 1, 1},
  {&__pyx_kp_s_Message_DenseNodes_is_missing_re, __pyx_k_Message_DenseNodes_is_missing_re, sizeof(__pyx_k_Message_DenseNodes_is_missing_re), 0, 0, 1, 0},
  {&__pyx_kp_s_Message_HeaderBlock_is_missing_r, __pyx_k_Message_HeaderBlock_is_missing_r, sizeof(__pyx_k_Message_HeaderBlock_is_missing_r), 0, 0, 1, 0},
  {&__pyx_kp_s_Message_Node_is_missing_required, __pyx_k_Message_Node_is_missing_required, sizeof(__pyx_k_Message_Node_is_missing_required), 0, 0, 1, 0},
  {&__pyx_kp_s_Message_PrimitiveBlock_is_missin, __pyx_k_Message_PrimitiveBlock_is_missin, sizeof(__pyx_k_Message_PrimitiveBlock_is_missin), 0, 0, 1, 0},
  {&__pyx_kp_s_Message_PrimitiveGroup_is_missin, __pyx_k_Message_PrimitiveGroup_is_missin, sizeof(__pyx_k_Message_PrimitiveGroup_is_missin), 0, 0, 1, 0},
  {&__pyx_kp_s_Message_PrimitiveGroup_is_missin_2, __pyx_k_Message_PrimitiveGroup_is_missin_2, sizeof(__pyx_k_Message_PrimitiveGroup_is_missin_2), 0, 0, 1, 0},
  {&__pyx_kp_s_Message_PrimitiveGroup_is_missin_3, __pyx_k_Message_PrimitiveGroup_is_missin_3, sizeof(__pyx_k_Message_PrimitiveGroup_is_missin_3), 0, 0, 1, 0},
  {&__pyx_kp_s_Message_PrimitiveGroup_is_missin_4, __pyx_k_Message_PrimitiveGroup_is_missin_4, sizeof(__pyx_k_Message_PrimitiveGroup_is_missin_4), 0, 0, 1, 0},
  {&__pyx_kp_s_Message_PrimitiveGroup_is_missin_5, __pyx_k_Message_PrimitiveGroup_is_missin_5, sizeof(__pyx_k_Message_PrimitiveGroup_is_missin_5), 0, 0, 1, 0},
  {&__pyx_kp_s_Message_Relation_is_missing_requ, __pyx_k_Message_Relation_is_missing_requ, sizeof(__pyx_k_Message_Relation_is_missing_requ), 0, 0, 1, 0},
  {&__pyx_kp_s_Message_Way_is_missing_required, __pyx_k_Message_Way_is_missing_required, sizeof(__pyx_k_Message_Way_is_missing_required), 0, 0, 1, 0},
  {&__pyx_n_s_Modified, __pyx_k_Modified, sizeof(__pyx_k_Modified), 0, 0, 1, 1},
  {&__pyx_n_s_NODE, __pyx_k_NODE, sizeof(__pyx_k_NODE), 0, 0, 1, 1},
  {&__pyx_n_s_NameError, __pyx_k_NameError, sizeof(__pyx_k_NameError), 0, 0, 1, 1},
  {&__pyx_n_s_Node, __pyx_k_Node, sizeof(__pyx_k_Node), 0, 0, 1, 1},
  {&__pyx_n_s_Node_Fields, __pyx_k_Node_Fields, sizeof(__pyx_k_Node_Fields), 0, 0, 1, 1},
  {&__pyx_n_s_Node_Items, __pyx_k_Node_Items, sizeof(__pyx_k_Node_Items), 0, 0, 1, 1},
  {&__pyx_n_s_Node_Setters, __pyx_k_Node_Setters, sizeof(__pyx_k_Node_Setters), 0, 0, 1, 1},
  {&__pyx_n_s_Node_Values, __pyx_k_Node_Values, sizeof(__pyx_k_Node_Values), 0, 0, 1, 1},
  {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
  {&__pyx_n_s_OBSOLETE_bzip2_data, __pyx_k_OBSOLETE_bzip2_data, sizeof(__pyx_k_OBSOLETE_bzip2_data), 0, 0, 1, 1},
  {&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0},
  {&__pyx_n_s_ParseFromDict, __pyx_k_ParseFromDict, sizeof(__pyx_k_ParseFromDict), 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_PrimitiveBlock, __pyx_k_PrimitiveBlock, sizeof(__pyx_k_PrimitiveBlock), 0, 0, 1, 1},
  {&__pyx_n_s_PrimitiveBlock_Fields, __pyx_k_PrimitiveBlock_Fields, sizeof(__pyx_k_PrimitiveBlock_Fields), 0, 0, 1, 1},
  {&__pyx_n_s_PrimitiveBlock_Items, __pyx_k_PrimitiveBlock_Items, sizeof(__pyx_k_PrimitiveBlock_Items), 0, 0, 1, 1},
  {&__pyx_n_s_PrimitiveBlock_Setters, __pyx_k_PrimitiveBlock_Setters, sizeof(__pyx_k_PrimitiveBlock_Setters), 0, 0, 1, 1},
  {&__pyx_n_s_PrimitiveBlock_Values, __pyx_k_PrimitiveBlock_Values, sizeof(__pyx_k_PrimitiveBlock_Values), 0, 0, 1, 1},
  {&__pyx_n_s_PrimitiveGroup, __pyx_k_PrimitiveGroup, sizeof(__pyx_k_PrimitiveGroup), 0, 0, 1, 1},
  {&__pyx_n_s_PrimitiveGroup_Fields, __pyx_k_PrimitiveGroup_Fields, sizeof(__pyx_k_PrimitiveGroup_Fields), 0, 0, 1, 1},
  {&__pyx_n_s_PrimitiveGroup_Items, __pyx_k_PrimitiveGroup_Items, sizeof(__pyx_k_PrimitiveGroup_Items), 0, 0, 1, 1},
  {&__pyx_n_s_PrimitiveGroup_Setters, __pyx_k_PrimitiveGroup_Setters, sizeof(__pyx_k_PrimitiveGroup_Setters), 0, 0, 1, 1},
  {&__pyx_n_s_PrimitiveGroup_Values, __pyx_k_PrimitiveGroup_Values, sizeof(__pyx_k_PrimitiveGroup_Values), 0, 0, 1, 1},
  {&__pyx_kp_s_Protocol_message_has_no_s_field, __pyx_k_Protocol_message_has_no_s_field, sizeof(__pyx_k_Protocol_message_has_no_s_field), 0, 0, 1, 0},
  {&__pyx_kp_s_Protocol_message_has_no_singular, __pyx_k_Protocol_message_has_no_singular, sizeof(__pyx_k_Protocol_message_has_no_singular), 0, 0, 1, 0},
  {&__pyx_n_s_RELATION, __pyx_k_RELATION, sizeof(__pyx_k_RELATION), 0, 0, 1, 1},
  {&__pyx_n_s_Relation, __pyx_k_Relation, sizeof(__pyx_k_Relation), 0, 0, 1, 1},
  {&__pyx_n_s_Relation_Fields, __pyx_k_Relation_Fields, sizeof(__pyx_k_Relation_Fields), 0, 0, 1, 1},
  {&__pyx_n_s_Relation_Items, __pyx_k_Relation_Items, sizeof(__pyx_k_Relation_Items), 0, 0, 1, 1},
  {&__pyx_n_s_Relation_Setters, __pyx_k_Relation_Setters, sizeof(__pyx_k_Relation_Setters), 0, 0, 1, 1},
  {&__pyx_n_s_Relation_Values, __pyx_k_Relation_Values, sizeof(__pyx_k_Relation_Values), 0, 0, 1, 1},
  {&__pyx_n_s_SerializePartialToDict, __pyx_k_SerializePartialToDict, sizeof(__pyx_k_SerializePartialToDict), 0, 0, 1, 1},
  {&__pyx_n_s_SerializePartialToString, __pyx_k_SerializePartialToString, sizeof(__pyx_k_SerializePartialToString), 0, 0, 1, 1},
  {&__pyx_n_s_SerializeToDict, __pyx_k_SerializeToDict, sizeof(__pyx_k_SerializeToDict), 0, 0, 1, 1},
  {&__pyx_n_s_SerializeToString, __pyx_k_SerializeToString, sizeof(__pyx_k_SerializeToString), 0, 0, 1, 1},
  {&__pyx_n_s_Setters, __pyx_k_Setters, sizeof(__pyx_k_Setters), 0, 0, 1, 1},
  {&__pyx_n_s_Setters_locals_setter, __pyx_k_Setters_locals_setter, sizeof(__pyx_k_Setters_locals_setter), 0, 0, 1, 1},
  {&__pyx_n_s_StringTable, __pyx_k_StringTable, sizeof(__pyx_k_StringTable), 0, 0, 1, 1},
  {&__pyx_n_s_StringTable_Fields, __pyx_k_StringTable_Fields, sizeof(__pyx_k_StringTable_Fields), 0, 0, 1, 1},
  {&__pyx_n_s_StringTable_Items, __pyx_k_StringTable_Items, sizeof(__pyx_k_StringTable_Items), 0, 0, 1, 1},
  {&__pyx_n_s_StringTable_Setters, __pyx_k_StringTable_Setters, sizeof(__pyx_k_StringTable_Setters), 0, 0, 1, 1},
  {&__pyx_n_s_StringTable_Values, __pyx_k_StringTable_Values, sizeof(__pyx_k_StringTable_Values), 0, 0, 1, 1},
  {&__pyx_kp_s_Truncated_message, __pyx_k_Truncated_message, sizeof(__pyx_k_Truncated_message), 0, 0, 1, 0},
  {&__pyx_kp_s_Truncated_message_got_s_expected, __pyx_k_Truncated_message_got_s_expected, sizeof(__pyx_k_Truncated_message_got_s_expected), 0, 0, 1, 0},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_Values, __pyx_k_Values, sizeof(__pyx_k_Values), 0, 0, 1, 1},
  {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
  {&__pyx_n_s_WAY, __pyx_k_WAY, sizeof(__pyx_k_WAY), 0, 0, 1, 1},
  {&__pyx_n_s_Way, __pyx_k_Way, sizeof(__pyx_k_Way), 0, 0, 1, 1},
  {&__pyx_n_s_Way_Fields, __pyx_k_Way_Fields, sizeof(__pyx_k_Way_Fields), 0, 0, 1, 1},
  {&__pyx_n_s_Way_Items, __pyx_k_Way_Items, sizeof(__pyx_k_Way_Items), 0, 0, 1, 1},
  {&__pyx_n_s_Way_Setters, __pyx_k_Way_Setters, sizeof(__pyx_k_Way_Setters), 0, 0, 1, 1},
  {&__pyx_n_s_Way_Values, __pyx_k_Way_Values, sizeof(__pyx_k_Way_Values), 0, 0, 1, 1},
  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
  {&__pyx_kp_b__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 0, 0},
  {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
  {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_b64decode, __pyx_k_b64decode, sizeof(__pyx_k_b64decode), 0, 0, 1, 1},
  {&__pyx_n_s_b64encode, __pyx_k_b64encode, sizeof(__pyx_k_b64encode), 0, 0, 1, 1},
  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
  {&__pyx_n_s_base64, __pyx_k_base64, sizeof(__pyx_k_base64), 0, 0, 1, 1},
  {&__pyx_n_s_bbox, __pyx_k_bbox, sizeof(__pyx_k_bbox), 0, 0, 1, 1},
  {&__pyx_n_s_bottom, __pyx_k_bottom, sizeof(__pyx_k_bottom), 0, 0, 1, 1},
  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
  {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
  {&__pyx_n_s_cache, __pyx_k_cache, sizeof(__pyx_k_cache), 0, 0, 1, 1},
  {&__pyx_n_s_changeset, __pyx_k_changeset, sizeof(__pyx_k_changeset), 0, 0, 1, 1},
  {&__pyx_n_s_changesets, __pyx_k_changesets, sizeof(__pyx_k_changesets), 0, 0, 1, 1},
  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
  {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
  {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_datasize, __pyx_k_datasize, sizeof(__pyx_k_datasize), 0, 0, 1, 1},
  {&__pyx_n_s_date_granularity, __pyx_k_date_granularity, sizeof(__pyx_k_date_granularity), 0, 0, 1, 1},
  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {&__pyx_n_s_dense, __pyx_k_dense, sizeof(__pyx_k_dense), 0, 0, 1, 1},
  {&__pyx_n_s_denseinfo, __pyx_k_denseinfo, sizeof(__pyx_k_denseinfo), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
  {&__pyx_n_s_dumps, __pyx_k_dumps, sizeof(__pyx_k_dumps), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
  {&__pyx_n_s_extend, __pyx_k_extend, sizeof(__pyx_k_extend), 0, 0, 1, 1},
  {&__pyx_kp_s_field_OBSOLETE_bzip2_data_is_dep, __pyx_k_field_OBSOLETE_bzip2_data_is_dep, sizeof(__pyx_k_field_OBSOLETE_bzip2_data_is_dep), 0, 0, 1, 0},
  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
  {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0},
  {&__pyx_n_s_granularity, __pyx_k_granularity, sizeof(__pyx_k_granularity), 0, 0, 1, 1},
  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_indexdata, __pyx_k_indexdata, sizeof(__pyx_k_indexdata), 0, 0, 1, 1},
  {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
  {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_json, __pyx_k_json, sizeof(__pyx_k_json), 0, 0, 1, 1},
  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
  {&__pyx_n_s_keys_vals, __pyx_k_keys_vals, sizeof(__pyx_k_keys_vals), 0, 0, 1, 1},
  {&__pyx_n_s_lat, __pyx_k_lat, sizeof(__pyx_k_lat), 0, 0, 1, 1},
  {&__pyx_n_s_lat_offset, __pyx_k_lat_offset, sizeof(__pyx_k_lat_offset), 0, 0, 1, 1},
  {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1},
  {&__pyx_n_s_listener, __pyx_k_listener, sizeof(__pyx_k_listener), 0, 0, 1, 1},
  {&__pyx_n_s_loads, __pyx_k_loads, sizeof(__pyx_k_loads), 0, 0, 1, 1},
  {&__pyx_n_s_lon, __pyx_k_lon, sizeof(__pyx_k_lon), 0, 0, 1, 1},
  {&__pyx_n_s_lon_offset, __pyx_k_lon_offset, sizeof(__pyx_k_lon_offset), 0, 0, 1, 1},
  {&__pyx_n_s_lzma_data, __pyx_k_lzma_data, sizeof(__pyx_k_lzma_data), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_memids, __pyx_k_memids, sizeof(__pyx_k_memids), 0, 0, 1, 1},
  {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {&__pyx_n_s_nodes, __pyx_k_nodes, sizeof(__pyx_k_nodes), 0, 0, 1, 1},
  {&__pyx_kp_s_not_a_valid_value_for_enum_Rela, __pyx_k_not_a_valid_value_for_enum_Rela, sizeof(__pyx_k_not_a_valid_value_for_enum_Rela), 0, 0, 1, 0},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_s_optional_features, __pyx_k_optional_features, sizeof(__pyx_k_optional_features), 0, 0, 1, 1},
  {&__pyx_n_s_osmosis_replication_base_url, __pyx_k_osmosis_replication_base_url, sizeof(__pyx_k_osmosis_replication_base_url), 0, 0, 1, 1},
  {&__pyx_n_s_osmosis_replication_sequence_num, __pyx_k_osmosis_replication_sequence_num, sizeof(__pyx_k_osmosis_replication_sequence_num), 0, 0, 1, 1},
  {&__pyx_n_s_osmosis_replication_timestamp, __pyx_k_osmosis_replication_timestamp, sizeof(__pyx_k_osmosis_replication_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 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_primitivegroup, __pyx_k_primitivegroup, sizeof(__pyx_k_primitivegroup), 0, 0, 1, 1},
  {&__pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_k_pyrobuf__proto_pyrosm_proto_pyx, sizeof(__pyx_k_pyrobuf__proto_pyrosm_proto_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_pyrosm_proto, __pyx_k_pyrosm_proto, sizeof(__pyx_k_pyrosm_proto), 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_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 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_kp_s_r_has_type_s_but_expected_one_o, __pyx_k_r_has_type_s_but_expected_one_o, sizeof(__pyx_k_r_has_type_s_but_expected_one_o), 0, 0, 1, 0},
  {&__pyx_kp_s_r_has_type_s_but_expected_one_o_2, __pyx_k_r_has_type_s_but_expected_one_o_2, sizeof(__pyx_k_r_has_type_s_but_expected_one_o_2), 0, 0, 1, 0},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_raw, __pyx_k_raw, sizeof(__pyx_k_raw), 0, 0, 1, 1},
  {&__pyx_n_s_raw_size, __pyx_k_raw_size, sizeof(__pyx_k_raw_size), 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_refs, __pyx_k_refs, sizeof(__pyx_k_refs), 0, 0, 1, 1},
  {&__pyx_n_s_relations, __pyx_k_relations, sizeof(__pyx_k_relations), 0, 0, 1, 1},
  {&__pyx_n_s_required_features, __pyx_k_required_features, sizeof(__pyx_k_required_features), 0, 0, 1, 1},
  {&__pyx_kp_s_required_field_bottom_not_initia, __pyx_k_required_field_bottom_not_initia, sizeof(__pyx_k_required_field_bottom_not_initia), 0, 0, 1, 0},
  {&__pyx_kp_s_required_field_datasize_not_init, __pyx_k_required_field_datasize_not_init, sizeof(__pyx_k_required_field_datasize_not_init), 0, 0, 1, 0},
  {&__pyx_kp_s_required_field_id_not_initialize, __pyx_k_required_field_id_not_initialize, sizeof(__pyx_k_required_field_id_not_initialize), 0, 0, 1, 0},
  {&__pyx_kp_s_required_field_lat_not_initializ, __pyx_k_required_field_lat_not_initializ, sizeof(__pyx_k_required_field_lat_not_initializ), 0, 0, 1, 0},
  {&__pyx_kp_s_required_field_left_not_initiali, __pyx_k_required_field_left_not_initiali, sizeof(__pyx_k_required_field_left_not_initiali), 0, 0, 1, 0},
  {&__pyx_kp_s_required_field_lon_not_initializ, __pyx_k_required_field_lon_not_initializ, sizeof(__pyx_k_required_field_lon_not_initializ), 0, 0, 1, 0},
  {&__pyx_kp_s_required_field_right_not_initial, __pyx_k_required_field_right_not_initial, sizeof(__pyx_k_required_field_right_not_initial), 0, 0, 1, 0},
  {&__pyx_kp_s_required_field_stringtable_not_i, __pyx_k_required_field_stringtable_not_i, sizeof(__pyx_k_required_field_stringtable_not_i), 0, 0, 1, 0},
  {&__pyx_kp_s_required_field_top_not_initializ, __pyx_k_required_field_top_not_initializ, sizeof(__pyx_k_required_field_top_not_initializ), 0, 0, 1, 0},
  {&__pyx_kp_s_required_field_type_not_initiali, __pyx_k_required_field_type_not_initiali, sizeof(__pyx_k_required_field_type_not_initiali), 0, 0, 1, 0},
  {&__pyx_n_s_reset, __pyx_k_reset, sizeof(__pyx_k_reset), 0, 0, 1, 1},
  {&__pyx_n_s_right, __pyx_k_right, sizeof(__pyx_k_right), 0, 0, 1, 1},
  {&__pyx_n_s_roles_sid, __pyx_k_roles_sid, sizeof(__pyx_k_roles_sid), 0, 0, 1, 1},
  {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_setter, __pyx_k_setter, sizeof(__pyx_k_setter), 0, 0, 1, 1},
  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
  {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
  {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
  {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_stringtable, __pyx_k_stringtable, sizeof(__pyx_k_stringtable), 0, 0, 1, 1},
  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_timestamp, __pyx_k_timestamp, sizeof(__pyx_k_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_top, __pyx_k_top, sizeof(__pyx_k_top), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
  {&__pyx_n_s_uid, __pyx_k_uid, sizeof(__pyx_k_uid), 0, 0, 1, 1},
  {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
  {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
  {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_user_sid, __pyx_k_user_sid, sizeof(__pyx_k_user_sid), 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_vals, __pyx_k_vals, sizeof(__pyx_k_vals), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  {&__pyx_n_s_visible, __pyx_k_visible, sizeof(__pyx_k_visible), 0, 0, 1, 1},
  {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
  {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
  {&__pyx_n_s_ways, __pyx_k_ways, sizeof(__pyx_k_ways), 0, 0, 1, 1},
  {&__pyx_n_s_writingprogram, __pyx_k_writingprogram, sizeof(__pyx_k_writingprogram), 0, 0, 1, 1},
  {&__pyx_n_s_zlib_data, __pyx_k_zlib_data, sizeof(__pyx_k_zlib_data), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 28, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 29, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 71, __pyx_L1_error)
  __pyx_builtin_DeprecationWarning = __Pyx_GetBuiltinName(__pyx_n_s_DeprecationWarning); if (!__pyx_builtin_DeprecationWarning) __PYX_ERR(0, 112, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 454, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 2666, __pyx_L1_error)
  __pyx_builtin_NameError = __Pyx_GetBuiltinName(__pyx_n_s_NameError); if (!__pyx_builtin_NameError) __PYX_ERR(0, 4944, __pyx_L1_error)
  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(2, 148, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(2, 151, __pyx_L1_error)
  __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(2, 404, __pyx_L1_error)
  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(2, 613, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(2, 832, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "pyrosm_proto.pyx":112
 *     @property
 *     def OBSOLETE_bzip2_data(self):
 *         warnings.warn("field 'OBSOLETE_bzip2_data' is deprecated", DeprecationWarning)             # <<<<<<<<<<<<<<
 *         return self._OBSOLETE_bzip2_data
 * 
 */
  __pyx_tuple__4 = PyTuple_Pack(2, __pyx_kp_s_field_OBSOLETE_bzip2_data_is_dep, __pyx_builtin_DeprecationWarning); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "pyrosm_proto.pyx":117
 *     @OBSOLETE_bzip2_data.setter
 *     def OBSOLETE_bzip2_data(self, value):
 *         warnings.warn("field 'OBSOLETE_bzip2_data' is deprecated", DeprecationWarning)             # <<<<<<<<<<<<<<
 *         self.__field_bitmap0 |= 16
 *         if isinstance(value, bytes):
 */
  __pyx_tuple__5 = PyTuple_Pack(2, __pyx_kp_s_field_OBSOLETE_bzip2_data_is_dep, __pyx_builtin_DeprecationWarning); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "pyrosm_proto.pyx":567
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.raw = value
 *         yield setter
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);
  __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 567, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 567, __pyx_L1_error)

  /* "pyrosm_proto.pyx":570
 *             self.raw = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.raw_size = value
 *         yield setter
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);
  __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 570, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 570, __pyx_L1_error)

  /* "pyrosm_proto.pyx":573
 *             self.raw_size = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.zlib_data = value
 *         yield setter
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);
  __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 573, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 573, __pyx_L1_error)

  /* "pyrosm_proto.pyx":576
 *             self.zlib_data = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lzma_data = value
 *         yield setter
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);
  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 576, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 576, __pyx_L1_error)

  /* "pyrosm_proto.pyx":579
 *             self.lzma_data = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.OBSOLETE_bzip2_data = value
 *         yield setter
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);
  __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 579, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 579, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "pyrosm_proto.pyx":883
 * 
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'type' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'datasize' not initialized and does not have default")
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_required_field_type_not_initiali); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "pyrosm_proto.pyx":885
 *             raise Exception("required field 'type' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'datasize' not initialized and does not have default")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_required_field_datasize_not_init); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "pyrosm_proto.pyx":1066
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.type = value
 *         yield setter
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);
  __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 1066, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 1066, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1069
 *             self.type = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.indexdata = value
 *         yield setter
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);
  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 1069, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 1069, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1072
 *             self.indexdata = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.datasize = value
 *         yield setter
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);
  __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 1072, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 1072, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "pyrosm_proto.pyx":1603
 * 
 *         if self._bbox is not None and self._bbox._is_present_in_parent and not self._bbox.IsInitialized():
 *             raise Exception("Message HeaderBlock is missing required field: bbox")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_Message_HeaderBlock_is_missing_r); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 1603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "pyrosm_proto.pyx":1833
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.bbox = value
 *         yield setter
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 1833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);
  __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 1833, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 1833, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1836
 *             self.bbox = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.required_features = value
 *         yield setter
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);
  __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 1836, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 1836, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1839
 *             self.required_features = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.optional_features = value
 *         yield setter
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);
  __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 1839, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 1839, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1842
 *             self.optional_features = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.writingprogram = value
 *         yield setter
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);
  __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 1842, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 1842, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1845
 *             self.writingprogram = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.source = value
 *         yield setter
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);
  __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 1845, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 1845, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1848
 *             self.source = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_timestamp = value
 *         yield setter
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 1848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);
  __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 1848, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 1848, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1851
 *             self.osmosis_replication_timestamp = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_sequence_number = value
 *         yield setter
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 1851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);
  __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 1851, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 1851, __pyx_L1_error)

  /* "pyrosm_proto.pyx":1854
 *             self.osmosis_replication_sequence_number = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.osmosis_replication_base_url = value
 *         yield setter
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);
  __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 1854, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 1854, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "pyrosm_proto.pyx":2173
 * 
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'left' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 2 != 2:
 *             raise Exception("required field 'right' not initialized and does not have default")
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_required_field_left_not_initiali); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 2173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "pyrosm_proto.pyx":2175
 *             raise Exception("required field 'left' not initialized and does not have default")
 *         if self.__field_bitmap0 & 2 != 2:
 *             raise Exception("required field 'right' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'top' not initialized and does not have default")
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_required_field_right_not_initial); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 2175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "pyrosm_proto.pyx":2177
 *             raise Exception("required field 'right' not initialized and does not have default")
 *         if self.__field_bitmap0 & 4 != 4:
 *             raise Exception("required field 'top' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 8 != 8:
 *             raise Exception("required field 'bottom' not initialized and does not have default")
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_required_field_top_not_initializ); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 2177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "pyrosm_proto.pyx":2179
 *             raise Exception("required field 'top' not initialized and does not have default")
 *         if self.__field_bitmap0 & 8 != 8:
 *             raise Exception("required field 'bottom' not initialized and does not have default")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_required_field_bottom_not_initia); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 2179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "pyrosm_proto.pyx":2379
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.left = value
 *         yield setter
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 2379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);
  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 2379, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 2379, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2382
 *             self.left = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.right = value
 *         yield setter
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 2382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);
  __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 2382, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 2382, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2385
 *             self.right = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.top = value
 *         yield setter
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 2385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);
  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 2385, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 2385, __pyx_L1_error)

  /* "pyrosm_proto.pyx":2388
 *             self.top = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.bottom = value
 *         yield setter
 */
  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 2388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);
  __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 2388, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 2388, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "pyrosm_proto.pyx":2841
 * 
 *         if self._stringtable is None or not self._stringtable.IsInitialized():
 *             raise Exception("required field 'stringtable' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         for i in range(len(self._primitivegroup)):
 *             primitivegroup_msg = <PrimitiveGroup>self._primitivegroup[i]
 */
  __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_required_field_stringtable_not_i); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 2841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "pyrosm_proto.pyx":3056
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.stringtable = value
 *         yield setter
 */
  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 3056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);
  __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 3056, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 3056, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3059
 *             self.stringtable = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.primitivegroup = value
 *         yield setter
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 3059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);
  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 3059, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 3059, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3062
 *             self.primitivegroup = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.granularity = value
 *         yield setter
 */
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 3062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 3062, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 3062, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3065
 *             self.granularity = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.date_granularity = value
 *         yield setter
 */
  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 3065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 3065, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 3065, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3068
 *             self.date_granularity = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lat_offset = value
 *         yield setter
 */
  __pyx_tuple__70 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 3068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);
  __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 3068, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 3068, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3071
 *             self.lat_offset = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lon_offset = value
 *         yield setter
 */
  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 3071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 3071, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 3071, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "pyrosm_proto.pyx":3622
 * 
 *         if self._dense is not None and self._dense._is_present_in_parent and not self._dense.IsInitialized():
 *             raise Exception("Message PrimitiveGroup is missing required field: dense")             # <<<<<<<<<<<<<<
 *         for i in range(len(self._nodes)):
 *             nodes_msg = <Node>self._nodes[i]
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_s_Message_PrimitiveGroup_is_missin); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 3622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "pyrosm_proto.pyx":3847
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.nodes = value
 *         yield setter
 */
  __pyx_tuple__77 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 3847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 3847, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 3847, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3850
 *             self.nodes = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.dense = value
 *         yield setter
 */
  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 3850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 3850, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 3850, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3853
 *             self.dense = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.ways = value
 *         yield setter
 */
  __pyx_tuple__81 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 3853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 3853, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 3853, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3856
 *             self.ways = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.relations = value
 *         yield setter
 */
  __pyx_tuple__83 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 3856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 3856, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 3856, __pyx_L1_error)

  /* "pyrosm_proto.pyx":3859
 *             self.relations = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.changesets = value
 *         yield setter
 */
  __pyx_tuple__85 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 3859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 3859, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 3859, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);

  /* "pyrosm_proto.pyx":4256
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.s = value
 *         yield setter
 */
  __pyx_tuple__89 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 4256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 4256, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 4256, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "pyrosm_proto.pyx":4827
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.version = value
 *         yield setter
 */
  __pyx_tuple__93 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 4827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);
  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 4827, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 4827, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4830
 *             self.version = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.timestamp = value
 *         yield setter
 */
  __pyx_tuple__95 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 4830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 4830, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 4830, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4833
 *             self.timestamp = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.changeset = value
 *         yield setter
 */
  __pyx_tuple__97 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 4833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);
  __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 4833, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 4833, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4836
 *             self.changeset = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.uid = value
 *         yield setter
 */
  __pyx_tuple__99 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 4836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);
  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 4836, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 4836, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4839
 *             self.uid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.user_sid = value
 *         yield setter
 */
  __pyx_tuple__101 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 4839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);
  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 4839, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 4839, __pyx_L1_error)

  /* "pyrosm_proto.pyx":4842
 *             self.user_sid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.visible = value
 *         yield setter
 */
  __pyx_tuple__103 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 4842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);
  __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 4842, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 4842, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__106 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);

  /* "pyrosm_proto.pyx":5605
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.version = value
 *         yield setter
 */
  __pyx_tuple__107 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 5605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);
  __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 5605, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 5605, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5608
 *             self.version = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.timestamp = value
 *         yield setter
 */
  __pyx_tuple__109 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 5608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);
  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 5608, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 5608, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5611
 *             self.timestamp = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.changeset = value
 *         yield setter
 */
  __pyx_tuple__111 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 5611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);
  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 5611, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 5611, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5614
 *             self.changeset = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.uid = value
 *         yield setter
 */
  __pyx_tuple__113 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 5614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);
  __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 5614, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 5614, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5617
 *             self.uid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.user_sid = value
 *         yield setter
 */
  __pyx_tuple__115 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 5617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);
  __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 5617, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 5617, __pyx_L1_error)

  /* "pyrosm_proto.pyx":5620
 *             self.user_sid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.visible = value
 *         yield setter
 */
  __pyx_tuple__117 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 5620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);
  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 5620, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 5620, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__119 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__120 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);

  /* "pyrosm_proto.pyx":5849
 * 
 *         if self.__field_bitmap0 & 1 != 1:
 *             raise Exception("required field 'id' not initialized and does not have default")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
  __pyx_tuple__121 = PyTuple_Pack(1, __pyx_kp_s_required_field_id_not_initialize); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 5849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);

  /* "pyrosm_proto.pyx":6004
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */
  __pyx_tuple__122 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 6004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 6004, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 6004, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__124 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__125 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);

  /* "pyrosm_proto.pyx":6483
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self.__field_bitmap0 & 128 != 128:
 *             raise Exception("required field 'lat' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self.__field_bitmap0 & 256 != 256:
 *             raise Exception("required field 'lon' not initialized and does not have default")
 */
  __pyx_tuple__126 = PyTuple_Pack(1, __pyx_kp_s_required_field_lat_not_initializ); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 6483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);

  /* "pyrosm_proto.pyx":6485
 *             raise Exception("required field 'lat' not initialized and does not have default")
 *         if self.__field_bitmap0 & 256 != 256:
 *             raise Exception("required field 'lon' not initialized and does not have default")             # <<<<<<<<<<<<<<
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             raise Exception("Message Node is missing required field: info")
 */
  __pyx_tuple__127 = PyTuple_Pack(1, __pyx_kp_s_required_field_lon_not_initializ); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 6485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);

  /* "pyrosm_proto.pyx":6487
 *             raise Exception("required field 'lon' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             raise Exception("Message Node is missing required field: info")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
  __pyx_tuple__128 = PyTuple_Pack(1, __pyx_kp_s_Message_Node_is_missing_required); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 6487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);

  /* "pyrosm_proto.pyx":6707
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */
  __pyx_tuple__129 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 6707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);
  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 6707, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 6707, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6710
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys = value
 *         yield setter
 */
  __pyx_tuple__131 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 6710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);
  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 6710, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 6710, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6713
 *             self.keys = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.vals = value
 *         yield setter
 */
  __pyx_tuple__133 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 6713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 6713, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 6713, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6716
 *             self.vals = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.info = value
 *         yield setter
 */
  __pyx_tuple__135 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 6716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);
  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 6716, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 6716, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6719
 *             self.info = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lat = value
 *         yield setter
 */
  __pyx_tuple__137 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 6719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);
  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 6719, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 6719, __pyx_L1_error)

  /* "pyrosm_proto.pyx":6722
 *             self.lat = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lon = value
 *         yield setter
 */
  __pyx_tuple__139 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 6722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);
  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 6722, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 6722, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__141 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__142 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);

  /* "pyrosm_proto.pyx":7227
 * 
 *         if self._denseinfo is not None and self._denseinfo._is_present_in_parent and not self._denseinfo.IsInitialized():
 *             raise Exception("Message DenseNodes is missing required field: denseinfo")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
  __pyx_tuple__143 = PyTuple_Pack(1, __pyx_kp_s_Message_DenseNodes_is_missing_re); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 7227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);

  /* "pyrosm_proto.pyx":7424
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */
  __pyx_tuple__144 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 7424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__144);
  __Pyx_GIVEREF(__pyx_tuple__144);
  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 7424, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 7424, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7427
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.denseinfo = value
 *         yield setter
 */
  __pyx_tuple__146 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 7427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);
  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 7427, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 7427, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7430
 *             self.denseinfo = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lat = value
 *         yield setter
 */
  __pyx_tuple__148 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 7430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 7430, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 7430, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7433
 *             self.lat = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.lon = value
 *         yield setter
 */
  __pyx_tuple__150 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 7433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);
  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 7433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 7433, __pyx_L1_error)

  /* "pyrosm_proto.pyx":7436
 *             self.lon = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys_vals = value
 *         yield setter
 */
  __pyx_tuple__152 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 7436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);
  __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 7436, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 7436, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__154 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__155 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);

  /* "pyrosm_proto.pyx":7914
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             raise Exception("Message Way is missing required field: info")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
  __pyx_tuple__156 = PyTuple_Pack(1, __pyx_kp_s_Message_Way_is_missing_required); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 7914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);

  /* "pyrosm_proto.pyx":8115
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */
  __pyx_tuple__157 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 8115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 8115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 8115, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8118
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys = value
 *         yield setter
 */
  __pyx_tuple__159 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 8118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 8118, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 8118, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8121
 *             self.keys = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.vals = value
 *         yield setter
 */
  __pyx_tuple__161 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 8121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 8121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 8121, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8124
 *             self.vals = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.info = value
 *         yield setter
 */
  __pyx_tuple__163 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 8124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 8124, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 8124, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8127
 *             self.info = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.refs = value
 *         yield setter
 */
  __pyx_tuple__165 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 8127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 8127, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 8127, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__167 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__168 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__168);
  __Pyx_GIVEREF(__pyx_tuple__168);

  /* "pyrosm_proto.pyx":8733
 *             raise Exception("required field 'id' not initialized and does not have default")
 *         if self._info is not None and self._info._is_present_in_parent and not self._info.IsInitialized():
 *             raise Exception("Message Relation is missing required field: info")             # <<<<<<<<<<<<<<
 * 
 *         if self._cached_serialization is not None:
 */
  __pyx_tuple__169 = PyTuple_Pack(1, __pyx_kp_s_Message_Relation_is_missing_requ); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 8733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);

  /* "pyrosm_proto.pyx":8961
 *             iterator
 *         """
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.id = value
 *         yield setter
 */
  __pyx_tuple__170 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(0, 8961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__170);
  __Pyx_GIVEREF(__pyx_tuple__170);
  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 8961, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(0, 8961, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8964
 *             self.id = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.keys = value
 *         yield setter
 */
  __pyx_tuple__172 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 8964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);
  __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 8964, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(0, 8964, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8967
 *             self.keys = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.vals = value
 *         yield setter
 */
  __pyx_tuple__174 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(0, 8967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__174);
  __Pyx_GIVEREF(__pyx_tuple__174);
  __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 8967, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(0, 8967, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8970
 *             self.vals = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.info = value
 *         yield setter
 */
  __pyx_tuple__176 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 8970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);
  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 8970, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 8970, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8973
 *             self.info = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.roles_sid = value
 *         yield setter
 */
  __pyx_tuple__178 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 8973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 8973, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(0, 8973, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8976
 *             self.roles_sid = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.memids = value
 *         yield setter
 */
  __pyx_tuple__180 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 8976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);
  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 8976, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(0, 8976, __pyx_L1_error)

  /* "pyrosm_proto.pyx":8979
 *             self.memids = value
 *         yield setter
 *         def setter(value):             # <<<<<<<<<<<<<<
 *             self.types = value
 *         yield setter
 */
  __pyx_tuple__182 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 8979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);
  __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyrobuf__proto_pyrosm_proto_pyx, __pyx_n_s_setter, 8979, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(0, 8979, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__184 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__185 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__185);
  __Pyx_GIVEREF(__pyx_tuple__185);

  /* "View.MemoryView":133
 * 
 *         if not self.ndim:
 *             raise ValueError("Empty shape tuple for cython.array")             # <<<<<<<<<<<<<<
 * 
 *         if itemsize <= 0:
 */
  __pyx_tuple__186 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(2, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);

  /* "View.MemoryView":136
 * 
 *         if itemsize <= 0:
 *             raise ValueError("itemsize <= 0 for cython.array")             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(format, bytes):
 */
  __pyx_tuple__187 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(2, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__187);
  __Pyx_GIVEREF(__pyx_tuple__187);

  /* "View.MemoryView":148
 * 
 *         if not self._shape:
 *             raise MemoryError("unable to allocate shape and strides.")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__188 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(2, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);

  /* "View.MemoryView":176
 *             self.data = <char *>malloc(self.len)
 *             if not self.data:
 *                 raise MemoryError("unable to allocate array data.")             # <<<<<<<<<<<<<<
 * 
 *             if self.dtype_is_object:
 */
  __pyx_tuple__189 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(2, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__189);
  __Pyx_GIVEREF(__pyx_tuple__189);

  /* "View.MemoryView":192
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")             # <<<<<<<<<<<<<<
 *         info.buf = self.data
 *         info.len = self.len
 */
  __pyx_tuple__190 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(2, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__191 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__191);
  __Pyx_GIVEREF(__pyx_tuple__191);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__192 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);

  /* "View.MemoryView":418
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:
 *             raise TypeError("Cannot assign to read-only memoryview")             # <<<<<<<<<<<<<<
 * 
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 */
  __pyx_tuple__193 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(2, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);

  /* "View.MemoryView":495
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 *             raise ValueError("Unable to convert item to object")             # <<<<<<<<<<<<<<
 *         else:
 *             if len(self.view.format) == 1:
 */
  __pyx_tuple__194 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(2, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);

  /* "View.MemoryView":520
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_ND:
 */
  __pyx_tuple__195 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(2, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);

  /* "View.MemoryView":570
 *         if self.view.strides == NULL:
 * 
 *             raise ValueError("Buffer view does not expose strides")             # <<<<<<<<<<<<<<
 * 
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
 */
  __pyx_tuple__196 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(2, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);

  /* "View.MemoryView":577
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
 */
  __pyx_tuple__197 = PyTuple_New(1); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(2, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_INCREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_tuple__197, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_tuple__197);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__198 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__198);
  __Pyx_GIVEREF(__pyx_tuple__198);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__199 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);

  /* "View.MemoryView":682
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))             # <<<<<<<<<<<<<<
 *                 seen_ellipsis = True
 *             else:
 */
  __pyx_slice__200 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__200)) __PYX_ERR(2, 682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__200);
  __Pyx_GIVEREF(__pyx_slice__200);

  /* "View.MemoryView":703
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 *             raise ValueError("Indirect dimensions not supported")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__201 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(2, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__202 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(2, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__202);
  __Pyx_GIVEREF(__pyx_tuple__202);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__203 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);

  /* "View.MemoryView":286
 *         return self.name
 * 
 * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")
 */
  __pyx_tuple__204 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(2, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__204);
  __Pyx_GIVEREF(__pyx_tuple__204);

  /* "View.MemoryView":287
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
 * cdef indirect = Enum("<strided and indirect>")
 * 
 */
  __pyx_tuple__205 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(2, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);

  /* "View.MemoryView":288
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__206 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(2, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__206);
  __Pyx_GIVEREF(__pyx_tuple__206);

  /* "View.MemoryView":291
 * 
 * 
 * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")
 * 
 */
  __pyx_tuple__207 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(2, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);

  /* "View.MemoryView":292
 * 
 * cdef contiguous = Enum("<contiguous and direct>")
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__208 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(2, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);

  /* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__209 = 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__209)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__209);
  __Pyx_GIVEREF(__pyx_tuple__209);
  __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__209, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyString_Type_encode.type = (PyObject*)&PyString_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_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2147483648 = PyInt_FromString((char *)"2147483648", 0, 0); if (unlikely(!__pyx_int_2147483648)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4294967296 = PyInt_FromString((char *)"4294967296", 0, 0); if (unlikely(!__pyx_int_4294967296)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_8589934592 = PyInt_FromString((char *)"8589934592", 0, 0); if (unlikely(!__pyx_int_8589934592)) __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 CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  generic = Py_None; Py_INCREF(Py_None);
  strided = Py_None; Py_INCREF(Py_None);
  indirect = Py_None; Py_INCREF(Py_None);
  contiguous = Py_None; Py_INCREF(Py_None);
  indirect_contiguous = Py_None; Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

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_12pyrosm_proto_Blob = &__pyx_vtable_12pyrosm_proto_Blob;
  __pyx_vtable_12pyrosm_proto_Blob.reset = (void (*)(struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Blob_reset;
  __pyx_vtable_12pyrosm_proto_Blob.Clear = (void (*)(struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Blob_Clear;
  __pyx_vtable_12pyrosm_proto_Blob.ClearField = (void (*)(struct __pyx_obj_12pyrosm_proto_Blob *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Blob_ClearField;
  __pyx_vtable_12pyrosm_proto_Blob.CopyFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_Blob *, struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Blob_CopyFrom;
  __pyx_vtable_12pyrosm_proto_Blob.HasField = (int (*)(struct __pyx_obj_12pyrosm_proto_Blob *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Blob_HasField;
  __pyx_vtable_12pyrosm_proto_Blob.IsInitialized = (int (*)(struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Blob_IsInitialized;
  __pyx_vtable_12pyrosm_proto_Blob.MergeFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_Blob *, struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Blob_MergeFrom;
  __pyx_vtable_12pyrosm_proto_Blob.MergeFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_Blob *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Blob_MergeFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_4Blob_MergeFromString;
  __pyx_vtable_12pyrosm_proto_Blob.ParseFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_Blob *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Blob_ParseFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_4Blob_ParseFromString;
  __pyx_vtable_12pyrosm_proto_Blob.SerializeToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Blob_SerializeToString *__pyx_optional_args))__pyx_f_12pyrosm_proto_4Blob_SerializeToString;
  __pyx_vtable_12pyrosm_proto_Blob.SerializePartialToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Blob_SerializePartialToString;
  __pyx_vtable_12pyrosm_proto_Blob._protobuf_deserialize = (int (*)(struct __pyx_obj_12pyrosm_proto_Blob *, unsigned char const *, int, int))__pyx_f_12pyrosm_proto_4Blob__protobuf_deserialize;
  __pyx_vtable_12pyrosm_proto_Blob._protobuf_serialize = (void (*)(struct __pyx_obj_12pyrosm_proto_Blob *, PyObject *, int))__pyx_f_12pyrosm_proto_4Blob__protobuf_serialize;
  __pyx_vtable_12pyrosm_proto_Blob._Modified = (void (*)(struct __pyx_obj_12pyrosm_proto_Blob *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Blob__Modified;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto_Blob) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto_Blob.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto_Blob.tp_dictoffset && __pyx_type_12pyrosm_proto_Blob.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto_Blob.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_12pyrosm_proto_Blob.tp_dict, __pyx_vtabptr_12pyrosm_proto_Blob) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Blob, (PyObject *)&__pyx_type_12pyrosm_proto_Blob) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_12pyrosm_proto_Blob) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __pyx_ptype_12pyrosm_proto_Blob = &__pyx_type_12pyrosm_proto_Blob;
  __pyx_vtabptr_12pyrosm_proto_BlobHeader = &__pyx_vtable_12pyrosm_proto_BlobHeader;
  __pyx_vtable_12pyrosm_proto_BlobHeader.reset = (void (*)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10BlobHeader_reset;
  __pyx_vtable_12pyrosm_proto_BlobHeader.Clear = (void (*)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10BlobHeader_Clear;
  __pyx_vtable_12pyrosm_proto_BlobHeader.ClearField = (void (*)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10BlobHeader_ClearField;
  __pyx_vtable_12pyrosm_proto_BlobHeader.CopyFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10BlobHeader_CopyFrom;
  __pyx_vtable_12pyrosm_proto_BlobHeader.HasField = (int (*)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10BlobHeader_HasField;
  __pyx_vtable_12pyrosm_proto_BlobHeader.IsInitialized = (int (*)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10BlobHeader_IsInitialized;
  __pyx_vtable_12pyrosm_proto_BlobHeader.MergeFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10BlobHeader_MergeFrom;
  __pyx_vtable_12pyrosm_proto_BlobHeader.MergeFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_MergeFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_10BlobHeader_MergeFromString;
  __pyx_vtable_12pyrosm_proto_BlobHeader.ParseFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_ParseFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_10BlobHeader_ParseFromString;
  __pyx_vtable_12pyrosm_proto_BlobHeader.SerializeToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10BlobHeader_SerializeToString *__pyx_optional_args))__pyx_f_12pyrosm_proto_10BlobHeader_SerializeToString;
  __pyx_vtable_12pyrosm_proto_BlobHeader.SerializePartialToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10BlobHeader_SerializePartialToString;
  __pyx_vtable_12pyrosm_proto_BlobHeader._protobuf_deserialize = (int (*)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, unsigned char const *, int, int))__pyx_f_12pyrosm_proto_10BlobHeader__protobuf_deserialize;
  __pyx_vtable_12pyrosm_proto_BlobHeader._protobuf_serialize = (void (*)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, PyObject *, int))__pyx_f_12pyrosm_proto_10BlobHeader__protobuf_serialize;
  __pyx_vtable_12pyrosm_proto_BlobHeader._Modified = (void (*)(struct __pyx_obj_12pyrosm_proto_BlobHeader *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10BlobHeader__Modified;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto_BlobHeader) < 0) __PYX_ERR(0, 586, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto_BlobHeader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto_BlobHeader.tp_dictoffset && __pyx_type_12pyrosm_proto_BlobHeader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto_BlobHeader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_12pyrosm_proto_BlobHeader.tp_dict, __pyx_vtabptr_12pyrosm_proto_BlobHeader) < 0) __PYX_ERR(0, 586, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BlobHeader, (PyObject *)&__pyx_type_12pyrosm_proto_BlobHeader) < 0) __PYX_ERR(0, 586, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_12pyrosm_proto_BlobHeader) < 0) __PYX_ERR(0, 586, __pyx_L1_error)
  __pyx_ptype_12pyrosm_proto_BlobHeader = &__pyx_type_12pyrosm_proto_BlobHeader;
  __pyx_vtabptr_12pyrosm_proto_HeaderBlock = &__pyx_vtable_12pyrosm_proto_HeaderBlock;
  __pyx_vtable_12pyrosm_proto_HeaderBlock.reset = (void (*)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11HeaderBlock_reset;
  __pyx_vtable_12pyrosm_proto_HeaderBlock.Clear = (void (*)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11HeaderBlock_Clear;
  __pyx_vtable_12pyrosm_proto_HeaderBlock.ClearField = (void (*)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11HeaderBlock_ClearField;
  __pyx_vtable_12pyrosm_proto_HeaderBlock.CopyFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11HeaderBlock_CopyFrom;
  __pyx_vtable_12pyrosm_proto_HeaderBlock.HasField = (int (*)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11HeaderBlock_HasField;
  __pyx_vtable_12pyrosm_proto_HeaderBlock.IsInitialized = (int (*)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11HeaderBlock_IsInitialized;
  __pyx_vtable_12pyrosm_proto_HeaderBlock.MergeFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11HeaderBlock_MergeFrom;
  __pyx_vtable_12pyrosm_proto_HeaderBlock.MergeFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_MergeFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_11HeaderBlock_MergeFromString;
  __pyx_vtable_12pyrosm_proto_HeaderBlock.ParseFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_ParseFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_11HeaderBlock_ParseFromString;
  __pyx_vtable_12pyrosm_proto_HeaderBlock.SerializeToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11HeaderBlock_SerializeToString *__pyx_optional_args))__pyx_f_12pyrosm_proto_11HeaderBlock_SerializeToString;
  __pyx_vtable_12pyrosm_proto_HeaderBlock.SerializePartialToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11HeaderBlock_SerializePartialToString;
  __pyx_vtable_12pyrosm_proto_HeaderBlock._protobuf_deserialize = (int (*)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, unsigned char const *, int, int))__pyx_f_12pyrosm_proto_11HeaderBlock__protobuf_deserialize;
  __pyx_vtable_12pyrosm_proto_HeaderBlock._protobuf_serialize = (void (*)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, PyObject *, int))__pyx_f_12pyrosm_proto_11HeaderBlock__protobuf_serialize;
  __pyx_vtable_12pyrosm_proto_HeaderBlock._Modified = (void (*)(struct __pyx_obj_12pyrosm_proto_HeaderBlock *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11HeaderBlock__Modified;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto_HeaderBlock) < 0) __PYX_ERR(0, 1079, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto_HeaderBlock.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto_HeaderBlock.tp_dictoffset && __pyx_type_12pyrosm_proto_HeaderBlock.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto_HeaderBlock.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_12pyrosm_proto_HeaderBlock.tp_dict, __pyx_vtabptr_12pyrosm_proto_HeaderBlock) < 0) __PYX_ERR(0, 1079, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_HeaderBlock, (PyObject *)&__pyx_type_12pyrosm_proto_HeaderBlock) < 0) __PYX_ERR(0, 1079, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_12pyrosm_proto_HeaderBlock) < 0) __PYX_ERR(0, 1079, __pyx_L1_error)
  __pyx_ptype_12pyrosm_proto_HeaderBlock = &__pyx_type_12pyrosm_proto_HeaderBlock;
  __pyx_vtabptr_12pyrosm_proto_HeaderBBox = &__pyx_vtable_12pyrosm_proto_HeaderBBox;
  __pyx_vtable_12pyrosm_proto_HeaderBBox.reset = (void (*)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10HeaderBBox_reset;
  __pyx_vtable_12pyrosm_proto_HeaderBBox.Clear = (void (*)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10HeaderBBox_Clear;
  __pyx_vtable_12pyrosm_proto_HeaderBBox.ClearField = (void (*)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10HeaderBBox_ClearField;
  __pyx_vtable_12pyrosm_proto_HeaderBBox.CopyFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10HeaderBBox_CopyFrom;
  __pyx_vtable_12pyrosm_proto_HeaderBBox.HasField = (int (*)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10HeaderBBox_HasField;
  __pyx_vtable_12pyrosm_proto_HeaderBBox.IsInitialized = (int (*)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10HeaderBBox_IsInitialized;
  __pyx_vtable_12pyrosm_proto_HeaderBBox.MergeFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10HeaderBBox_MergeFrom;
  __pyx_vtable_12pyrosm_proto_HeaderBBox.MergeFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_MergeFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_10HeaderBBox_MergeFromString;
  __pyx_vtable_12pyrosm_proto_HeaderBBox.ParseFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_ParseFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_10HeaderBBox_ParseFromString;
  __pyx_vtable_12pyrosm_proto_HeaderBBox.SerializeToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10HeaderBBox_SerializeToString *__pyx_optional_args))__pyx_f_12pyrosm_proto_10HeaderBBox_SerializeToString;
  __pyx_vtable_12pyrosm_proto_HeaderBBox.SerializePartialToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10HeaderBBox_SerializePartialToString;
  __pyx_vtable_12pyrosm_proto_HeaderBBox._protobuf_deserialize = (int (*)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, unsigned char const *, int, int))__pyx_f_12pyrosm_proto_10HeaderBBox__protobuf_deserialize;
  __pyx_vtable_12pyrosm_proto_HeaderBBox._protobuf_serialize = (void (*)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, PyObject *, int))__pyx_f_12pyrosm_proto_10HeaderBBox__protobuf_serialize;
  __pyx_vtable_12pyrosm_proto_HeaderBBox._Modified = (void (*)(struct __pyx_obj_12pyrosm_proto_HeaderBBox *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10HeaderBBox__Modified;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto_HeaderBBox) < 0) __PYX_ERR(0, 1861, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto_HeaderBBox.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto_HeaderBBox.tp_dictoffset && __pyx_type_12pyrosm_proto_HeaderBBox.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto_HeaderBBox.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_12pyrosm_proto_HeaderBBox.tp_dict, __pyx_vtabptr_12pyrosm_proto_HeaderBBox) < 0) __PYX_ERR(0, 1861, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_HeaderBBox, (PyObject *)&__pyx_type_12pyrosm_proto_HeaderBBox) < 0) __PYX_ERR(0, 1861, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_12pyrosm_proto_HeaderBBox) < 0) __PYX_ERR(0, 1861, __pyx_L1_error)
  __pyx_ptype_12pyrosm_proto_HeaderBBox = &__pyx_type_12pyrosm_proto_HeaderBBox;
  __pyx_vtabptr_12pyrosm_proto_PrimitiveBlock = &__pyx_vtable_12pyrosm_proto_PrimitiveBlock;
  __pyx_vtable_12pyrosm_proto_PrimitiveBlock.reset = (void (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveBlock_reset;
  __pyx_vtable_12pyrosm_proto_PrimitiveBlock.Clear = (void (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveBlock_Clear;
  __pyx_vtable_12pyrosm_proto_PrimitiveBlock.ClearField = (void (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveBlock_ClearField;
  __pyx_vtable_12pyrosm_proto_PrimitiveBlock.CopyFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveBlock_CopyFrom;
  __pyx_vtable_12pyrosm_proto_PrimitiveBlock.HasField = (int (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveBlock_HasField;
  __pyx_vtable_12pyrosm_proto_PrimitiveBlock.IsInitialized = (int (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveBlock_IsInitialized;
  __pyx_vtable_12pyrosm_proto_PrimitiveBlock.MergeFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveBlock_MergeFrom;
  __pyx_vtable_12pyrosm_proto_PrimitiveBlock.MergeFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_MergeFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_14PrimitiveBlock_MergeFromString;
  __pyx_vtable_12pyrosm_proto_PrimitiveBlock.ParseFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_ParseFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_14PrimitiveBlock_ParseFromString;
  __pyx_vtable_12pyrosm_proto_PrimitiveBlock.SerializeToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveBlock_SerializeToString *__pyx_optional_args))__pyx_f_12pyrosm_proto_14PrimitiveBlock_SerializeToString;
  __pyx_vtable_12pyrosm_proto_PrimitiveBlock.SerializePartialToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveBlock_SerializePartialToString;
  __pyx_vtable_12pyrosm_proto_PrimitiveBlock._protobuf_deserialize = (int (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, unsigned char const *, int, int))__pyx_f_12pyrosm_proto_14PrimitiveBlock__protobuf_deserialize;
  __pyx_vtable_12pyrosm_proto_PrimitiveBlock._protobuf_serialize = (void (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, PyObject *, int))__pyx_f_12pyrosm_proto_14PrimitiveBlock__protobuf_serialize;
  __pyx_vtable_12pyrosm_proto_PrimitiveBlock._Modified = (void (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveBlock *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveBlock__Modified;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto_PrimitiveBlock) < 0) __PYX_ERR(0, 2395, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto_PrimitiveBlock.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto_PrimitiveBlock.tp_dictoffset && __pyx_type_12pyrosm_proto_PrimitiveBlock.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto_PrimitiveBlock.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_12pyrosm_proto_PrimitiveBlock.tp_dict, __pyx_vtabptr_12pyrosm_proto_PrimitiveBlock) < 0) __PYX_ERR(0, 2395, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PrimitiveBlock, (PyObject *)&__pyx_type_12pyrosm_proto_PrimitiveBlock) < 0) __PYX_ERR(0, 2395, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_12pyrosm_proto_PrimitiveBlock) < 0) __PYX_ERR(0, 2395, __pyx_L1_error)
  __pyx_ptype_12pyrosm_proto_PrimitiveBlock = &__pyx_type_12pyrosm_proto_PrimitiveBlock;
  __pyx_vtabptr_12pyrosm_proto_PrimitiveGroup = &__pyx_vtable_12pyrosm_proto_PrimitiveGroup;
  __pyx_vtable_12pyrosm_proto_PrimitiveGroup.reset = (void (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveGroup_reset;
  __pyx_vtable_12pyrosm_proto_PrimitiveGroup.Clear = (void (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveGroup_Clear;
  __pyx_vtable_12pyrosm_proto_PrimitiveGroup.ClearField = (void (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveGroup_ClearField;
  __pyx_vtable_12pyrosm_proto_PrimitiveGroup.CopyFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveGroup_CopyFrom;
  __pyx_vtable_12pyrosm_proto_PrimitiveGroup.HasField = (int (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveGroup_HasField;
  __pyx_vtable_12pyrosm_proto_PrimitiveGroup.IsInitialized = (int (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveGroup_IsInitialized;
  __pyx_vtable_12pyrosm_proto_PrimitiveGroup.MergeFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveGroup_MergeFrom;
  __pyx_vtable_12pyrosm_proto_PrimitiveGroup.MergeFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_MergeFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_14PrimitiveGroup_MergeFromString;
  __pyx_vtable_12pyrosm_proto_PrimitiveGroup.ParseFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_ParseFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_14PrimitiveGroup_ParseFromString;
  __pyx_vtable_12pyrosm_proto_PrimitiveGroup.SerializeToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_14PrimitiveGroup_SerializeToString *__pyx_optional_args))__pyx_f_12pyrosm_proto_14PrimitiveGroup_SerializeToString;
  __pyx_vtable_12pyrosm_proto_PrimitiveGroup.SerializePartialToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveGroup_SerializePartialToString;
  __pyx_vtable_12pyrosm_proto_PrimitiveGroup._protobuf_deserialize = (int (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, unsigned char const *, int, int))__pyx_f_12pyrosm_proto_14PrimitiveGroup__protobuf_deserialize;
  __pyx_vtable_12pyrosm_proto_PrimitiveGroup._protobuf_serialize = (void (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, PyObject *, int))__pyx_f_12pyrosm_proto_14PrimitiveGroup__protobuf_serialize;
  __pyx_vtable_12pyrosm_proto_PrimitiveGroup._Modified = (void (*)(struct __pyx_obj_12pyrosm_proto_PrimitiveGroup *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_14PrimitiveGroup__Modified;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto_PrimitiveGroup) < 0) __PYX_ERR(0, 3078, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto_PrimitiveGroup.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto_PrimitiveGroup.tp_dictoffset && __pyx_type_12pyrosm_proto_PrimitiveGroup.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto_PrimitiveGroup.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_12pyrosm_proto_PrimitiveGroup.tp_dict, __pyx_vtabptr_12pyrosm_proto_PrimitiveGroup) < 0) __PYX_ERR(0, 3078, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PrimitiveGroup, (PyObject *)&__pyx_type_12pyrosm_proto_PrimitiveGroup) < 0) __PYX_ERR(0, 3078, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_12pyrosm_proto_PrimitiveGroup) < 0) __PYX_ERR(0, 3078, __pyx_L1_error)
  __pyx_ptype_12pyrosm_proto_PrimitiveGroup = &__pyx_type_12pyrosm_proto_PrimitiveGroup;
  __pyx_vtabptr_12pyrosm_proto_StringTable = &__pyx_vtable_12pyrosm_proto_StringTable;
  __pyx_vtable_12pyrosm_proto_StringTable.reset = (void (*)(struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11StringTable_reset;
  __pyx_vtable_12pyrosm_proto_StringTable.Clear = (void (*)(struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11StringTable_Clear;
  __pyx_vtable_12pyrosm_proto_StringTable.ClearField = (void (*)(struct __pyx_obj_12pyrosm_proto_StringTable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11StringTable_ClearField;
  __pyx_vtable_12pyrosm_proto_StringTable.CopyFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_StringTable *, struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11StringTable_CopyFrom;
  __pyx_vtable_12pyrosm_proto_StringTable.HasField = (int (*)(struct __pyx_obj_12pyrosm_proto_StringTable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11StringTable_HasField;
  __pyx_vtable_12pyrosm_proto_StringTable.IsInitialized = (int (*)(struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11StringTable_IsInitialized;
  __pyx_vtable_12pyrosm_proto_StringTable.MergeFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_StringTable *, struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11StringTable_MergeFrom;
  __pyx_vtable_12pyrosm_proto_StringTable.MergeFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_StringTable *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11StringTable_MergeFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_11StringTable_MergeFromString;
  __pyx_vtable_12pyrosm_proto_StringTable.ParseFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_StringTable *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11StringTable_ParseFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_11StringTable_ParseFromString;
  __pyx_vtable_12pyrosm_proto_StringTable.SerializeToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_11StringTable_SerializeToString *__pyx_optional_args))__pyx_f_12pyrosm_proto_11StringTable_SerializeToString;
  __pyx_vtable_12pyrosm_proto_StringTable.SerializePartialToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11StringTable_SerializePartialToString;
  __pyx_vtable_12pyrosm_proto_StringTable._protobuf_deserialize = (int (*)(struct __pyx_obj_12pyrosm_proto_StringTable *, unsigned char const *, int, int))__pyx_f_12pyrosm_proto_11StringTable__protobuf_deserialize;
  __pyx_vtable_12pyrosm_proto_StringTable._protobuf_serialize = (void (*)(struct __pyx_obj_12pyrosm_proto_StringTable *, PyObject *, int))__pyx_f_12pyrosm_proto_11StringTable__protobuf_serialize;
  __pyx_vtable_12pyrosm_proto_StringTable._Modified = (void (*)(struct __pyx_obj_12pyrosm_proto_StringTable *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_11StringTable__Modified;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto_StringTable) < 0) __PYX_ERR(0, 3866, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto_StringTable.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto_StringTable.tp_dictoffset && __pyx_type_12pyrosm_proto_StringTable.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto_StringTable.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_12pyrosm_proto_StringTable.tp_dict, __pyx_vtabptr_12pyrosm_proto_StringTable) < 0) __PYX_ERR(0, 3866, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StringTable, (PyObject *)&__pyx_type_12pyrosm_proto_StringTable) < 0) __PYX_ERR(0, 3866, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_12pyrosm_proto_StringTable) < 0) __PYX_ERR(0, 3866, __pyx_L1_error)
  __pyx_ptype_12pyrosm_proto_StringTable = &__pyx_type_12pyrosm_proto_StringTable;
  __pyx_vtabptr_12pyrosm_proto_Info = &__pyx_vtable_12pyrosm_proto_Info;
  __pyx_vtable_12pyrosm_proto_Info.reset = (void (*)(struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Info_reset;
  __pyx_vtable_12pyrosm_proto_Info.Clear = (void (*)(struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Info_Clear;
  __pyx_vtable_12pyrosm_proto_Info.ClearField = (void (*)(struct __pyx_obj_12pyrosm_proto_Info *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Info_ClearField;
  __pyx_vtable_12pyrosm_proto_Info.CopyFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_Info *, struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Info_CopyFrom;
  __pyx_vtable_12pyrosm_proto_Info.HasField = (int (*)(struct __pyx_obj_12pyrosm_proto_Info *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Info_HasField;
  __pyx_vtable_12pyrosm_proto_Info.IsInitialized = (int (*)(struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Info_IsInitialized;
  __pyx_vtable_12pyrosm_proto_Info.MergeFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_Info *, struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Info_MergeFrom;
  __pyx_vtable_12pyrosm_proto_Info.MergeFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_Info *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Info_MergeFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_4Info_MergeFromString;
  __pyx_vtable_12pyrosm_proto_Info.ParseFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_Info *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Info_ParseFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_4Info_ParseFromString;
  __pyx_vtable_12pyrosm_proto_Info.SerializeToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Info_SerializeToString *__pyx_optional_args))__pyx_f_12pyrosm_proto_4Info_SerializeToString;
  __pyx_vtable_12pyrosm_proto_Info.SerializePartialToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Info_SerializePartialToString;
  __pyx_vtable_12pyrosm_proto_Info._protobuf_deserialize = (int (*)(struct __pyx_obj_12pyrosm_proto_Info *, unsigned char const *, int, int))__pyx_f_12pyrosm_proto_4Info__protobuf_deserialize;
  __pyx_vtable_12pyrosm_proto_Info._protobuf_serialize = (void (*)(struct __pyx_obj_12pyrosm_proto_Info *, PyObject *, int))__pyx_f_12pyrosm_proto_4Info__protobuf_serialize;
  __pyx_vtable_12pyrosm_proto_Info._Modified = (void (*)(struct __pyx_obj_12pyrosm_proto_Info *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Info__Modified;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto_Info) < 0) __PYX_ERR(0, 4263, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto_Info.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto_Info.tp_dictoffset && __pyx_type_12pyrosm_proto_Info.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto_Info.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_12pyrosm_proto_Info.tp_dict, __pyx_vtabptr_12pyrosm_proto_Info) < 0) __PYX_ERR(0, 4263, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Info, (PyObject *)&__pyx_type_12pyrosm_proto_Info) < 0) __PYX_ERR(0, 4263, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_12pyrosm_proto_Info) < 0) __PYX_ERR(0, 4263, __pyx_L1_error)
  __pyx_ptype_12pyrosm_proto_Info = &__pyx_type_12pyrosm_proto_Info;
  __pyx_vtabptr_12pyrosm_proto_DenseInfo = &__pyx_vtable_12pyrosm_proto_DenseInfo;
  __pyx_vtable_12pyrosm_proto_DenseInfo.reset = (void (*)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9DenseInfo_reset;
  __pyx_vtable_12pyrosm_proto_DenseInfo.Clear = (void (*)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9DenseInfo_Clear;
  __pyx_vtable_12pyrosm_proto_DenseInfo.ClearField = (void (*)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9DenseInfo_ClearField;
  __pyx_vtable_12pyrosm_proto_DenseInfo.CopyFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9DenseInfo_CopyFrom;
  __pyx_vtable_12pyrosm_proto_DenseInfo.HasField = (int (*)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9DenseInfo_HasField;
  __pyx_vtable_12pyrosm_proto_DenseInfo.IsInitialized = (int (*)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9DenseInfo_IsInitialized;
  __pyx_vtable_12pyrosm_proto_DenseInfo.MergeFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9DenseInfo_MergeFrom;
  __pyx_vtable_12pyrosm_proto_DenseInfo.MergeFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_MergeFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_9DenseInfo_MergeFromString;
  __pyx_vtable_12pyrosm_proto_DenseInfo.ParseFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_ParseFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_9DenseInfo_ParseFromString;
  __pyx_vtable_12pyrosm_proto_DenseInfo.SerializeToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9DenseInfo_SerializeToString *__pyx_optional_args))__pyx_f_12pyrosm_proto_9DenseInfo_SerializeToString;
  __pyx_vtable_12pyrosm_proto_DenseInfo.SerializePartialToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9DenseInfo_SerializePartialToString;
  __pyx_vtable_12pyrosm_proto_DenseInfo._protobuf_deserialize = (int (*)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, unsigned char const *, int, int))__pyx_f_12pyrosm_proto_9DenseInfo__protobuf_deserialize;
  __pyx_vtable_12pyrosm_proto_DenseInfo._protobuf_serialize = (void (*)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, PyObject *, int))__pyx_f_12pyrosm_proto_9DenseInfo__protobuf_serialize;
  __pyx_vtable_12pyrosm_proto_DenseInfo._Modified = (void (*)(struct __pyx_obj_12pyrosm_proto_DenseInfo *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9DenseInfo__Modified;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto_DenseInfo) < 0) __PYX_ERR(0, 4849, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto_DenseInfo.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto_DenseInfo.tp_dictoffset && __pyx_type_12pyrosm_proto_DenseInfo.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto_DenseInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_12pyrosm_proto_DenseInfo.tp_dict, __pyx_vtabptr_12pyrosm_proto_DenseInfo) < 0) __PYX_ERR(0, 4849, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DenseInfo, (PyObject *)&__pyx_type_12pyrosm_proto_DenseInfo) < 0) __PYX_ERR(0, 4849, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_12pyrosm_proto_DenseInfo) < 0) __PYX_ERR(0, 4849, __pyx_L1_error)
  __pyx_ptype_12pyrosm_proto_DenseInfo = &__pyx_type_12pyrosm_proto_DenseInfo;
  __pyx_vtabptr_12pyrosm_proto_ChangeSet = &__pyx_vtable_12pyrosm_proto_ChangeSet;
  __pyx_vtable_12pyrosm_proto_ChangeSet.reset = (void (*)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9ChangeSet_reset;
  __pyx_vtable_12pyrosm_proto_ChangeSet.Clear = (void (*)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9ChangeSet_Clear;
  __pyx_vtable_12pyrosm_proto_ChangeSet.ClearField = (void (*)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9ChangeSet_ClearField;
  __pyx_vtable_12pyrosm_proto_ChangeSet.CopyFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9ChangeSet_CopyFrom;
  __pyx_vtable_12pyrosm_proto_ChangeSet.HasField = (int (*)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9ChangeSet_HasField;
  __pyx_vtable_12pyrosm_proto_ChangeSet.IsInitialized = (int (*)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9ChangeSet_IsInitialized;
  __pyx_vtable_12pyrosm_proto_ChangeSet.MergeFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9ChangeSet_MergeFrom;
  __pyx_vtable_12pyrosm_proto_ChangeSet.MergeFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_MergeFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_9ChangeSet_MergeFromString;
  __pyx_vtable_12pyrosm_proto_ChangeSet.ParseFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_ParseFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_9ChangeSet_ParseFromString;
  __pyx_vtable_12pyrosm_proto_ChangeSet.SerializeToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_9ChangeSet_SerializeToString *__pyx_optional_args))__pyx_f_12pyrosm_proto_9ChangeSet_SerializeToString;
  __pyx_vtable_12pyrosm_proto_ChangeSet.SerializePartialToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9ChangeSet_SerializePartialToString;
  __pyx_vtable_12pyrosm_proto_ChangeSet._protobuf_deserialize = (int (*)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, unsigned char const *, int, int))__pyx_f_12pyrosm_proto_9ChangeSet__protobuf_deserialize;
  __pyx_vtable_12pyrosm_proto_ChangeSet._protobuf_serialize = (void (*)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, PyObject *, int))__pyx_f_12pyrosm_proto_9ChangeSet__protobuf_serialize;
  __pyx_vtable_12pyrosm_proto_ChangeSet._Modified = (void (*)(struct __pyx_obj_12pyrosm_proto_ChangeSet *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_9ChangeSet__Modified;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto_ChangeSet) < 0) __PYX_ERR(0, 5627, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto_ChangeSet.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto_ChangeSet.tp_dictoffset && __pyx_type_12pyrosm_proto_ChangeSet.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto_ChangeSet.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_12pyrosm_proto_ChangeSet.tp_dict, __pyx_vtabptr_12pyrosm_proto_ChangeSet) < 0) __PYX_ERR(0, 5627, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ChangeSet, (PyObject *)&__pyx_type_12pyrosm_proto_ChangeSet) < 0) __PYX_ERR(0, 5627, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_12pyrosm_proto_ChangeSet) < 0) __PYX_ERR(0, 5627, __pyx_L1_error)
  __pyx_ptype_12pyrosm_proto_ChangeSet = &__pyx_type_12pyrosm_proto_ChangeSet;
  __pyx_vtabptr_12pyrosm_proto_Node = &__pyx_vtable_12pyrosm_proto_Node;
  __pyx_vtable_12pyrosm_proto_Node.reset = (void (*)(struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Node_reset;
  __pyx_vtable_12pyrosm_proto_Node.Clear = (void (*)(struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Node_Clear;
  __pyx_vtable_12pyrosm_proto_Node.ClearField = (void (*)(struct __pyx_obj_12pyrosm_proto_Node *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Node_ClearField;
  __pyx_vtable_12pyrosm_proto_Node.CopyFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_Node *, struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Node_CopyFrom;
  __pyx_vtable_12pyrosm_proto_Node.HasField = (int (*)(struct __pyx_obj_12pyrosm_proto_Node *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Node_HasField;
  __pyx_vtable_12pyrosm_proto_Node.IsInitialized = (int (*)(struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Node_IsInitialized;
  __pyx_vtable_12pyrosm_proto_Node.MergeFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_Node *, struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Node_MergeFrom;
  __pyx_vtable_12pyrosm_proto_Node.MergeFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_Node *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Node_MergeFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_4Node_MergeFromString;
  __pyx_vtable_12pyrosm_proto_Node.ParseFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_Node *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Node_ParseFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_4Node_ParseFromString;
  __pyx_vtable_12pyrosm_proto_Node.SerializeToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_4Node_SerializeToString *__pyx_optional_args))__pyx_f_12pyrosm_proto_4Node_SerializeToString;
  __pyx_vtable_12pyrosm_proto_Node.SerializePartialToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Node_SerializePartialToString;
  __pyx_vtable_12pyrosm_proto_Node._protobuf_deserialize = (int (*)(struct __pyx_obj_12pyrosm_proto_Node *, unsigned char const *, int, int))__pyx_f_12pyrosm_proto_4Node__protobuf_deserialize;
  __pyx_vtable_12pyrosm_proto_Node._protobuf_serialize = (void (*)(struct __pyx_obj_12pyrosm_proto_Node *, PyObject *, int))__pyx_f_12pyrosm_proto_4Node__protobuf_serialize;
  __pyx_vtable_12pyrosm_proto_Node._Modified = (void (*)(struct __pyx_obj_12pyrosm_proto_Node *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_4Node__Modified;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto_Node) < 0) __PYX_ERR(0, 6011, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto_Node.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto_Node.tp_dictoffset && __pyx_type_12pyrosm_proto_Node.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto_Node.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_12pyrosm_proto_Node.tp_dict, __pyx_vtabptr_12pyrosm_proto_Node) < 0) __PYX_ERR(0, 6011, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Node, (PyObject *)&__pyx_type_12pyrosm_proto_Node) < 0) __PYX_ERR(0, 6011, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_12pyrosm_proto_Node) < 0) __PYX_ERR(0, 6011, __pyx_L1_error)
  __pyx_ptype_12pyrosm_proto_Node = &__pyx_type_12pyrosm_proto_Node;
  __pyx_vtabptr_12pyrosm_proto_DenseNodes = &__pyx_vtable_12pyrosm_proto_DenseNodes;
  __pyx_vtable_12pyrosm_proto_DenseNodes.reset = (void (*)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10DenseNodes_reset;
  __pyx_vtable_12pyrosm_proto_DenseNodes.Clear = (void (*)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10DenseNodes_Clear;
  __pyx_vtable_12pyrosm_proto_DenseNodes.ClearField = (void (*)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10DenseNodes_ClearField;
  __pyx_vtable_12pyrosm_proto_DenseNodes.CopyFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10DenseNodes_CopyFrom;
  __pyx_vtable_12pyrosm_proto_DenseNodes.HasField = (int (*)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10DenseNodes_HasField;
  __pyx_vtable_12pyrosm_proto_DenseNodes.IsInitialized = (int (*)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10DenseNodes_IsInitialized;
  __pyx_vtable_12pyrosm_proto_DenseNodes.MergeFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10DenseNodes_MergeFrom;
  __pyx_vtable_12pyrosm_proto_DenseNodes.MergeFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_MergeFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_10DenseNodes_MergeFromString;
  __pyx_vtable_12pyrosm_proto_DenseNodes.ParseFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_ParseFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_10DenseNodes_ParseFromString;
  __pyx_vtable_12pyrosm_proto_DenseNodes.SerializeToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_10DenseNodes_SerializeToString *__pyx_optional_args))__pyx_f_12pyrosm_proto_10DenseNodes_SerializeToString;
  __pyx_vtable_12pyrosm_proto_DenseNodes.SerializePartialToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10DenseNodes_SerializePartialToString;
  __pyx_vtable_12pyrosm_proto_DenseNodes._protobuf_deserialize = (int (*)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, unsigned char const *, int, int))__pyx_f_12pyrosm_proto_10DenseNodes__protobuf_deserialize;
  __pyx_vtable_12pyrosm_proto_DenseNodes._protobuf_serialize = (void (*)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, PyObject *, int))__pyx_f_12pyrosm_proto_10DenseNodes__protobuf_serialize;
  __pyx_vtable_12pyrosm_proto_DenseNodes._Modified = (void (*)(struct __pyx_obj_12pyrosm_proto_DenseNodes *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_10DenseNodes__Modified;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto_DenseNodes) < 0) __PYX_ERR(0, 6729, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto_DenseNodes.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto_DenseNodes.tp_dictoffset && __pyx_type_12pyrosm_proto_DenseNodes.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto_DenseNodes.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_12pyrosm_proto_DenseNodes.tp_dict, __pyx_vtabptr_12pyrosm_proto_DenseNodes) < 0) __PYX_ERR(0, 6729, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DenseNodes, (PyObject *)&__pyx_type_12pyrosm_proto_DenseNodes) < 0) __PYX_ERR(0, 6729, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_12pyrosm_proto_DenseNodes) < 0) __PYX_ERR(0, 6729, __pyx_L1_error)
  __pyx_ptype_12pyrosm_proto_DenseNodes = &__pyx_type_12pyrosm_proto_DenseNodes;
  __pyx_vtabptr_12pyrosm_proto_Way = &__pyx_vtable_12pyrosm_proto_Way;
  __pyx_vtable_12pyrosm_proto_Way.reset = (void (*)(struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_3Way_reset;
  __pyx_vtable_12pyrosm_proto_Way.Clear = (void (*)(struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_3Way_Clear;
  __pyx_vtable_12pyrosm_proto_Way.ClearField = (void (*)(struct __pyx_obj_12pyrosm_proto_Way *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_3Way_ClearField;
  __pyx_vtable_12pyrosm_proto_Way.CopyFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_Way *, struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_3Way_CopyFrom;
  __pyx_vtable_12pyrosm_proto_Way.HasField = (int (*)(struct __pyx_obj_12pyrosm_proto_Way *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_3Way_HasField;
  __pyx_vtable_12pyrosm_proto_Way.IsInitialized = (int (*)(struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_3Way_IsInitialized;
  __pyx_vtable_12pyrosm_proto_Way.MergeFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_Way *, struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_3Way_MergeFrom;
  __pyx_vtable_12pyrosm_proto_Way.MergeFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_Way *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_3Way_MergeFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_3Way_MergeFromString;
  __pyx_vtable_12pyrosm_proto_Way.ParseFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_Way *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_3Way_ParseFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_3Way_ParseFromString;
  __pyx_vtable_12pyrosm_proto_Way.SerializeToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_3Way_SerializeToString *__pyx_optional_args))__pyx_f_12pyrosm_proto_3Way_SerializeToString;
  __pyx_vtable_12pyrosm_proto_Way.SerializePartialToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_3Way_SerializePartialToString;
  __pyx_vtable_12pyrosm_proto_Way._protobuf_deserialize = (int (*)(struct __pyx_obj_12pyrosm_proto_Way *, unsigned char const *, int, int))__pyx_f_12pyrosm_proto_3Way__protobuf_deserialize;
  __pyx_vtable_12pyrosm_proto_Way._protobuf_serialize = (void (*)(struct __pyx_obj_12pyrosm_proto_Way *, PyObject *, int))__pyx_f_12pyrosm_proto_3Way__protobuf_serialize;
  __pyx_vtable_12pyrosm_proto_Way._Modified = (void (*)(struct __pyx_obj_12pyrosm_proto_Way *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_3Way__Modified;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto_Way) < 0) __PYX_ERR(0, 7443, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto_Way.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto_Way.tp_dictoffset && __pyx_type_12pyrosm_proto_Way.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto_Way.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_12pyrosm_proto_Way.tp_dict, __pyx_vtabptr_12pyrosm_proto_Way) < 0) __PYX_ERR(0, 7443, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Way, (PyObject *)&__pyx_type_12pyrosm_proto_Way) < 0) __PYX_ERR(0, 7443, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_12pyrosm_proto_Way) < 0) __PYX_ERR(0, 7443, __pyx_L1_error)
  __pyx_ptype_12pyrosm_proto_Way = &__pyx_type_12pyrosm_proto_Way;
  __pyx_vtabptr_12pyrosm_proto_Relation = &__pyx_vtable_12pyrosm_proto_Relation;
  __pyx_vtable_12pyrosm_proto_Relation.reset = (void (*)(struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_8Relation_reset;
  __pyx_vtable_12pyrosm_proto_Relation.Clear = (void (*)(struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_8Relation_Clear;
  __pyx_vtable_12pyrosm_proto_Relation.ClearField = (void (*)(struct __pyx_obj_12pyrosm_proto_Relation *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_8Relation_ClearField;
  __pyx_vtable_12pyrosm_proto_Relation.CopyFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_Relation *, struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_8Relation_CopyFrom;
  __pyx_vtable_12pyrosm_proto_Relation.HasField = (int (*)(struct __pyx_obj_12pyrosm_proto_Relation *, PyObject *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_8Relation_HasField;
  __pyx_vtable_12pyrosm_proto_Relation.IsInitialized = (int (*)(struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_8Relation_IsInitialized;
  __pyx_vtable_12pyrosm_proto_Relation.MergeFrom = (void (*)(struct __pyx_obj_12pyrosm_proto_Relation *, struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_8Relation_MergeFrom;
  __pyx_vtable_12pyrosm_proto_Relation.MergeFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_Relation *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_8Relation_MergeFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_8Relation_MergeFromString;
  __pyx_vtable_12pyrosm_proto_Relation.ParseFromString = (int (*)(struct __pyx_obj_12pyrosm_proto_Relation *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_8Relation_ParseFromString *__pyx_optional_args))__pyx_f_12pyrosm_proto_8Relation_ParseFromString;
  __pyx_vtable_12pyrosm_proto_Relation.SerializeToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch, struct __pyx_opt_args_12pyrosm_proto_8Relation_SerializeToString *__pyx_optional_args))__pyx_f_12pyrosm_proto_8Relation_SerializeToString;
  __pyx_vtable_12pyrosm_proto_Relation.SerializePartialToString = (PyObject *(*)(struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_8Relation_SerializePartialToString;
  __pyx_vtable_12pyrosm_proto_Relation._protobuf_deserialize = (int (*)(struct __pyx_obj_12pyrosm_proto_Relation *, unsigned char const *, int, int))__pyx_f_12pyrosm_proto_8Relation__protobuf_deserialize;
  __pyx_vtable_12pyrosm_proto_Relation._protobuf_serialize = (void (*)(struct __pyx_obj_12pyrosm_proto_Relation *, PyObject *, int))__pyx_f_12pyrosm_proto_8Relation__protobuf_serialize;
  __pyx_vtable_12pyrosm_proto_Relation._Modified = (void (*)(struct __pyx_obj_12pyrosm_proto_Relation *, int __pyx_skip_dispatch))__pyx_f_12pyrosm_proto_8Relation__Modified;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto_Relation) < 0) __PYX_ERR(0, 8134, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto_Relation.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto_Relation.tp_dictoffset && __pyx_type_12pyrosm_proto_Relation.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto_Relation.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_12pyrosm_proto_Relation.tp_dict, __pyx_vtabptr_12pyrosm_proto_Relation) < 0) __PYX_ERR(0, 8134, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Relation, (PyObject *)&__pyx_type_12pyrosm_proto_Relation) < 0) __PYX_ERR(0, 8134, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_12pyrosm_proto_Relation) < 0) __PYX_ERR(0, 8134, __pyx_L1_error)
  __pyx_ptype_12pyrosm_proto_Relation = &__pyx_type_12pyrosm_proto_Relation;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct__Items) < 0) __PYX_ERR(0, 519, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct__Items.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct__Items.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct__Items.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct__Items.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct__Items = &__pyx_type_12pyrosm_proto___pyx_scope_struct__Items;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_1_Fields) < 0) __PYX_ERR(0, 532, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_1_Fields.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_1_Fields.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_1_Fields.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_1_Fields.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_1_Fields = &__pyx_type_12pyrosm_proto___pyx_scope_struct_1_Fields;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_2_Values) < 0) __PYX_ERR(0, 545, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_2_Values.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_2_Values.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_2_Values.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_2_Values.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_2_Values = &__pyx_type_12pyrosm_proto___pyx_scope_struct_2_Values;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_3_Setters) < 0) __PYX_ERR(0, 560, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_3_Setters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_3_Setters.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_3_Setters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_3_Setters.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_3_Setters = &__pyx_type_12pyrosm_proto___pyx_scope_struct_3_Setters;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_4_Items) < 0) __PYX_ERR(0, 1024, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_4_Items.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_4_Items.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_4_Items.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_4_Items.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_4_Items = &__pyx_type_12pyrosm_proto___pyx_scope_struct_4_Items;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_5_Fields) < 0) __PYX_ERR(0, 1035, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_5_Fields.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_5_Fields.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_5_Fields.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_5_Fields.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_5_Fields = &__pyx_type_12pyrosm_proto___pyx_scope_struct_5_Fields;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_6_Values) < 0) __PYX_ERR(0, 1046, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_6_Values.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_6_Values.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_6_Values.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_6_Values.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_6_Values = &__pyx_type_12pyrosm_proto___pyx_scope_struct_6_Values;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_7_Setters) < 0) __PYX_ERR(0, 1059, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_7_Setters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_7_Setters.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_7_Setters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_7_Setters.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_7_Setters = &__pyx_type_12pyrosm_proto___pyx_scope_struct_7_Setters;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_8_Items) < 0) __PYX_ERR(0, 1776, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_8_Items.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_8_Items.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_8_Items.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_8_Items.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_8_Items = &__pyx_type_12pyrosm_proto___pyx_scope_struct_8_Items;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_9_Fields) < 0) __PYX_ERR(0, 1792, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_9_Fields.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_9_Fields.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_9_Fields.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_9_Fields.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_9_Fields = &__pyx_type_12pyrosm_proto___pyx_scope_struct_9_Fields;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_10_Values) < 0) __PYX_ERR(0, 1808, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_10_Values.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_10_Values.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_10_Values.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_10_Values.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_10_Values = &__pyx_type_12pyrosm_proto___pyx_scope_struct_10_Values;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_11_Setters) < 0) __PYX_ERR(0, 1826, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_11_Setters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_11_Setters.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_11_Setters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_11_Setters.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_11_Setters = &__pyx_type_12pyrosm_proto___pyx_scope_struct_11_Setters;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_12_Items) < 0) __PYX_ERR(0, 2334, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_12_Items.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_12_Items.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_12_Items.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_12_Items.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_12_Items = &__pyx_type_12pyrosm_proto___pyx_scope_struct_12_Items;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_13_Fields) < 0) __PYX_ERR(0, 2346, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_13_Fields.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_13_Fields.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_13_Fields.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_13_Fields.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_13_Fields = &__pyx_type_12pyrosm_proto___pyx_scope_struct_13_Fields;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_14_Values) < 0) __PYX_ERR(0, 2358, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_14_Values.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_14_Values.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_14_Values.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_14_Values.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_14_Values = &__pyx_type_12pyrosm_proto___pyx_scope_struct_14_Values;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_15_Setters) < 0) __PYX_ERR(0, 2372, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_15_Setters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_15_Setters.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_15_Setters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_15_Setters.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_15_Setters = &__pyx_type_12pyrosm_proto___pyx_scope_struct_15_Setters;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_16_Items) < 0) __PYX_ERR(0, 3005, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_16_Items.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_16_Items.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_16_Items.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_16_Items.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_16_Items = &__pyx_type_12pyrosm_proto___pyx_scope_struct_16_Items;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_17_Fields) < 0) __PYX_ERR(0, 3019, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_17_Fields.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_17_Fields.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_17_Fields.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_17_Fields.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_17_Fields = &__pyx_type_12pyrosm_proto___pyx_scope_struct_17_Fields;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_18_Values) < 0) __PYX_ERR(0, 3033, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_18_Values.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_18_Values.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_18_Values.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_18_Values.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_18_Values = &__pyx_type_12pyrosm_proto___pyx_scope_struct_18_Values;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_19_Setters) < 0) __PYX_ERR(0, 3049, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_19_Setters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_19_Setters.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_19_Setters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_19_Setters.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_19_Setters = &__pyx_type_12pyrosm_proto___pyx_scope_struct_19_Setters;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_20_Items) < 0) __PYX_ERR(0, 3799, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_20_Items.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_20_Items.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_20_Items.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_20_Items.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_20_Items = &__pyx_type_12pyrosm_proto___pyx_scope_struct_20_Items;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_21_Fields) < 0) __PYX_ERR(0, 3812, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_21_Fields.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_21_Fields.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_21_Fields.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_21_Fields.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_21_Fields = &__pyx_type_12pyrosm_proto___pyx_scope_struct_21_Fields;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_22_Values) < 0) __PYX_ERR(0, 3825, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_22_Values.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_22_Values.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_22_Values.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_22_Values.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_22_Values = &__pyx_type_12pyrosm_proto___pyx_scope_struct_22_Values;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_23_Setters) < 0) __PYX_ERR(0, 3840, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_23_Setters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_23_Setters.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_23_Setters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_23_Setters.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_23_Setters = &__pyx_type_12pyrosm_proto___pyx_scope_struct_23_Setters;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_24_Items) < 0) __PYX_ERR(0, 4220, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_24_Items.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_24_Items.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_24_Items.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_24_Items.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_24_Items = &__pyx_type_12pyrosm_proto___pyx_scope_struct_24_Items;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_25_Fields) < 0) __PYX_ERR(0, 4229, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_25_Fields.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_25_Fields.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_25_Fields.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_25_Fields.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_25_Fields = &__pyx_type_12pyrosm_proto___pyx_scope_struct_25_Fields;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_26_Values) < 0) __PYX_ERR(0, 4238, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_26_Values.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_26_Values.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_26_Values.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_26_Values.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_26_Values = &__pyx_type_12pyrosm_proto___pyx_scope_struct_26_Values;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_27_Setters) < 0) __PYX_ERR(0, 4249, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_27_Setters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_27_Setters.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_27_Setters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_27_Setters.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_27_Setters = &__pyx_type_12pyrosm_proto___pyx_scope_struct_27_Setters;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_28_Items) < 0) __PYX_ERR(0, 4776, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_28_Items.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_28_Items.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_28_Items.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_28_Items.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_28_Items = &__pyx_type_12pyrosm_proto___pyx_scope_struct_28_Items;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_29_Fields) < 0) __PYX_ERR(0, 4790, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_29_Fields.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_29_Fields.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_29_Fields.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_29_Fields.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_29_Fields = &__pyx_type_12pyrosm_proto___pyx_scope_struct_29_Fields;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_30_Values) < 0) __PYX_ERR(0, 4804, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_30_Values.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_30_Values.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_30_Values.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_30_Values.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_30_Values = &__pyx_type_12pyrosm_proto___pyx_scope_struct_30_Values;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_31_Setters) < 0) __PYX_ERR(0, 4820, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_31_Setters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_31_Setters.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_31_Setters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_31_Setters.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_31_Setters = &__pyx_type_12pyrosm_proto___pyx_scope_struct_31_Setters;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_32_Items) < 0) __PYX_ERR(0, 5554, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_32_Items.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_32_Items.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_32_Items.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_32_Items.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_32_Items = &__pyx_type_12pyrosm_proto___pyx_scope_struct_32_Items;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_33_Fields) < 0) __PYX_ERR(0, 5568, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_33_Fields.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_33_Fields.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_33_Fields.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_33_Fields.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_33_Fields = &__pyx_type_12pyrosm_proto___pyx_scope_struct_33_Fields;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_34_Values) < 0) __PYX_ERR(0, 5582, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_34_Values.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_34_Values.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_34_Values.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_34_Values.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_34_Values = &__pyx_type_12pyrosm_proto___pyx_scope_struct_34_Values;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_35_Setters) < 0) __PYX_ERR(0, 5598, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_35_Setters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_35_Setters.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_35_Setters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_35_Setters.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_35_Setters = &__pyx_type_12pyrosm_proto___pyx_scope_struct_35_Setters;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_36_Items) < 0) __PYX_ERR(0, 5968, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_36_Items.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_36_Items.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_36_Items.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_36_Items.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_36_Items = &__pyx_type_12pyrosm_proto___pyx_scope_struct_36_Items;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_37_Fields) < 0) __PYX_ERR(0, 5977, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_37_Fields.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_37_Fields.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_37_Fields.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_37_Fields.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_37_Fields = &__pyx_type_12pyrosm_proto___pyx_scope_struct_37_Fields;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_38_Values) < 0) __PYX_ERR(0, 5986, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_38_Values.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_38_Values.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_38_Values.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_38_Values.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_38_Values = &__pyx_type_12pyrosm_proto___pyx_scope_struct_38_Values;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_39_Setters) < 0) __PYX_ERR(0, 5997, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_39_Setters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_39_Setters.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_39_Setters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_39_Setters.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_39_Setters = &__pyx_type_12pyrosm_proto___pyx_scope_struct_39_Setters;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_40_Items) < 0) __PYX_ERR(0, 6656, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_40_Items.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_40_Items.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_40_Items.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_40_Items.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_40_Items = &__pyx_type_12pyrosm_proto___pyx_scope_struct_40_Items;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_41_Fields) < 0) __PYX_ERR(0, 6670, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_41_Fields.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_41_Fields.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_41_Fields.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_41_Fields.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_41_Fields = &__pyx_type_12pyrosm_proto___pyx_scope_struct_41_Fields;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_42_Values) < 0) __PYX_ERR(0, 6684, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_42_Values.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_42_Values.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_42_Values.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_42_Values.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_42_Values = &__pyx_type_12pyrosm_proto___pyx_scope_struct_42_Values;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_43_Setters) < 0) __PYX_ERR(0, 6700, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_43_Setters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_43_Setters.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_43_Setters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_43_Setters.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_43_Setters = &__pyx_type_12pyrosm_proto___pyx_scope_struct_43_Setters;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_44_Items) < 0) __PYX_ERR(0, 7376, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_44_Items.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_44_Items.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_44_Items.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_44_Items.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_44_Items = &__pyx_type_12pyrosm_proto___pyx_scope_struct_44_Items;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_45_Fields) < 0) __PYX_ERR(0, 7389, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_45_Fields.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_45_Fields.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_45_Fields.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_45_Fields.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_45_Fields = &__pyx_type_12pyrosm_proto___pyx_scope_struct_45_Fields;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_46_Values) < 0) __PYX_ERR(0, 7402, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_46_Values.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_46_Values.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_46_Values.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_46_Values.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_46_Values = &__pyx_type_12pyrosm_proto___pyx_scope_struct_46_Values;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_47_Setters) < 0) __PYX_ERR(0, 7417, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_47_Setters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_47_Setters.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_47_Setters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_47_Setters.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_47_Setters = &__pyx_type_12pyrosm_proto___pyx_scope_struct_47_Setters;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_48_Items) < 0) __PYX_ERR(0, 8067, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_48_Items.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_48_Items.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_48_Items.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_48_Items.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_48_Items = &__pyx_type_12pyrosm_proto___pyx_scope_struct_48_Items;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_49_Fields) < 0) __PYX_ERR(0, 8080, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_49_Fields.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_49_Fields.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_49_Fields.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_49_Fields.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_49_Fields = &__pyx_type_12pyrosm_proto___pyx_scope_struct_49_Fields;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_50_Values) < 0) __PYX_ERR(0, 8093, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_50_Values.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_50_Values.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_50_Values.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_50_Values.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_50_Values = &__pyx_type_12pyrosm_proto___pyx_scope_struct_50_Values;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_51_Setters) < 0) __PYX_ERR(0, 8108, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_51_Setters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_51_Setters.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_51_Setters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_51_Setters.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_51_Setters = &__pyx_type_12pyrosm_proto___pyx_scope_struct_51_Setters;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_52_Items) < 0) __PYX_ERR(0, 8902, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_52_Items.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_52_Items.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_52_Items.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_52_Items.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_52_Items = &__pyx_type_12pyrosm_proto___pyx_scope_struct_52_Items;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_53_Fields) < 0) __PYX_ERR(0, 8917, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_53_Fields.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_53_Fields.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_53_Fields.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_53_Fields.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_53_Fields = &__pyx_type_12pyrosm_proto___pyx_scope_struct_53_Fields;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_54_Values) < 0) __PYX_ERR(0, 8932, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_54_Values.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_54_Values.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_54_Values.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_54_Values.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_54_Values = &__pyx_type_12pyrosm_proto___pyx_scope_struct_54_Values;
  if (PyType_Ready(&__pyx_type_12pyrosm_proto___pyx_scope_struct_55_Setters) < 0) __PYX_ERR(0, 8954, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_12pyrosm_proto___pyx_scope_struct_55_Setters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_12pyrosm_proto___pyx_scope_struct_55_Setters.tp_dictoffset && __pyx_type_12pyrosm_proto___pyx_scope_struct_55_Setters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_12pyrosm_proto___pyx_scope_struct_55_Setters.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_12pyrosm_proto___pyx_scope_struct_55_Setters = &__pyx_type_12pyrosm_proto___pyx_scope_struct_55_Setters;
  __pyx_vtabptr_array = &__pyx_vtable_array;
  __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
  if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type___pyx_array.tp_print = 0;
  #endif
  if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
  __pyx_array_type = &__pyx_type___pyx_array;
  if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(2, 279, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type___pyx_MemviewEnum.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(2, 279, __pyx_L1_error)
  __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
  __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
  __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
  __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
  __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
  __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
  __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
  __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
  __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
  if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(2, 330, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type___pyx_memoryview.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(2, 330, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(2, 330, __pyx_L1_error)
  __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
  __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
  __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
  __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
  __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
  __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
  if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(2, 965, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type___pyx_memoryviewslice.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(2, 965, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(2, 965, __pyx_L1_error)
  __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(4, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(5, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("pyrobuf_list"); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_12pyrobuf_list_NullListener = __Pyx_ImportType(__pyx_t_1, "pyrobuf_list", "NullListener", sizeof(struct __pyx_obj_12pyrobuf_list_NullListener), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_12pyrobuf_list_NullListener) __PYX_ERR(6, 6, __pyx_L1_error)
  __pyx_vtabptr_12pyrobuf_list_NullListener = (struct __pyx_vtabstruct_12pyrobuf_list_NullListener*)__Pyx_GetVtable(__pyx_ptype_12pyrobuf_list_NullListener->tp_dict); if (unlikely(!__pyx_vtabptr_12pyrobuf_list_NullListener)) __PYX_ERR(6, 6, __pyx_L1_error)
  __pyx_ptype_12pyrobuf_list_TypedList = __Pyx_ImportType(__pyx_t_1, "pyrobuf_list", "TypedList", sizeof(struct __pyx_obj_12pyrobuf_list_TypedList), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_12pyrobuf_list_TypedList) __PYX_ERR(6, 12, __pyx_L1_error)
  __pyx_ptype_12pyrobuf_list_BytesList = __Pyx_ImportType(__pyx_t_1, "pyrobuf_list", "BytesList", sizeof(struct __pyx_obj_12pyrobuf_list_BytesList), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_12pyrobuf_list_BytesList) __PYX_ERR(6, 18, __pyx_L1_error)
  __pyx_ptype_12pyrobuf_list_StringList = __Pyx_ImportType(__pyx_t_1, "pyrobuf_list", "StringList", sizeof(struct __pyx_obj_12pyrobuf_list_StringList), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_12pyrobuf_list_StringList) __PYX_ERR(6, 23, __pyx_L1_error)
  __pyx_ptype_12pyrobuf_list_DoubleList = __Pyx_ImportType(__pyx_t_1, "pyrobuf_list", "DoubleList", sizeof(struct __pyx_obj_12pyrobuf_list_DoubleList), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_12pyrobuf_list_DoubleList) __PYX_ERR(6, 32, __pyx_L1_error)
  __pyx_vtabptr_12pyrobuf_list_DoubleList = (struct __pyx_vtabstruct_12pyrobuf_list_DoubleList*)__Pyx_GetVtable(__pyx_ptype_12pyrobuf_list_DoubleList->tp_dict); if (unlikely(!__pyx_vtabptr_12pyrobuf_list_DoubleList)) __PYX_ERR(6, 32, __pyx_L1_error)
  __pyx_ptype_12pyrobuf_list_FloatList = __Pyx_ImportType(__pyx_t_1, "pyrobuf_list", "FloatList", sizeof(struct __pyx_obj_12pyrobuf_list_FloatList), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_12pyrobuf_list_FloatList) __PYX_ERR(6, 53, __pyx_L1_error)
  __pyx_vtabptr_12pyrobuf_list_FloatList = (struct __pyx_vtabstruct_12pyrobuf_list_FloatList*)__Pyx_GetVtable(__pyx_ptype_12pyrobuf_list_FloatList->tp_dict); if (unlikely(!__pyx_vtabptr_12pyrobuf_list_FloatList)) __PYX_ERR(6, 53, __pyx_L1_error)
  __pyx_ptype_12pyrobuf_list_IntList = __Pyx_ImportType(__pyx_t_1, "pyrobuf_list", "IntList", sizeof(struct __pyx_obj_12pyrobuf_list_IntList), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_12pyrobuf_list_IntList) __PYX_ERR(6, 74, __pyx_L1_error)
  __pyx_vtabptr_12pyrobuf_list_IntList = (struct __pyx_vtabstruct_12pyrobuf_list_IntList*)__Pyx_GetVtable(__pyx_ptype_12pyrobuf_list_IntList->tp_dict); if (unlikely(!__pyx_vtabptr_12pyrobuf_list_IntList)) __PYX_ERR(6, 74, __pyx_L1_error)
  __pyx_ptype_12pyrobuf_list_Int32List = __Pyx_ImportType(__pyx_t_1, "pyrobuf_list", "Int32List", sizeof(struct __pyx_obj_12pyrobuf_list_Int32List), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_12pyrobuf_list_Int32List) __PYX_ERR(6, 95, __pyx_L1_error)
  __pyx_vtabptr_12pyrobuf_list_Int32List = (struct __pyx_vtabstruct_12pyrobuf_list_Int32List*)__Pyx_GetVtable(__pyx_ptype_12pyrobuf_list_Int32List->tp_dict); if (unlikely(!__pyx_vtabptr_12pyrobuf_list_Int32List)) __PYX_ERR(6, 95, __pyx_L1_error)
  __pyx_ptype_12pyrobuf_list_Uint32List = __Pyx_ImportType(__pyx_t_1, "pyrobuf_list", "Uint32List", sizeof(struct __pyx_obj_12pyrobuf_list_Uint32List), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_12pyrobuf_list_Uint32List) __PYX_ERR(6, 116, __pyx_L1_error)
  __pyx_vtabptr_12pyrobuf_list_Uint32List = (struct __pyx_vtabstruct_12pyrobuf_list_Uint32List*)__Pyx_GetVtable(__pyx_ptype_12pyrobuf_list_Uint32List->tp_dict); if (unlikely(!__pyx_vtabptr_12pyrobuf_list_Uint32List)) __PYX_ERR(6, 116, __pyx_L1_error)
  __pyx_ptype_12pyrobuf_list_Int64List = __Pyx_ImportType(__pyx_t_1, "pyrobuf_list", "Int64List", sizeof(struct __pyx_obj_12pyrobuf_list_Int64List), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_12pyrobuf_list_Int64List) __PYX_ERR(6, 137, __pyx_L1_error)
  __pyx_vtabptr_12pyrobuf_list_Int64List = (struct __pyx_vtabstruct_12pyrobuf_list_Int64List*)__Pyx_GetVtable(__pyx_ptype_12pyrobuf_list_Int64List->tp_dict); if (unlikely(!__pyx_vtabptr_12pyrobuf_list_Int64List)) __PYX_ERR(6, 137, __pyx_L1_error)
  __pyx_ptype_12pyrobuf_list_Uint64List = __Pyx_ImportType(__pyx_t_1, "pyrobuf_list", "Uint64List", sizeof(struct __pyx_obj_12pyrobuf_list_Uint64List), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_12pyrobuf_list_Uint64List) __PYX_ERR(6, 158, __pyx_L1_error)
  __pyx_vtabptr_12pyrobuf_list_Uint64List = (struct __pyx_vtabstruct_12pyrobuf_list_Uint64List*)__Pyx_GetVtable(__pyx_ptype_12pyrobuf_list_Uint64List->tp_dict); if (unlikely(!__pyx_vtabptr_12pyrobuf_list_Uint64List)) __PYX_ERR(6, 158, __pyx_L1_error)
  __pyx_ptype_12pyrobuf_list_CharList = __Pyx_ImportType(__pyx_t_1, "pyrobuf_list", "CharList", sizeof(struct __pyx_obj_12pyrobuf_list_CharList), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_12pyrobuf_list_CharList) __PYX_ERR(6, 179, __pyx_L1_error)
  __pyx_vtabptr_12pyrobuf_list_CharList = (struct __pyx_vtabstruct_12pyrobuf_list_CharList*)__Pyx_GetVtable(__pyx_ptype_12pyrobuf_list_CharList->tp_dict); if (unlikely(!__pyx_vtabptr_12pyrobuf_list_CharList)) __PYX_ERR(6, 179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __pyx_t_1 = PyImport_ImportModule("pyrobuf_list"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "null_listener", (void **)&__pyx_vp_12pyrobuf_list_null_listener, "struct __pyx_obj_12pyrobuf_list_NullListener *") < 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 = PyImport_ImportModule("pyrobuf_util"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "get_varint32", (void (**)(void))&__pyx_f_12pyrobuf_util_get_varint32, "int32_t (unsigned char const *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "get_varint64", (void (**)(void))&__pyx_f_12pyrobuf_util_get_varint64, "int64_t (unsigned char const *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "get_signed_varint32", (void (**)(void))&__pyx_f_12pyrobuf_util_get_signed_varint32, "int32_t (unsigned char const *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "get_signed_varint64", (void (**)(void))&__pyx_f_12pyrobuf_util_get_signed_varint64, "int64_t (unsigned char const *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "set_varint32", (void (**)(void))&__pyx_f_12pyrobuf_util_set_varint32, "int (int32_t, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "set_varint64", (void (**)(void))&__pyx_f_12pyrobuf_util_set_varint64, "int (int64_t, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "set_signed_varint32", (void (**)(void))&__pyx_f_12pyrobuf_util_set_signed_varint32, "int (int32_t, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "set_signed_varint64", (void (**)(void))&__pyx_f_12pyrobuf_util_set_signed_varint64, "int (int64_t, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "skip_generic", (void (**)(void))&__pyx_f_12pyrobuf_util_skip_generic, "int (unsigned char const *, int *, int, int)") < 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


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initpyrosm_proto(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initpyrosm_proto(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_pyrosm_proto(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_pyrosm_proto(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_pyrosm_proto(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;
  static PyThread_type_lock __pyx_t_5[8];
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'pyrosm_proto' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_pyrosm_proto(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__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("pyrosm_proto", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_pyrosm_proto) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "pyrosm_proto")) {
      if (unlikely(PyDict_SetItemString(modules, "pyrosm_proto", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (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

  /* "pyrosm_proto.pyx":8
 * from pyrobuf_util cimport *
 * 
 * import base64             # <<<<<<<<<<<<<<
 * import json
 * import warnings
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_base64, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_base64, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":9
 * 
 * import base64
 * import json             # <<<<<<<<<<<<<<
 * import warnings
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_json, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_json, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":10
 * import base64
 * import json
 * import warnings             # <<<<<<<<<<<<<<
 * 
 * class DecodeError(Exception):
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":12
 * import warnings
 * 
 * class DecodeError(Exception):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_DecodeError, __pyx_n_s_DecodeError, (PyObject *) NULL, __pyx_n_s_pyrosm_proto, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DecodeError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DecodeError, __pyx_t_4) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrosm_proto.pyx":328
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_12pyrosm_proto_Blob, __pyx_n_s_FromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pyrosm_proto.pyx":327
 *         return buf
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def FromString(cls, s):
 *         message = cls()
 */
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_Blob->tp_dict, __pyx_n_s_FromString, __pyx_t_2) < 0) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_Blob);

  /* "pyrosm_proto.pyx":845
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_12pyrosm_proto_BlobHeader, __pyx_n_s_FromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pyrosm_proto.pyx":844
 *         return buf
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def FromString(cls, s):
 *         message = cls()
 */
  __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); 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 (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_BlobHeader->tp_dict, __pyx_n_s_FromString, __pyx_t_1) < 0) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_BlobHeader);

  /* "pyrosm_proto.pyx":1521
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_12pyrosm_proto_HeaderBlock, __pyx_n_s_FromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pyrosm_proto.pyx":1520
 *         return buf
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def FromString(cls, s):
 *         message = cls()
 */
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_HeaderBlock->tp_dict, __pyx_n_s_FromString, __pyx_t_2) < 0) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_HeaderBlock);

  /* "pyrosm_proto.pyx":2135
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_12pyrosm_proto_HeaderBBox, __pyx_n_s_FromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pyrosm_proto.pyx":2134
 *         return buf
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def FromString(cls, s):
 *         message = cls()
 */
  __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_HeaderBBox->tp_dict, __pyx_n_s_FromString, __pyx_t_1) < 0) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_HeaderBBox);

  /* "pyrosm_proto.pyx":2771
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_12pyrosm_proto_PrimitiveBlock, __pyx_n_s_FromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pyrosm_proto.pyx":2770
 *         return buf
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def FromString(cls, s):
 *         message = cls()
 */
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_PrimitiveBlock->tp_dict, __pyx_n_s_FromString, __pyx_t_2) < 0) __PYX_ERR(0, 2771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_PrimitiveBlock);

  /* "pyrosm_proto.pyx":3520
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_12pyrosm_proto_PrimitiveGroup, __pyx_n_s_FromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pyrosm_proto.pyx":3519
 *         return buf
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def FromString(cls, s):
 *         message = cls()
 */
  __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_PrimitiveGroup->tp_dict, __pyx_n_s_FromString, __pyx_t_1) < 0) __PYX_ERR(0, 3520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_PrimitiveGroup);

  /* "pyrosm_proto.pyx":4078
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_12pyrosm_proto_StringTable, __pyx_n_s_FromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pyrosm_proto.pyx":4077
 *         return buf
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def FromString(cls, s):
 *         message = cls()
 */
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_StringTable->tp_dict, __pyx_n_s_FromString, __pyx_t_2) < 0) __PYX_ERR(0, 4078, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_StringTable);

  /* "pyrosm_proto.pyx":4577
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_12pyrosm_proto_Info, __pyx_n_s_FromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pyrosm_proto.pyx":4576
 *         return buf
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def FromString(cls, s):
 *         message = cls()
 */
  __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_Info->tp_dict, __pyx_n_s_FromString, __pyx_t_1) < 0) __PYX_ERR(0, 4577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_Info);

  /* "pyrosm_proto.pyx":5312
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_12pyrosm_proto_DenseInfo, __pyx_n_s_FromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pyrosm_proto.pyx":5311
 *         return buf
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def FromString(cls, s):
 *         message = cls()
 */
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_DenseInfo->tp_dict, __pyx_n_s_FromString, __pyx_t_2) < 0) __PYX_ERR(0, 5312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_DenseInfo);

  /* "pyrosm_proto.pyx":5823
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_12pyrosm_proto_ChangeSet, __pyx_n_s_FromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pyrosm_proto.pyx":5822
 *         return buf
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def FromString(cls, s):
 *         message = cls()
 */
  __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_ChangeSet->tp_dict, __pyx_n_s_FromString, __pyx_t_1) < 0) __PYX_ERR(0, 5823, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_ChangeSet);

  /* "pyrosm_proto.pyx":6410
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_12pyrosm_proto_Node, __pyx_n_s_FromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pyrosm_proto.pyx":6409
 *         return buf
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def FromString(cls, s):
 *         message = cls()
 */
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_Node->tp_dict, __pyx_n_s_FromString, __pyx_t_2) < 0) __PYX_ERR(0, 6410, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_Node);

  /* "pyrosm_proto.pyx":7146
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_12pyrosm_proto_DenseNodes, __pyx_n_s_FromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pyrosm_proto.pyx":7145
 *         return buf
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def FromString(cls, s):
 *         message = cls()
 */
  __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_DenseNodes->tp_dict, __pyx_n_s_FromString, __pyx_t_1) < 0) __PYX_ERR(0, 7146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_DenseNodes);

  /* "pyrosm_proto.pyx":7838
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_12pyrosm_proto_Way, __pyx_n_s_FromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "pyrosm_proto.pyx":7837
 *         return buf
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def FromString(cls, s):
 *         message = cls()
 */
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_Way->tp_dict, __pyx_n_s_FromString, __pyx_t_2) < 0) __PYX_ERR(0, 7838, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_Way);

  /* "pyrosm_proto.pyx":8635
 * 
 *     @classmethod
 *     def FromString(cls, s):             # <<<<<<<<<<<<<<
 *         message = cls()
 *         message.MergeFromString(s)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_12pyrosm_proto_Relation, __pyx_n_s_FromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pyrosm_proto.pyx":8634
 *         return buf
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def FromString(cls, s):
 *         message = cls()
 */
  __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_Relation->tp_dict, __pyx_n_s_FromString, __pyx_t_1) < 0) __PYX_ERR(0, 8635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_Relation);

  /* "pyrosm_proto.pyx":8949
 * 
 * 
 *     NODE = _RelationMemberType_NODE             # <<<<<<<<<<<<<<
 *     WAY = _RelationMemberType_WAY
 *     RELATION = _RelationMemberType_RELATION
 */
  __pyx_t_1 = __Pyx_PyInt_From_enum____pyx_t_12pyrosm_proto__RelationMemberType(__pyx_e_12pyrosm_proto__RelationMemberType_NODE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_Relation->tp_dict, __pyx_n_s_NODE, __pyx_t_1) < 0) __PYX_ERR(0, 8949, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_Relation);

  /* "pyrosm_proto.pyx":8950
 * 
 *     NODE = _RelationMemberType_NODE
 *     WAY = _RelationMemberType_WAY             # <<<<<<<<<<<<<<
 *     RELATION = _RelationMemberType_RELATION
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_enum____pyx_t_12pyrosm_proto__RelationMemberType(__pyx_e_12pyrosm_proto__RelationMemberType_WAY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_Relation->tp_dict, __pyx_n_s_WAY, __pyx_t_1) < 0) __PYX_ERR(0, 8950, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_Relation);

  /* "pyrosm_proto.pyx":8951
 *     NODE = _RelationMemberType_NODE
 *     WAY = _RelationMemberType_WAY
 *     RELATION = _RelationMemberType_RELATION             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_enum____pyx_t_12pyrosm_proto__RelationMemberType(__pyx_e_12pyrosm_proto__RelationMemberType_RELATION); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_12pyrosm_proto_Relation->tp_dict, __pyx_n_s_RELATION, __pyx_t_1) < 0) __PYX_ERR(0, 8951, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_12pyrosm_proto_Relation);

  /* "pyrosm_proto.pyx":1
 * from libc.stdint cimport *             # <<<<<<<<<<<<<<
 * from libc.string cimport *
 * from cpython.ref cimport PyObject
 */
  __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;

  /* "View.MemoryView":209
 *         info.obj = self
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(array self):
 */
  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(2, 209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_array_type);

  /* "View.MemoryView":286
 *         return self.name
 * 
 * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__204, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(generic);
  __Pyx_DECREF_SET(generic, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":287
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
 * cdef indirect = Enum("<strided and indirect>")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__205, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(strided);
  __Pyx_DECREF_SET(strided, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":288
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__206, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(indirect);
  __Pyx_DECREF_SET(indirect, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":291
 * 
 * 
 * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__207, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(contiguous);
  __Pyx_DECREF_SET(contiguous, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":292
 * 
 * cdef contiguous = Enum("<contiguous and direct>")
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__208, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(indirect_contiguous);
  __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":316
 * 
 * DEF THREAD_LOCKS_PREALLOCATED = 8
 * cdef int __pyx_memoryview_thread_locks_used = 0             # <<<<<<<<<<<<<<
 * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [
 *     PyThread_allocate_lock(),
 */
  __pyx_memoryview_thread_locks_used = 0;

  /* "View.MemoryView":317
 * DEF THREAD_LOCKS_PREALLOCATED = 8
 * cdef int __pyx_memoryview_thread_locks_used = 0
 * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [             # <<<<<<<<<<<<<<
 *     PyThread_allocate_lock(),
 *     PyThread_allocate_lock(),
 */
  __pyx_t_5[0] = PyThread_allocate_lock();
  __pyx_t_5[1] = PyThread_allocate_lock();
  __pyx_t_5[2] = PyThread_allocate_lock();
  __pyx_t_5[3] = PyThread_allocate_lock();
  __pyx_t_5[4] = PyThread_allocate_lock();
  __pyx_t_5[5] = PyThread_allocate_lock();
  __pyx_t_5[6] = PyThread_allocate_lock();
  __pyx_t_5[7] = PyThread_allocate_lock();
  memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_5, sizeof(__pyx_memoryview_thread_locks[0]) * (8));

  /* "View.MemoryView":549
 *         info.obj = self
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(2, 549, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_memoryview_type);

  /* "View.MemoryView":995
 *         return self.from_object
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(2, 995, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_memoryviewslice_type);

  /* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init pyrosm_proto", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init pyrosm_proto");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* 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

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod0 */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_ASSUME_SAFE_MACROS
    args = PyTuple_New(1);
    if (unlikely(!args)) goto bad;
    Py_INCREF(self);
    PyTuple_SET_ITEM(args, 0, self);
#else
    args = PyTuple_Pack(1, self);
    if (unlikely(!args)) goto bad;
#endif
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    Py_DECREF(args);
bad:
    return result;
}

/* py_dict_items */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
    else
        return PyDict_Items(d);
}

/* 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;
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* 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

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* 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

/* 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

/* 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);
}

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* StringJoin */
#if !CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
}
#endif

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* 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_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* 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
}

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* 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;
}

/* 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;
}

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* None */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* 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, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    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)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    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);
}

/* 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;
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
            if (PY_VERSION_HEX >= 0x030700A0) {
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            } else {
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            }
        } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 1, arg);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
}

/* append */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* MemviewSliceInit */
static int
__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
                        int ndim,
                        __Pyx_memviewslice *memviewslice,
                        int memview_is_new_reference)
{
    __Pyx_RefNannyDeclarations
    int i, retval=-1;
    Py_buffer *buf = &memview->view;
    __Pyx_RefNannySetupContext("init_memviewslice", 0);
    if (memviewslice->memview || memviewslice->data) {
        PyErr_SetString(PyExc_ValueError,
            "memviewslice is already initialized!");
        goto fail;
    }
    if (buf->strides) {
        for (i = 0; i < ndim; i++) {
            memviewslice->strides[i] = buf->strides[i];
        }
    } else {
        Py_ssize_t stride = buf->itemsize;
        for (i = ndim - 1; i >= 0; i--) {
            memviewslice->strides[i] = stride;
            stride *= buf->shape[i];
        }
    }
    for (i = 0; i < ndim; i++) {
        memviewslice->shape[i]   = buf->shape[i];
        if (buf->suboffsets) {
            memviewslice->suboffsets[i] = buf->suboffsets[i];
        } else {
            memviewslice->suboffsets[i] = -1;
        }
    }
    memviewslice->memview = memview;
    memviewslice->data = (char *)buf->buf;
    if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
        Py_INCREF(memview);
    }
    retval = 0;
    goto no_fail;
fail:
    memviewslice->memview = 0;
    memviewslice->data = 0;
    retval = -1;
no_fail:
    __Pyx_RefNannyFinishContext();
    return retval;
}
#ifndef Py_NO_RETURN
#define Py_NO_RETURN
#endif
static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
    va_list vargs;
    char msg[200];
#ifdef HAVE_STDARG_PROTOTYPES
    va_start(vargs, fmt);
#else
    va_start(vargs);
#endif
    vsnprintf(msg, 200, fmt, vargs);
    va_end(vargs);
    Py_FatalError(msg);
}
static CYTHON_INLINE int
__pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
                                   PyThread_type_lock lock)
{
    int result;
    PyThread_acquire_lock(lock, 1);
    result = (*acquisition_count)++;
    PyThread_release_lock(lock);
    return result;
}
static CYTHON_INLINE int
__pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
                                   PyThread_type_lock lock)
{
    int result;
    PyThread_acquire_lock(lock, 1);
    result = (*acquisition_count)--;
    PyThread_release_lock(lock);
    return result;
}
static CYTHON_INLINE void
__Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
{
    int first_time;
    struct __pyx_memoryview_obj *memview = memslice->memview;
    if (!memview || (PyObject *) memview == Py_None)
        return;
    if (__pyx_get_slice_count(memview) < 0)
        __pyx_fatalerror("Acquisition count is %d (line %d)",
                         __pyx_get_slice_count(memview), lineno);
    first_time = __pyx_add_acquisition_count(memview) == 0;
    if (first_time) {
        if (have_gil) {
            Py_INCREF((PyObject *) memview);
        } else {
            PyGILState_STATE _gilstate = PyGILState_Ensure();
            Py_INCREF((PyObject *) memview);
            PyGILState_Release(_gilstate);
        }
    }
}
static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
                                             int have_gil, int lineno) {
    int last_time;
    struct __pyx_memoryview_obj *memview = memslice->memview;
    if (!memview ) {
        return;
    } else if ((PyObject *) memview == Py_None) {
        memslice->memview = NULL;
        return;
    }
    if (__pyx_get_slice_count(memview) <= 0)
        __pyx_fatalerror("Acquisition count is %d (line %d)",
                         __pyx_get_slice_count(memview), lineno);
    last_time = __pyx_sub_acquisition_count(memview) == 1;
    memslice->data = NULL;
    if (last_time) {
        if (have_gil) {
            Py_CLEAR(memslice->memview);
        } else {
            PyGILState_STATE _gilstate = PyGILState_Ensure();
            Py_CLEAR(memslice->memview);
            PyGILState_Release(_gilstate);
        }
    } else {
        memslice->memview = NULL;
    }
}

/* None */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* BufferIndexError */
static void __Pyx_RaiseBufferIndexError(int axis) {
  PyErr_Format(PyExc_IndexError,
     "Out of bounds on buffer access (axis %d)", axis);
}

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_FALSE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_FALSE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* None */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
    Py_ssize_t q = a / b;
    Py_ssize_t r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

/* 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

/* decode_c_string */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    Py_ssize_t length;
    if (unlikely((start < 0) | (stop < 0))) {
        size_t slen = strlen(cstring);
        if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
            PyErr_SetString(PyExc_OverflowError,
                            "c-string too long to convert to Python");
            return NULL;
        }
        length = (Py_ssize_t) slen;
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    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);
    }
}

/* 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);
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* 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, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* None */
static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
    long q = a / b;
    long r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

/* 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;
}

/* 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;
    }
}

/* 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_2);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_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 __PYX_GOOD;
#else
    if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto __PYX_BAD;
            ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            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 __PYX_BAD;
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
    size_t size, enum __Pyx_ImportType_CheckSize check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#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 ((size_t)basicsize < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* GetVTable */
static void* __Pyx_GetVtable(PyObject *dict) {
    void* ptr;
    PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable);
    if (!ob)
        goto bad;
#if PY_VERSION_HEX >= 0x02070000
    ptr = PyCapsule_GetPointer(ob, 0);
#else
    ptr = PyCObject_AsVoidPtr(ob);
#endif
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

/* 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;
}

/* ClassMethod */
static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000
    if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) {
        return PyClassMethod_New(method);
    }
#else
#if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY
    if (PyMethodDescr_Check(method))
#else
    static PyTypeObject *methoddescr_type = NULL;
    if (methoddescr_type == NULL) {
       PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append");
       if (!meth) return NULL;
       methoddescr_type = Py_TYPE(meth);
       Py_DECREF(meth);
    }
    if (__Pyx_TypeCheck(method, methoddescr_type))
#endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
        #if PY_VERSION_HEX < 0x03020000
        PyTypeObject *d_type = descr->d_type;
        #else
        PyTypeObject *d_type = descr->d_common.d_type;
        #endif
        return PyDescr_NewClassMethod(d_type, descr->d_method);
    }
#endif
    else if (PyMethod_Check(method)) {
        return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
    }
    else if (PyCFunction_Check(method)) {
        return PyClassMethod_New(method);
    }
#ifdef __Pyx_CyFunction_USED
    else if (__Pyx_CyFunction_Check(method)) {
        return PyClassMethod_New(method);
    }
#endif
    PyErr_SetString(PyExc_TypeError,
                   "Class-level classmethod() can only be called on "
                   "a method_descriptor or instance method.");
    return NULL;
}

/* GetNameInClass */
static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) {
    PyObject *result;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    __Pyx_GetModuleGlobalNameUncached(result, name);
    return result;
}
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    result = __Pyx_PyObject_GetAttrStr(nmspace, name);
    if (!result) {
        result = __Pyx_GetGlobalNameAfterAttributeLookup(name);
    }
    return result;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
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);
}

#if PY_MAJOR_VERSION < 3
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
    if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
        if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
        if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
    PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
    return -1;
}
static void __Pyx_ReleaseBuffer(Py_buffer *view) {
    PyObject *obj = view->obj;
    if (!obj) return;
    if (PyObject_CheckBuffer(obj)) {
        PyBuffer_Release(view);
        return;
    }
    if ((0)) {}
    view->obj = NULL;
    Py_DECREF(obj);
}
#endif


/* MemviewSliceIsContig */
static int
__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
{
    int i, index, step, start;
    Py_ssize_t itemsize = mvs.memview->view.itemsize;
    if (order == 'F') {
        step = 1;
        start = 0;
    } else {
        step = -1;
        start = ndim - 1;
    }
    for (i = 0; i < ndim; i++) {
        index = start + step * i;
        if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
            return 0;
        itemsize *= mvs.shape[index];
    }
    return 1;
}

/* OverlappingSlices */
static void
__pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
                               void **out_start, void **out_end,
                               int ndim, size_t itemsize)
{
    char *start, *end;
    int i;
    start = end = slice->data;
    for (i = 0; i < ndim; i++) {
        Py_ssize_t stride = slice->strides[i];
        Py_ssize_t extent = slice->shape[i];
        if (extent == 0) {
            *out_start = *out_end = start;
            return;
        } else {
            if (stride > 0)
                end += stride * (extent - 1);
            else
                start += stride * (extent - 1);
        }
    }
    *out_start = start;
    *out_end = end + itemsize;
}
static int
__pyx_slices_overlap(__Pyx_memviewslice *slice1,
                     __Pyx_memviewslice *slice2,
                     int ndim, size_t itemsize)
{
    void *start1, *end1, *start2, *end2;
    __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
    __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
    return (start1 < end2) && (start2 < end1);
}

/* Capsule */
static CYTHON_INLINE PyObject *
__pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
{
    PyObject *cobj;
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(p, sig, NULL);
#else
    cobj = PyCObject_FromVoidPtr(p, NULL);
#endif
    return cobj;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_12pyrosm_proto__RelationMemberType(enum __pyx_t_12pyrosm_proto__RelationMemberType value) {
    const enum __pyx_t_12pyrosm_proto__RelationMemberType neg_one = (enum __pyx_t_12pyrosm_proto__RelationMemberType) ((enum __pyx_t_12pyrosm_proto__RelationMemberType) 0 - (enum __pyx_t_12pyrosm_proto__RelationMemberType) 1), const_zero = (enum __pyx_t_12pyrosm_proto__RelationMemberType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_12pyrosm_proto__RelationMemberType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_12pyrosm_proto__RelationMemberType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_12pyrosm_proto__RelationMemberType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_12pyrosm_proto__RelationMemberType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_12pyrosm_proto__RelationMemberType) <= 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(enum __pyx_t_12pyrosm_proto__RelationMemberType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
    const int32_t neg_one = (int32_t) ((int32_t) 0 - (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);
    }
}

/* 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) ((int) 0 - (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_int64_t(int64_t value) {
    const int64_t neg_one = (int64_t) ((int64_t) 0 - (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_uint64_t(uint64_t value) {
    const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (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);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) {
    const uint32_t neg_one = (uint32_t) ((uint32_t) 0 - (uint32_t) 1), const_zero = (uint32_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint32_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(uint32_t),
                                     little, !is_unsigned);
    }
}

/* MemviewDtypeToObject */
static CYTHON_INLINE PyObject *__pyx_memview_get_nn_int32_t(const char *itemp) {
    return (PyObject *) __Pyx_PyInt_From_int32_t(*(int32_t *) itemp);
}
static CYTHON_INLINE int __pyx_memview_set_nn_int32_t(const char *itemp, PyObject *obj) {
    int32_t value = __Pyx_PyInt_As_int32_t(obj);
    if ((value == ((int32_t)-1)) && PyErr_Occurred())
        return 0;
    *(int32_t *) itemp = value;
    return 1;
}

/* MemviewDtypeToObject */
static CYTHON_INLINE PyObject *__pyx_memview_get_nn_int64_t(const char *itemp) {
    return (PyObject *) __Pyx_PyInt_From_int64_t(*(int64_t *) itemp);
}
static CYTHON_INLINE int __pyx_memview_set_nn_int64_t(const char *itemp, PyObject *obj) {
    int64_t value = __Pyx_PyInt_As_int64_t(obj);
    if ((value == ((int64_t)-1)) && PyErr_Occurred())
        return 0;
    *(int64_t *) itemp = value;
    return 1;
}

/* MemviewDtypeToObject */
static CYTHON_INLINE PyObject *__pyx_memview_get_nn_uint32_t(const char *itemp) {
    return (PyObject *) __Pyx_PyInt_From_uint32_t(*(uint32_t *) itemp);
}
static CYTHON_INLINE int __pyx_memview_set_nn_uint32_t(const char *itemp, PyObject *obj) {
    uint32_t value = __Pyx_PyInt_As_uint32_t(obj);
    if ((value == ((uint32_t)-1)) && PyErr_Occurred())
        return 0;
    *(uint32_t *) itemp = value;
    return 1;
}

/* MemviewSliceCopyTemplate */
static __Pyx_memviewslice
__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
                                 const char *mode, int ndim,
                                 size_t sizeof_dtype, int contig_flag,
                                 int dtype_is_object)
{
    __Pyx_RefNannyDeclarations
    int i;
    __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
    struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
    Py_buffer *buf = &from_memview->view;
    PyObject *shape_tuple = NULL;
    PyObject *temp_int = NULL;
    struct __pyx_array_obj *array_obj = NULL;
    struct __pyx_memoryview_obj *memview_obj = NULL;
    __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
    for (i = 0; i < ndim; i++) {
        if (from_mvs->suboffsets[i] >= 0) {
            PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
                                           "indirect dimensions (axis %d)", i);
            goto fail;
        }
    }
    shape_tuple = PyTuple_New(ndim);
    if (unlikely(!shape_tuple)) {
        goto fail;
    }
    __Pyx_GOTREF(shape_tuple);
    for(i = 0; i < ndim; i++) {
        temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
        if(unlikely(!temp_int)) {
            goto fail;
        } else {
            PyTuple_SET_ITEM(shape_tuple, i, temp_int);
            temp_int = NULL;
        }
    }
    array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
    if (unlikely(!array_obj)) {
        goto fail;
    }
    __Pyx_GOTREF(array_obj);
    memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
                                    (PyObject *) array_obj, contig_flag,
                                    dtype_is_object,
                                    from_mvs->memview->typeinfo);
    if (unlikely(!memview_obj))
        goto fail;
    if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
        goto fail;
    if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
                                                dtype_is_object) < 0))
        goto fail;
    goto no_fail;
fail:
    __Pyx_XDECREF(new_mvs.memview);
    new_mvs.memview = NULL;
    new_mvs.data = NULL;
no_fail:
    __Pyx_XDECREF(shape_tuple);
    __Pyx_XDECREF(temp_int);
    __Pyx_XDECREF(array_obj);
    __Pyx_RefNannyFinishContext();
    return new_mvs;
}

/* CIntFromPy */
static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *x) {
    const int32_t neg_one = (int32_t) ((int32_t) 0 - (int32_t) 1), const_zero = (int32_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int32_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int32_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int32_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int32_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int32_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(int32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 2 * PyLong_SHIFT) {
                            return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 3 * PyLong_SHIFT) {
                            return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 4 * PyLong_SHIFT) {
                            return (int32_t) (((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int32_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int32_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int32_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int32_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int32_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int32_t) ((((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int32_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int32_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int32_t) -1;
        }
    } else {
        int32_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int32_t) -1;
        val = __Pyx_PyInt_As_int32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int32_t");
    return (int32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int32_t");
    return (int32_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) ((int) 0 - (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 int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
    const int64_t neg_one = (int64_t) ((int64_t) 0 - (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 uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) {
    const uint32_t neg_one = (uint32_t) ((uint32_t) 0 - (uint32_t) 1), const_zero = (uint32_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint32_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint32_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint32_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 (uint32_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT) {
                            return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT) {
                            return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_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(uint32_t) >= 4 * PyLong_SHIFT) {
                            return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_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 (uint32_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint32_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_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 (uint32_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint32_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint32_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint32_t) ((((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_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(uint32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_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(uint32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint32_t) ((((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint32_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_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
            uint32_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 (uint32_t) -1;
        }
    } else {
        uint32_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint32_t) -1;
        val = __Pyx_PyInt_As_uint32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint32_t");
    return (uint32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint32_t");
    return (uint32_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
    const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (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;
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) ((long) 0 - (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;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) ((long) 0 - (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);
    }
}

/* CIntFromPy */
static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
    const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(char) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (char) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (char) 0;
                case  1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
                            return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
                            return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
                            return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (char) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(char) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (char) 0;
                case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(char,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(char) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            char val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (char) -1;
        }
    } else {
        char val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (char) -1;
        val = __Pyx_PyInt_As_char(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to char");
    return (char) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to char");
    return (char) -1;
}

/* CoroutineBase */
#include <structmember.h>
#include <frameobject.h>
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *t, *v, *tb;
    t = exc_state->exc_type;
    v = exc_state->exc_value;
    tb = exc_state->exc_traceback;
    exc_state->exc_type = NULL;
    exc_state->exc_value = NULL;
    exc_state->exc_traceback = NULL;
    Py_XDECREF(t);
    Py_XDECREF(v);
    Py_XDECREF(tb);
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_Check(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    exc_state = &self->gi_exc_state;
    if (exc_state->exc_type) {
        #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
        #else
        if (exc_state->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = tstate->frame;
        }
        #endif
    }
#if CYTHON_USE_EXC_INFO_STACK
    exc_state->previous_item = tstate->exc_info;
    tstate->exc_info = exc_state;
#else
    if (exc_state->exc_type) {
        __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(exc_state);
        __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    }
#endif
    self->is_running = 1;
    retval = self->body((PyObject *) self, tstate, value);
    self->is_running = 0;
#if CYTHON_USE_EXC_INFO_STACK
    exc_state = &self->gi_exc_state;
    tstate->exc_info = exc_state->previous_item;
    exc_state->previous_item = NULL;
    __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
#endif
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *exc_tb = exc_state->exc_traceback;
    if (likely(exc_tb)) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
#endif
    }
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = Py_TYPE(yf)->tp_iternext(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
            ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
    return __Pyx_Coroutine_Close(self);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_Check(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_Check(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            if (likely(args)) {
                ret = PyObject_CallObject(meth, args);
            } else {
                ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_code);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
#if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_name;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_qualname;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    Py_XINCREF(code);
    gen->gi_code = code;
    PyObject_GC_Track(gen);
    return gen;
}

/* PatchModuleWithCoroutine */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
#ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* IsLittleEndian */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
{
  union {
    uint32_t u32;
    uint8_t u8[4];
  } S;
  S.u32 = 0x01020304;
  return S.u8[0] == 4;
}

/* BufferFormatCheck */
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type) {
  stack[0].field = &ctx->root;
  stack[0].parent_offset = 0;
  ctx->root.type = type;
  ctx->root.name = "buffer dtype";
  ctx->root.offset = 0;
  ctx->head = stack;
  ctx->head->field = &ctx->root;
  ctx->fmt_offset = 0;
  ctx->head->parent_offset = 0;
  ctx->new_packmode = '@';
  ctx->enc_packmode = '@';
  ctx->new_count = 1;
  ctx->enc_count = 0;
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  ctx->is_valid_array = 0;
  ctx->struct_alignment = 0;
  while (type->typegroup == 'S') {
    ++ctx->head;
    ctx->head->field = type->fields;
    ctx->head->parent_offset = 0;
    type = type->fields->type;
  }
}
static int __Pyx_BufFmt_ParseNumber(const char** ts) {
    int count;
    const char* t = *ts;
    if (*t < '0' || *t > '9') {
      return -1;
    } else {
        count = *t++ - '0';
        while (*t >= '0' && *t <= '9') {
            count *= 10;
            count += *t++ - '0';
        }
    }
    *ts = t;
    return count;
}
static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
    int number = __Pyx_BufFmt_ParseNumber(ts);
    if (number == -1)
        PyErr_Format(PyExc_ValueError,\
                     "Does not understand character buffer dtype format string ('%c')", **ts);
    return number;
}
static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
  PyErr_Format(PyExc_ValueError,
               "Unexpected format string character: '%c'", ch);
}
static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
  switch (ch) {
    case '?': return "'bool'";
    case 'c': return "'char'";
    case 'b': return "'signed char'";
    case 'B': return "'unsigned char'";
    case 'h': return "'short'";
    case 'H': return "'unsigned short'";
    case 'i': return "'int'";
    case 'I': return "'unsigned int'";
    case 'l': return "'long'";
    case 'L': return "'unsigned long'";
    case 'q': return "'long long'";
    case 'Q': return "'unsigned long long'";
    case 'f': return (is_complex ? "'complex float'" : "'float'");
    case 'd': return (is_complex ? "'complex double'" : "'double'");
    case 'g': return (is_complex ? "'complex long double'" : "'long double'");
    case 'T': return "a struct";
    case 'O': return "Python object";
    case 'P': return "a pointer";
    case 's': case 'p': return "a string";
    case 0: return "end";
    default: return "unparseable format string";
  }
}
static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return 2;
    case 'i': case 'I': case 'l': case 'L': return 4;
    case 'q': case 'Q': return 8;
    case 'f': return (is_complex ? 8 : 4);
    case 'd': return (is_complex ? 16 : 8);
    case 'g': {
      PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
      return 0;
    }
    case 'O': case 'P': return sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(short);
    case 'i': case 'I': return sizeof(int);
    case 'l': case 'L': return sizeof(long);
    #ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(PY_LONG_LONG);
    #endif
    case 'f': return sizeof(float) * (is_complex ? 2 : 1);
    case 'd': return sizeof(double) * (is_complex ? 2 : 1);
    case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
    case 'O': case 'P': return sizeof(void*);
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
typedef struct { char c; short x; } __Pyx_st_short;
typedef struct { char c; int x; } __Pyx_st_int;
typedef struct { char c; long x; } __Pyx_st_long;
typedef struct { char c; float x; } __Pyx_st_float;
typedef struct { char c; double x; } __Pyx_st_double;
typedef struct { char c; long double x; } __Pyx_st_longdouble;
typedef struct { char c; void *x; } __Pyx_st_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
/* These are for computing the padding at the end of the struct to align
   on the first member of the struct. This will probably the same as above,
   but we don't have any guarantees.
 */
typedef struct { short x; char c; } __Pyx_pad_short;
typedef struct { int x; char c; } __Pyx_pad_int;
typedef struct { long x; char c; } __Pyx_pad_long;
typedef struct { float x; char c; } __Pyx_pad_float;
typedef struct { double x; char c; } __Pyx_pad_double;
typedef struct { long double x; char c; } __Pyx_pad_longdouble;
typedef struct { void *x; char c; } __Pyx_pad_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
  switch (ch) {
    case 'c':
        return 'H';
    case 'b': case 'h': case 'i':
    case 'l': case 'q': case 's': case 'p':
        return 'I';
    case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
        return 'U';
    case 'f': case 'd': case 'g':
        return (is_complex ? 'C' : 'R');
    case 'O':
        return 'O';
    case 'P':
        return 'P';
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
  if (ctx->head == NULL || ctx->head->field == &ctx->root) {
    const char* expected;
    const char* quote;
    if (ctx->head == NULL) {
      expected = "end";
      quote = "";
    } else {
      expected = ctx->head->field->type->name;
      quote = "'";
    }
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected %s%s%s but got %s",
                 quote, expected, quote,
                 __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
  } else {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_StructField* parent = (ctx->head - 1)->field;
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
                 field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
                 parent->type->name, field->name);
  }
}
static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
  char group;
  size_t size, offset, arraysize = 1;
  if (ctx->enc_type == 0) return 0;
  if (ctx->head->field->type->arraysize[0]) {
    int i, ndim = 0;
    if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
        ctx->is_valid_array = ctx->head->field->type->ndim == 1;
        ndim = 1;
        if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
            PyErr_Format(PyExc_ValueError,
                         "Expected a dimension of size %zu, got %zu",
                         ctx->head->field->type->arraysize[0], ctx->enc_count);
            return -1;
        }
    }
    if (!ctx->is_valid_array) {
      PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
                   ctx->head->field->type->ndim, ndim);
      return -1;
    }
    for (i = 0; i < ctx->head->field->type->ndim; i++) {
      arraysize *= ctx->head->field->type->arraysize[i];
    }
    ctx->is_valid_array = 0;
    ctx->enc_count = 1;
  }
  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
  do {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_TypeInfo* type = field->type;
    if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
      size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
    } else {
      size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
    }
    if (ctx->enc_packmode == '@') {
      size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
      size_t align_mod_offset;
      if (align_at == 0) return -1;
      align_mod_offset = ctx->fmt_offset % align_at;
      if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
      if (ctx->struct_alignment == 0)
          ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
                                                                 ctx->is_complex);
    }
    if (type->size != size || type->typegroup != group) {
      if (type->typegroup == 'C' && type->fields != NULL) {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        ++ctx->head;
        ctx->head->field = type->fields;
        ctx->head->parent_offset = parent_offset;
        continue;
      }
      if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
      } else {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
      }
    }
    offset = ctx->head->parent_offset + field->offset;
    if (ctx->fmt_offset != offset) {
      PyErr_Format(PyExc_ValueError,
                   "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
                   (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
      return -1;
    }
    ctx->fmt_offset += size;
    if (arraysize)
      ctx->fmt_offset += (arraysize - 1) * size;
    --ctx->enc_count;
    while (1) {
      if (field == &ctx->root) {
        ctx->head = NULL;
        if (ctx->enc_count != 0) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
        }
        break;
      }
      ctx->head->field = ++field;
      if (field->type == NULL) {
        --ctx->head;
        field = ctx->head->field;
        continue;
      } else if (field->type->typegroup == 'S') {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        if (field->type->fields->type == NULL) continue;
        field = field->type->fields;
        ++ctx->head;
        ctx->head->field = field;
        ctx->head->parent_offset = parent_offset;
        break;
      } else {
        break;
      }
    }
  } while (ctx->enc_count);
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  return 0;
}
static PyObject *
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
{
    const char *ts = *tsp;
    int i = 0, number;
    int ndim = ctx->head->field->type->ndim;
;
    ++ts;
    if (ctx->new_count != 1) {
        PyErr_SetString(PyExc_ValueError,
                        "Cannot handle repeated arrays in format string");
        return NULL;
    }
    if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
    while (*ts && *ts != ')') {
        switch (*ts) {
            case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
            default:  break;
        }
        number = __Pyx_BufFmt_ExpectNumber(&ts);
        if (number == -1) return NULL;
        if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
            return PyErr_Format(PyExc_ValueError,
                        "Expected a dimension of size %zu, got %d",
                        ctx->head->field->type->arraysize[i], number);
        if (*ts != ',' && *ts != ')')
            return PyErr_Format(PyExc_ValueError,
                                "Expected a comma in format string, got '%c'", *ts);
        if (*ts == ',') ts++;
        i++;
    }
    if (i != ndim)
        return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
                            ctx->head->field->type->ndim, i);
    if (!*ts) {
        PyErr_SetString(PyExc_ValueError,
                        "Unexpected end of format string, expected ')'");
        return NULL;
    }
    ctx->is_valid_array = 1;
    ctx->new_count = 1;
    *tsp = ++ts;
    return Py_None;
}
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
  int got_Z = 0;
  while (1) {
    switch(*ts) {
      case 0:
        if (ctx->enc_type != 0 && ctx->head == NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        if (ctx->head != NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        return ts;
      case ' ':
      case '\r':
      case '\n':
        ++ts;
        break;
      case '<':
        if (!__Pyx_Is_Little_Endian()) {
          PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '>':
      case '!':
        if (__Pyx_Is_Little_Endian()) {
          PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '=':
      case '@':
      case '^':
        ctx->new_packmode = *ts++;
        break;
      case 'T':
        {
          const char* ts_after_sub;
          size_t i, struct_count = ctx->new_count;
          size_t struct_alignment = ctx->struct_alignment;
          ctx->new_count = 1;
          ++ts;
          if (*ts != '{') {
            PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
            return NULL;
          }
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0;
          ctx->enc_count = 0;
          ctx->struct_alignment = 0;
          ++ts;
          ts_after_sub = ts;
          for (i = 0; i != struct_count; ++i) {
            ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
            if (!ts_after_sub) return NULL;
          }
          ts = ts_after_sub;
          if (struct_alignment) ctx->struct_alignment = struct_alignment;
        }
        break;
      case '}':
        {
          size_t alignment = ctx->struct_alignment;
          ++ts;
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0;
          if (alignment && ctx->fmt_offset % alignment) {
            ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
          }
        }
        return ts;
      case 'x':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->fmt_offset += ctx->new_count;
        ctx->new_count = 1;
        ctx->enc_count = 0;
        ctx->enc_type = 0;
        ctx->enc_packmode = ctx->new_packmode;
        ++ts;
        break;
      case 'Z':
        got_Z = 1;
        ++ts;
        if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
          __Pyx_BufFmt_RaiseUnexpectedChar('Z');
          return NULL;
        }
        CYTHON_FALLTHROUGH;
      case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
      case 'l': case 'L': case 'q': case 'Q':
      case 'f': case 'd': case 'g':
      case 'O': case 'p':
        if (ctx->enc_type == *ts && got_Z == ctx->is_complex &&
            ctx->enc_packmode == ctx->new_packmode) {
          ctx->enc_count += ctx->new_count;
          ctx->new_count = 1;
          got_Z = 0;
          ++ts;
          break;
        }
        CYTHON_FALLTHROUGH;
      case 's':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->enc_count = ctx->new_count;
        ctx->enc_packmode = ctx->new_packmode;
        ctx->enc_type = *ts;
        ctx->is_complex = got_Z;
        ++ts;
        ctx->new_count = 1;
        got_Z = 0;
        break;
      case ':':
        ++ts;
        while(*ts != ':') ++ts;
        ++ts;
        break;
      case '(':
        if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
        break;
      default:
        {
          int number = __Pyx_BufFmt_ExpectNumber(&ts);
          if (number == -1) return NULL;
          ctx->new_count = (size_t)number;
        }
    }
  }
}

/* TypeInfoCompare */
  static int
__pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
{
    int i;
    if (!a || !b)
        return 0;
    if (a == b)
        return 1;
    if (a->size != b->size || a->typegroup != b->typegroup ||
            a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
        if (a->typegroup == 'H' || b->typegroup == 'H') {
            return a->size == b->size;
        } else {
            return 0;
        }
    }
    if (a->ndim) {
        for (i = 0; i < a->ndim; i++)
            if (a->arraysize[i] != b->arraysize[i])
                return 0;
    }
    if (a->typegroup == 'S') {
        if (a->flags != b->flags)
            return 0;
        if (a->fields || b->fields) {
            if (!(a->fields && b->fields))
                return 0;
            for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
                __Pyx_StructField *field_a = a->fields + i;
                __Pyx_StructField *field_b = b->fields + i;
                if (field_a->offset != field_b->offset ||
                    !__pyx_typeinfo_cmp(field_a->type, field_b->type))
                    return 0;
            }
            return !a->fields[i].type && !b->fields[i].type;
        }
    }
    return 1;
}

/* MemviewSliceValidateAndInit */
  static int
__pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
{
    if (buf->shape[dim] <= 1)
        return 1;
    if (buf->strides) {
        if (spec & __Pyx_MEMVIEW_CONTIG) {
            if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
                if (buf->strides[dim] != sizeof(void *)) {
                    PyErr_Format(PyExc_ValueError,
                                 "Buffer is not indirectly contiguous "
                                 "in dimension %d.", dim);
                    goto fail;
                }
            } else if (buf->strides[dim] != buf->itemsize) {
                PyErr_SetString(PyExc_ValueError,
                                "Buffer and memoryview are not contiguous "
                                "in the same dimension.");
                goto fail;
            }
        }
        if (spec & __Pyx_MEMVIEW_FOLLOW) {
            Py_ssize_t stride = buf->strides[dim];
            if (stride < 0)
                stride = -stride;
            if (stride < buf->itemsize) {
                PyErr_SetString(PyExc_ValueError,
                                "Buffer and memoryview are not contiguous "
                                "in the same dimension.");
                goto fail;
            }
        }
    } else {
        if (spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1) {
            PyErr_Format(PyExc_ValueError,
                         "C-contiguous buffer is not contiguous in "
                         "dimension %d", dim);
            goto fail;
        } else if (spec & (__Pyx_MEMVIEW_PTR)) {
            PyErr_Format(PyExc_ValueError,
                         "C-contiguous buffer is not indirect in "
                         "dimension %d", dim);
            goto fail;
        } else if (buf->suboffsets) {
            PyErr_SetString(PyExc_ValueError,
                            "Buffer exposes suboffsets but no strides");
            goto fail;
        }
    }
    return 1;
fail:
    return 0;
}
static int
__pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec)
{
    if (spec & __Pyx_MEMVIEW_DIRECT) {
        if (buf->suboffsets && buf->suboffsets[dim] >= 0) {
            PyErr_Format(PyExc_ValueError,
                         "Buffer not compatible with direct access "
                         "in dimension %d.", dim);
            goto fail;
        }
    }
    if (spec & __Pyx_MEMVIEW_PTR) {
        if (!buf->suboffsets || (buf->suboffsets[dim] < 0)) {
            PyErr_Format(PyExc_ValueError,
                         "Buffer is not indirectly accessible "
                         "in dimension %d.", dim);
            goto fail;
        }
    }
    return 1;
fail:
    return 0;
}
static int
__pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
{
    int i;
    if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
        Py_ssize_t stride = 1;
        for (i = 0; i < ndim; i++) {
            if (stride * buf->itemsize != buf->strides[i] &&
                    buf->shape[i] > 1)
            {
                PyErr_SetString(PyExc_ValueError,
                    "Buffer not fortran contiguous.");
                goto fail;
            }
            stride = stride * buf->shape[i];
        }
    } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
        Py_ssize_t stride = 1;
        for (i = ndim - 1; i >- 1; i--) {
            if (stride * buf->itemsize != buf->strides[i] &&
                    buf->shape[i] > 1) {
                PyErr_SetString(PyExc_ValueError,
                    "Buffer not C contiguous.");
                goto fail;
            }
            stride = stride * buf->shape[i];
        }
    }
    return 1;
fail:
    return 0;
}
static int __Pyx_ValidateAndInit_memviewslice(
                int *axes_specs,
                int c_or_f_flag,
                int buf_flags,
                int ndim,
                __Pyx_TypeInfo *dtype,
                __Pyx_BufFmt_StackElem stack[],
                __Pyx_memviewslice *memviewslice,
                PyObject *original_obj)
{
    struct __pyx_memoryview_obj *memview, *new_memview;
    __Pyx_RefNannyDeclarations
    Py_buffer *buf;
    int i, spec = 0, retval = -1;
    __Pyx_BufFmt_Context ctx;
    int from_memoryview = __pyx_memoryview_check(original_obj);
    __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
    if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
                                                            original_obj)->typeinfo)) {
        memview = (struct __pyx_memoryview_obj *) original_obj;
        new_memview = NULL;
    } else {
        memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
                                            original_obj, buf_flags, 0, dtype);
        new_memview = memview;
        if (unlikely(!memview))
            goto fail;
    }
    buf = &memview->view;
    if (buf->ndim != ndim) {
        PyErr_Format(PyExc_ValueError,
                "Buffer has wrong number of dimensions (expected %d, got %d)",
                ndim, buf->ndim);
        goto fail;
    }
    if (new_memview) {
        __Pyx_BufFmt_Init(&ctx, stack, dtype);
        if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
    }
    if ((unsigned) buf->itemsize != dtype->size) {
        PyErr_Format(PyExc_ValueError,
                     "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
                     "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
                     buf->itemsize,
                     (buf->itemsize > 1) ? "s" : "",
                     dtype->name,
                     dtype->size,
                     (dtype->size > 1) ? "s" : "");
        goto fail;
    }
    for (i = 0; i < ndim; i++) {
        spec = axes_specs[i];
        if (!__pyx_check_strides(buf, i, ndim, spec))
            goto fail;
        if (!__pyx_check_suboffsets(buf, i, ndim, spec))
            goto fail;
    }
    if (buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag))
        goto fail;
    if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
                                         new_memview != NULL) == -1)) {
        goto fail;
    }
    retval = 0;
    goto no_fail;
fail:
    Py_XDECREF(new_memview);
    retval = -1;
no_fail:
    __Pyx_RefNannyFinishContext();
    return retval;
}

/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn_int32_t(PyObject *obj, int writable_flag) {
    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
    __Pyx_BufFmt_StackElem stack[1];
    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
    int retcode;
    if (obj == Py_None) {
        result.memview = (struct __pyx_memoryview_obj *) Py_None;
        return result;
    }
    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
                                                 PyBUF_RECORDS_RO | writable_flag, 1,
                                                 &__Pyx_TypeInfo_nn_int32_t, stack,
                                                 &result, obj);
    if (unlikely(retcode == -1))
        goto __pyx_fail;
    return result;
__pyx_fail:
    result.memview = NULL;
    result.data = NULL;
    return result;
}

/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn_int64_t(PyObject *obj, int writable_flag) {
    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
    __Pyx_BufFmt_StackElem stack[1];
    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
    int retcode;
    if (obj == Py_None) {
        result.memview = (struct __pyx_memoryview_obj *) Py_None;
        return result;
    }
    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
                                                 PyBUF_RECORDS_RO | writable_flag, 1,
                                                 &__Pyx_TypeInfo_nn_int64_t, stack,
                                                 &result, obj);
    if (unlikely(retcode == -1))
        goto __pyx_fail;
    return result;
__pyx_fail:
    result.memview = NULL;
    result.data = NULL;
    return result;
}

/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint32_t(PyObject *obj, int writable_flag) {
    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
    __Pyx_BufFmt_StackElem stack[1];
    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
    int retcode;
    if (obj == Py_None) {
        result.memview = (struct __pyx_memoryview_obj *) Py_None;
        return result;
    }
    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
                                                 PyBUF_RECORDS_RO | writable_flag, 1,
                                                 &__Pyx_TypeInfo_nn_uint32_t, stack,
                                                 &result, obj);
    if (unlikely(retcode == -1))
        goto __pyx_fail;
    return result;
__pyx_fail:
    result.memview = NULL;
    result.data = NULL;
    return result;
}

/* 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;
}

/* 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 CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE 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 */
