/* Generated by Cython 0.29.26 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "name": "apischema.serialization.methods",
        "sources": [
            "apischema/serialization/methods.pyx"
        ]
    },
    "module_name": "apischema.serialization.methods"
}
END: Cython Metadata */

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

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

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

#if defined(WIN32) || defined(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_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

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

#define __PYX_HAVE__apischema__serialization__methods
#define __PYX_HAVE_API__apischema__serialization__methods
/* Early includes */
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

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

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


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

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


static const char *__pyx_f[] = {
  "apischema/serialization/methods.pyx",
  "stringsource",
};

/*--- Type declarations ---*/
struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod;
struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod;
struct __pyx_obj_9apischema_13serialization_7methods_ListMethod;
struct __pyx_obj_9apischema_13serialization_7methods_DictMethod;
struct __pyx_obj_9apischema_13serialization_7methods_StrMethod;
struct __pyx_obj_9apischema_13serialization_7methods_IntMethod;
struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod;
struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod;
struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod;
struct __pyx_obj_9apischema_13serialization_7methods_RecMethod;
struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod;
struct __pyx_obj_9apischema_13serialization_7methods_Fallback;
struct __pyx_obj_9apischema_13serialization_7methods_NoFallback;
struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback;
struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod;
struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod;
struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod;
struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod;
struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod;
struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod;
struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod;
struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod;
struct __pyx_obj_9apischema_13serialization_7methods_BaseField;
struct __pyx_obj_9apischema_13serialization_7methods_IdentityField;
struct __pyx_obj_9apischema_13serialization_7methods_SimpleField;
struct __pyx_obj_9apischema_13serialization_7methods_ComplexField;
struct __pyx_obj_9apischema_13serialization_7methods_SerializedField;
struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod;
struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod;
struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod;
struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod;
struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod;
struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod;
struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod;
struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod;
struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod;
struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative;
struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative;
struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod;
struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod;
struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod;
struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict;
struct __pyx_opt_args_9apischema_13serialization_7methods_14IdentityMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_10ListMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_10DictMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_9StrMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_9IntMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_10BoolMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_11FloatMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_10NoneMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_9RecMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_9AnyMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_15TypeCheckMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_16CollectionMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_11ValueMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_10EnumMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_13MappingMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_11ClassMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_15TypedDictMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_11TupleMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_18CheckedTupleMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_14OptionalMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_16UnionAlternative_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_24DiscriminatedAlternative_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_11UnionMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_13WrapperMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_16ConversionMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_21DiscriminateTypedDict_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_IdentityMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_ListMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_DictMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_StrMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_IntMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_BoolMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_FloatMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_NoneMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_RecMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_AnyMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_TypeCheckIdentityMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_TypeCheckMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_CollectionCheckOnlyMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_CollectionMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_ValueMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_EnumMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_MappingCheckOnlyMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_MappingMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_ClassMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_ClassWithFieldsSetMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_TypedDictMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_TupleCheckOnlyMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_TupleMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_CheckedTupleMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_OptionalMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_UnionAlternative_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_DiscriminatedAlternative_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_UnionMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_WrapperMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_ConversionMethod_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_DiscriminateTypedDict_serialize;
struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize;

/* "apischema/serialization/methods.pyx":17
 * cdef class IdentityMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return IdentityMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_14IdentityMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":25
 * cdef class ListMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return ListMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_10ListMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":33
 * cdef class DictMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return DictMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_10DictMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":41
 * cdef class StrMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return StrMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_9StrMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":49
 * cdef class IntMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return IntMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_9IntMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":57
 * cdef class BoolMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return BoolMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_10BoolMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":65
 * cdef class FloatMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return FloatMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_11FloatMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":73
 * cdef class NoneMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return NoneMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_10NoneMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":83
 *     cdef readonly object method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return RecMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_9RecMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":94
 *     cdef readonly object factory
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return AnyMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_9AnyMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":128
 *     cdef readonly Fallback fallback
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TypeCheckIdentityMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":141
 *     cdef readonly Fallback fallback
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TypeCheckMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_15TypeCheckMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":153
 *     cdef readonly SerializationMethod value_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return CollectionCheckOnlyMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":163
 *     cdef readonly SerializationMethod value_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return CollectionMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_16CollectionMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":172
 * cdef class ValueMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return ValueMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_11ValueMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":181
 *     cdef readonly AnyMethod any_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return EnumMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_10EnumMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":192
 *     cdef readonly SerializationMethod value_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return MappingCheckOnlyMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":204
 *     cdef readonly SerializationMethod value_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return MappingMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_13MappingMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":295
 * cdef class ClassMethod(ObjectMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return ClassMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_11ClassMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":304
 * cdef class ClassWithFieldsSetMethod(ObjectMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return ClassWithFieldsSetMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":313
 * cdef class TypedDictMethod(ObjectMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TypedDictMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_15TypedDictMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":324
 *     cdef readonly SerializationMethod any_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TypedDictWithAdditionalMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":336
 *     cdef readonly tuple elt_methods
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TupleCheckOnlyMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":346
 *     cdef readonly tuple elt_methods
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TupleMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_11TupleMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":357
 *     cdef readonly SerializationMethod method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return CheckedTupleMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_18CheckedTupleMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":368
 *     cdef readonly SerializationMethod value_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return OptionalMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_14OptionalMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":379
 *     cdef readonly SerializationMethod method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return UnionAlternative_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_16UnionAlternative_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":391
 *     cdef readonly str key
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return DiscriminatedAlternative_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_24DiscriminatedAlternative_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":405
 *     cdef readonly Fallback fallback
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return UnionMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_11UnionMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":416
 *     cdef readonly object wrapped
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return WrapperMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_13WrapperMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":427
 *     cdef readonly SerializationMethod method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return ConversionMethod_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_16ConversionMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":440
 *     cdef readonly Fallback fallback
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return DiscriminateTypedDict_serialize(self, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_21DiscriminateTypedDict_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":458
 *     return obj[field.name] if typed_dict else getattr(obj, field.name)
 * 
 * cdef inline IdentityMethod_serialize(IdentityMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_IdentityMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":461
 *         return obj
 * 
 * cdef inline ListMethod_serialize(ListMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return list(obj)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_ListMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":464
 *         return list(obj)
 * 
 * cdef inline DictMethod_serialize(DictMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return dict(obj)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_DictMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":467
 *         return dict(obj)
 * 
 * cdef inline StrMethod_serialize(StrMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return str(obj)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_StrMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":470
 *         return str(obj)
 * 
 * cdef inline IntMethod_serialize(IntMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return int(obj)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_IntMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":473
 *         return int(obj)
 * 
 * cdef inline BoolMethod_serialize(BoolMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return bool(obj)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_BoolMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":476
 *         return bool(obj)
 * 
 * cdef inline FloatMethod_serialize(FloatMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return float(obj)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_FloatMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":479
 *         return float(obj)
 * 
 * cdef inline NoneMethod_serialize(NoneMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_NoneMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":482
 *         return None
 * 
 * cdef inline RecMethod_serialize(RecMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         if self.method is None:
 *             self.method = self.lazy()
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_RecMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":487
 *         return SerializationMethod_serialize(self.method, obj)
 * 
 * cdef inline AnyMethod_serialize(AnyMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         method = self.factory(obj.__class__)  # tmp  variable for substitution
 *         return SerializationMethod_serialize(method, obj, path)
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_AnyMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":491
 *         return SerializationMethod_serialize(method, obj, path)
 * 
 * cdef inline TypeCheckIdentityMethod_serialize(TypeCheckIdentityMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return (
 *             obj
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_TypeCheckIdentityMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":498
 *         )
 * 
 * cdef inline TypeCheckMethod_serialize(TypeCheckMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         if isinstance(obj, self.expected):
 *             try:
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_TypeCheckMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":509
 *             return Fallback_fall_back(self.fallback, obj, path)
 * 
 * cdef inline CollectionCheckOnlyMethod_serialize(CollectionCheckOnlyMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         for i, elt in enumerate(obj):
 *             SerializationMethod_serialize(self.value_method, elt, i)
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_CollectionCheckOnlyMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":514
 *         return obj
 * 
 * cdef inline CollectionMethod_serialize(CollectionMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return [SerializationMethod_serialize(self.value_method, elt, i) for i, elt in enumerate(obj)]
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_CollectionMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":517
 *         return [SerializationMethod_serialize(self.value_method, elt, i) for i, elt in enumerate(obj)]
 * 
 * cdef inline ValueMethod_serialize(ValueMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return obj.value
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_ValueMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":520
 *         return obj.value
 * 
 * cdef inline EnumMethod_serialize(EnumMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.any_method, obj.value)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_EnumMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":523
 *         return SerializationMethod_serialize(self.any_method, obj.value)
 * 
 * cdef inline MappingCheckOnlyMethod_serialize(MappingCheckOnlyMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         for key, value in obj.items():
 *             SerializationMethod_serialize(self.key_method, key, key)
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_MappingCheckOnlyMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":529
 *         return obj
 * 
 * cdef inline MappingMethod_serialize(MappingMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return {
 *             SerializationMethod_serialize(self.key_method, key, key): SerializationMethod_serialize(self.value_method, value, key)
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_MappingMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":535
 *         }
 * 
 * cdef inline ClassMethod_serialize(ClassMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         result: dict = {}
 *         for i in range(len(self.fields)):
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_ClassMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":542
 *         return result
 * 
 * cdef inline ClassWithFieldsSetMethod_serialize(ClassWithFieldsSetMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         result: dict = {}
 *         for i in range(len(self.fields)):
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_ClassWithFieldsSetMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":549
 *         return result
 * 
 * cdef inline TypedDictMethod_serialize(TypedDictMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         result: dict = {}
 *         for i in range(len(self.fields)):
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_TypedDictMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":556
 *         return result
 * 
 * cdef inline TypedDictWithAdditionalMethod_serialize(TypedDictWithAdditionalMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         result: dict = TypedDictMethod_serialize(<TypedDictMethod>self, obj)
 *         for key, value in obj.items():
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":563
 *         return result
 * 
 * cdef inline TupleCheckOnlyMethod_serialize(TupleCheckOnlyMethod self, tuple obj, object path = None):             # <<<<<<<<<<<<<<
 *         for i in range(len(self.elt_methods)):
 *             method: SerializationMethod = self.elt_methods[i]
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_TupleCheckOnlyMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":569
 *         return obj
 * 
 * cdef inline TupleMethod_serialize(TupleMethod self, tuple obj, object path = None):             # <<<<<<<<<<<<<<
 *         elts: list = [None] * len(self.elt_methods)
 *         for i in range(len(self.elt_methods)):
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_TupleMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":576
 *         return elts
 * 
 * cdef inline CheckedTupleMethod_serialize(CheckedTupleMethod self, tuple obj, object path = None):             # <<<<<<<<<<<<<<
 *         if not len(obj) == self.nb_elts:
 *             raise TypeError(f"Expected {self.nb_elts}-tuple, found {len(obj)}-tuple")
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_CheckedTupleMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":581
 *         return SerializationMethod_serialize(self.method, obj)
 * 
 * cdef inline OptionalMethod_serialize(OptionalMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.value_method, obj, path) if obj is not None else None
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_OptionalMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":584
 *         return SerializationMethod_serialize(self.value_method, obj, path) if obj is not None else None
 * 
 * cdef inline UnionAlternative_serialize(UnionAlternative self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.method, obj, path)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_UnionAlternative_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":587
 *         return SerializationMethod_serialize(self.method, obj, path)
 * 
 * cdef inline DiscriminatedAlternative_serialize(DiscriminatedAlternative self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         res = UnionAlternative_serialize(<UnionAlternative>self, obj, path)
 *         if isinstance(res, dict) and self.alias not in res:
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_DiscriminatedAlternative_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":593
 *         return res
 * 
 * cdef inline UnionMethod_serialize(UnionMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         for i in range(len(self.alternatives)):
 *             alternative: UnionAlternative = self.alternatives[i]
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_UnionMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":603
 *         return Fallback_fall_back(self.fallback, obj, path)
 * 
 * cdef inline WrapperMethod_serialize(WrapperMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return self.wrapped(obj)
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_WrapperMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":606
 *         return self.wrapped(obj)
 * 
 * cdef inline ConversionMethod_serialize(ConversionMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.method, self.converter(obj))
 * 
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_ConversionMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":609
 *         return SerializationMethod_serialize(self.method, self.converter(obj))
 * 
 * cdef inline DiscriminateTypedDict_serialize(DiscriminateTypedDict self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         try:
 *             method: SerializationMethod = self.mapping[obj[self.field_name]]
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_DiscriminateTypedDict_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":656
 *             result[self.alias] = SerializationMethod_serialize(self.method, value, self.alias)
 * 
 * cdef inline SerializationMethod_serialize(SerializationMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:
 */
struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize {
  int __pyx_n;
  PyObject *path;
};

/* "apischema/serialization/methods.pyx":12
 * 
 * 
 * cdef class SerializationMethod():             # <<<<<<<<<<<<<<
 *     cdef int _dispatch
 * 
 */
struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod {
  PyObject_HEAD
  int _dispatch;
};


/* "apischema/serialization/methods.pyx":15
 *     cdef int _dispatch
 * 
 * cdef class IdentityMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */
struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_IdentityMethod *__pyx_vtab;
};


/* "apischema/serialization/methods.pyx":23
 *         self._dispatch = 0
 * 
 * cdef class ListMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */
struct __pyx_obj_9apischema_13serialization_7methods_ListMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_ListMethod *__pyx_vtab;
};


/* "apischema/serialization/methods.pyx":31
 *         self._dispatch = 1
 * 
 * cdef class DictMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */
struct __pyx_obj_9apischema_13serialization_7methods_DictMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_DictMethod *__pyx_vtab;
};


/* "apischema/serialization/methods.pyx":39
 *         self._dispatch = 2
 * 
 * cdef class StrMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */
struct __pyx_obj_9apischema_13serialization_7methods_StrMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_StrMethod *__pyx_vtab;
};


/* "apischema/serialization/methods.pyx":47
 *         self._dispatch = 3
 * 
 * cdef class IntMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */
struct __pyx_obj_9apischema_13serialization_7methods_IntMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_IntMethod *__pyx_vtab;
};


/* "apischema/serialization/methods.pyx":55
 *         self._dispatch = 4
 * 
 * cdef class BoolMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */
struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_BoolMethod *__pyx_vtab;
};


/* "apischema/serialization/methods.pyx":63
 *         self._dispatch = 5
 * 
 * cdef class FloatMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */
struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_FloatMethod *__pyx_vtab;
};


/* "apischema/serialization/methods.pyx":71
 *         self._dispatch = 6
 * 
 * cdef class NoneMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */
struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_NoneMethod *__pyx_vtab;
};


/* "apischema/serialization/methods.pyx":79
 *         self._dispatch = 7
 * 
 * cdef class RecMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly object lazy
 *     cdef readonly object method
 */
struct __pyx_obj_9apischema_13serialization_7methods_RecMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_RecMethod *__pyx_vtab;
  PyObject *lazy;
  PyObject *method;
};


/* "apischema/serialization/methods.pyx":91
 *         self._dispatch = 8
 * 
 * cdef class AnyMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly object factory
 * 
 */
struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_AnyMethod *__pyx_vtab;
  PyObject *factory;
};


/* "apischema/serialization/methods.pyx":101
 *         self._dispatch = 9
 * 
 * cdef class Fallback():             # <<<<<<<<<<<<<<
 *     cdef int _dispatch
 * 
 */
struct __pyx_obj_9apischema_13serialization_7methods_Fallback {
  PyObject_HEAD
  int _dispatch;
};


/* "apischema/serialization/methods.pyx":104
 *     cdef int _dispatch
 * 
 * cdef class NoFallback(Fallback):             # <<<<<<<<<<<<<<
 *     cdef readonly object tp
 * 
 */
struct __pyx_obj_9apischema_13serialization_7methods_NoFallback {
  struct __pyx_obj_9apischema_13serialization_7methods_Fallback __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_NoFallback *__pyx_vtab;
  PyObject *tp;
};


/* "apischema/serialization/methods.pyx":114
 *         self._dispatch = 0
 * 
 * cdef class AnyFallback(Fallback):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod any_method
 * 
 */
struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback {
  struct __pyx_obj_9apischema_13serialization_7methods_Fallback __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_AnyFallback *__pyx_vtab;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *any_method;
};


/* "apischema/serialization/methods.pyx":124
 *         self._dispatch = 1
 * 
 * cdef class TypeCheckIdentityMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly object expected
 *     cdef readonly Fallback fallback
 */
struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_vtab;
  PyObject *expected;
  struct __pyx_obj_9apischema_13serialization_7methods_Fallback *fallback;
};


/* "apischema/serialization/methods.pyx":136
 *         self._dispatch = 10
 * 
 * cdef class TypeCheckMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod method
 *     cdef readonly object expected
 */
struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_vtab;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *method;
  PyObject *expected;
  struct __pyx_obj_9apischema_13serialization_7methods_Fallback *fallback;
};


/* "apischema/serialization/methods.pyx":150
 *         self._dispatch = 11
 * 
 * cdef class CollectionCheckOnlyMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod value_method
 * 
 */
struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *__pyx_vtab;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *value_method;
};


/* "apischema/serialization/methods.pyx":160
 *         self._dispatch = 12
 * 
 * cdef class CollectionMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod value_method
 * 
 */
struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_CollectionMethod *__pyx_vtab;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *value_method;
};


/* "apischema/serialization/methods.pyx":170
 *         self._dispatch = 13
 * 
 * cdef class ValueMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */
struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_ValueMethod *__pyx_vtab;
};


/* "apischema/serialization/methods.pyx":178
 *         self._dispatch = 14
 * 
 * cdef class EnumMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly AnyMethod any_method
 * 
 */
struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_EnumMethod *__pyx_vtab;
  struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *any_method;
};


/* "apischema/serialization/methods.pyx":188
 *         self._dispatch = 15
 * 
 * cdef class MappingCheckOnlyMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod key_method
 *     cdef readonly SerializationMethod value_method
 */
struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_vtab;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *key_method;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *value_method;
};


/* "apischema/serialization/methods.pyx":200
 *         self._dispatch = 16
 * 
 * cdef class MappingMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod key_method
 *     cdef readonly SerializationMethod value_method
 */
struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_MappingMethod *__pyx_vtab;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *key_method;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *value_method;
};


/* "apischema/serialization/methods.pyx":212
 *         self._dispatch = 17
 * 
 * cdef class BaseField():             # <<<<<<<<<<<<<<
 *     cdef int _dispatch
 * 
 */
struct __pyx_obj_9apischema_13serialization_7methods_BaseField {
  PyObject_HEAD
  int _dispatch;
};


/* "apischema/serialization/methods.pyx":215
 *     cdef int _dispatch
 * 
 * cdef class IdentityField(BaseField):             # <<<<<<<<<<<<<<
 *     cdef readonly str name
 *     cdef readonly str alias
 */
struct __pyx_obj_9apischema_13serialization_7methods_IdentityField {
  struct __pyx_obj_9apischema_13serialization_7methods_BaseField __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_IdentityField *__pyx_vtab;
  PyObject *name;
  PyObject *alias;
  int required;
};


/* "apischema/serialization/methods.pyx":229
 *         self._dispatch = 0
 * 
 * cdef class SimpleField(IdentityField):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod method
 * 
 */
struct __pyx_obj_9apischema_13serialization_7methods_SimpleField {
  struct __pyx_obj_9apischema_13serialization_7methods_IdentityField __pyx_base;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *method;
};


/* "apischema/serialization/methods.pyx":242
 *         self._dispatch = 1
 * 
 * cdef class ComplexField(SimpleField):             # <<<<<<<<<<<<<<
 *     cdef readonly object skip_if
 *     cdef readonly bint undefined
 */
struct __pyx_obj_9apischema_13serialization_7methods_ComplexField {
  struct __pyx_obj_9apischema_13serialization_7methods_SimpleField __pyx_base;
  PyObject *skip_if;
  int undefined;
  int skip_none;
  int skip_default;
  PyObject *default_value;
  int skippable;
};


/* "apischema/serialization/methods.pyx":268
 *         self._dispatch = 2
 * 
 * cdef class SerializedField(BaseField):             # <<<<<<<<<<<<<<
 *     cdef readonly str alias
 *     cdef readonly object func
 */
struct __pyx_obj_9apischema_13serialization_7methods_SerializedField {
  struct __pyx_obj_9apischema_13serialization_7methods_BaseField __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_SerializedField *__pyx_vtab;
  PyObject *alias;
  PyObject *func;
  int undefined;
  int skip_none;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *method;
};


/* "apischema/serialization/methods.pyx":286
 *         self._dispatch = 3
 * 
 * cdef class ObjectMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly tuple fields
 * 
 */
struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  PyObject *fields;
};


/* "apischema/serialization/methods.pyx":293
 *         self._dispatch = 18
 * 
 * cdef class ClassMethod(ObjectMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */
struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_ClassMethod *__pyx_vtab;
};


/* "apischema/serialization/methods.pyx":302
 *         self._dispatch = 19
 * 
 * cdef class ClassWithFieldsSetMethod(ObjectMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */
struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *__pyx_vtab;
};


/* "apischema/serialization/methods.pyx":311
 *         self._dispatch = 20
 * 
 * cdef class TypedDictMethod(ObjectMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */
struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypedDictMethod *__pyx_vtab;
};


/* "apischema/serialization/methods.pyx":320
 *         self._dispatch = 21
 * 
 * cdef class TypedDictWithAdditionalMethod(TypedDictMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly set field_names
 *     cdef readonly SerializationMethod any_method
 */
struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod __pyx_base;
  PyObject *field_names;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *any_method;
};


/* "apischema/serialization/methods.pyx":333
 *         self._dispatch = 22
 * 
 * cdef class TupleCheckOnlyMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly tuple elt_methods
 * 
 */
struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_TupleCheckOnlyMethod *__pyx_vtab;
  PyObject *elt_methods;
};


/* "apischema/serialization/methods.pyx":343
 *         self._dispatch = 23
 * 
 * cdef class TupleMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly tuple elt_methods
 * 
 */
struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_TupleMethod *__pyx_vtab;
  PyObject *elt_methods;
};


/* "apischema/serialization/methods.pyx":353
 *         self._dispatch = 24
 * 
 * cdef class CheckedTupleMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly long nb_elts
 *     cdef readonly SerializationMethod method
 */
struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_vtab;
  long nb_elts;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *method;
};


/* "apischema/serialization/methods.pyx":365
 *         self._dispatch = 25
 * 
 * cdef class OptionalMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod value_method
 * 
 */
struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_OptionalMethod *__pyx_vtab;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *value_method;
};


/* "apischema/serialization/methods.pyx":375
 *         self._dispatch = 26
 * 
 * cdef class UnionAlternative(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly object cls
 *     cdef readonly SerializationMethod method
 */
struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_UnionAlternative *__pyx_vtab;
  PyObject *cls;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *method;
};


/* "apischema/serialization/methods.pyx":387
 *         self._dispatch = 27
 * 
 * cdef class DiscriminatedAlternative(UnionAlternative):             # <<<<<<<<<<<<<<
 *     cdef readonly str alias
 *     cdef readonly str key
 */
struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative {
  struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative __pyx_base;
  PyObject *alias;
  PyObject *key;
};


/* "apischema/serialization/methods.pyx":401
 *         self._dispatch = 28
 * 
 * cdef class UnionMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly tuple alternatives
 *     cdef readonly Fallback fallback
 */
struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_UnionMethod *__pyx_vtab;
  PyObject *alternatives;
  struct __pyx_obj_9apischema_13serialization_7methods_Fallback *fallback;
};


/* "apischema/serialization/methods.pyx":413
 *         self._dispatch = 29
 * 
 * cdef class WrapperMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly object wrapped
 * 
 */
struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_WrapperMethod *__pyx_vtab;
  PyObject *wrapped;
};


/* "apischema/serialization/methods.pyx":423
 *         self._dispatch = 30
 * 
 * cdef class ConversionMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly object converter
 *     cdef readonly SerializationMethod method
 */
struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_ConversionMethod *__pyx_vtab;
  PyObject *converter;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *method;
};


/* "apischema/serialization/methods.pyx":435
 *         self._dispatch = 31
 * 
 * cdef class DiscriminateTypedDict(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly str field_name
 *     cdef readonly dict mapping
 */
struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod __pyx_base;
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_vtab;
  PyObject *field_name;
  PyObject *mapping;
  struct __pyx_obj_9apischema_13serialization_7methods_Fallback *fallback;
};



/* "apischema/serialization/methods.pyx":15
 *     cdef int _dispatch
 * 
 * cdef class IdentityMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_IdentityMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_14IdentityMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_IdentityMethod *__pyx_vtabptr_9apischema_13serialization_7methods_IdentityMethod;


/* "apischema/serialization/methods.pyx":23
 *         self._dispatch = 0
 * 
 * cdef class ListMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_ListMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10ListMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_ListMethod *__pyx_vtabptr_9apischema_13serialization_7methods_ListMethod;


/* "apischema/serialization/methods.pyx":31
 *         self._dispatch = 1
 * 
 * cdef class DictMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_DictMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10DictMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_DictMethod *__pyx_vtabptr_9apischema_13serialization_7methods_DictMethod;


/* "apischema/serialization/methods.pyx":39
 *         self._dispatch = 2
 * 
 * cdef class StrMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_StrMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9StrMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_StrMethod *__pyx_vtabptr_9apischema_13serialization_7methods_StrMethod;


/* "apischema/serialization/methods.pyx":47
 *         self._dispatch = 3
 * 
 * cdef class IntMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_IntMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9IntMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_IntMethod *__pyx_vtabptr_9apischema_13serialization_7methods_IntMethod;


/* "apischema/serialization/methods.pyx":55
 *         self._dispatch = 4
 * 
 * cdef class BoolMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_BoolMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10BoolMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_BoolMethod *__pyx_vtabptr_9apischema_13serialization_7methods_BoolMethod;


/* "apischema/serialization/methods.pyx":63
 *         self._dispatch = 5
 * 
 * cdef class FloatMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_FloatMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11FloatMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_FloatMethod *__pyx_vtabptr_9apischema_13serialization_7methods_FloatMethod;


/* "apischema/serialization/methods.pyx":71
 *         self._dispatch = 6
 * 
 * cdef class NoneMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_NoneMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10NoneMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_NoneMethod *__pyx_vtabptr_9apischema_13serialization_7methods_NoneMethod;


/* "apischema/serialization/methods.pyx":79
 *         self._dispatch = 7
 * 
 * cdef class RecMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly object lazy
 *     cdef readonly object method
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_RecMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9RecMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_RecMethod *__pyx_vtabptr_9apischema_13serialization_7methods_RecMethod;


/* "apischema/serialization/methods.pyx":91
 *         self._dispatch = 8
 * 
 * cdef class AnyMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly object factory
 * 
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_AnyMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9AnyMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_AnyMethod *__pyx_vtabptr_9apischema_13serialization_7methods_AnyMethod;


/* "apischema/serialization/methods.pyx":104
 *     cdef int _dispatch
 * 
 * cdef class NoFallback(Fallback):             # <<<<<<<<<<<<<<
 *     cdef readonly object tp
 * 
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_NoFallback {
  PyObject *(*fall_back)(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *, PyObject *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_NoFallback *__pyx_vtabptr_9apischema_13serialization_7methods_NoFallback;


/* "apischema/serialization/methods.pyx":114
 *         self._dispatch = 0
 * 
 * cdef class AnyFallback(Fallback):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod any_method
 * 
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_AnyFallback {
  PyObject *(*fall_back)(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *, PyObject *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_AnyFallback *__pyx_vtabptr_9apischema_13serialization_7methods_AnyFallback;


/* "apischema/serialization/methods.pyx":124
 *         self._dispatch = 1
 * 
 * cdef class TypeCheckIdentityMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly object expected
 *     cdef readonly Fallback fallback
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypeCheckIdentityMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_vtabptr_9apischema_13serialization_7methods_TypeCheckIdentityMethod;


/* "apischema/serialization/methods.pyx":136
 *         self._dispatch = 10
 * 
 * cdef class TypeCheckMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod method
 *     cdef readonly object expected
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypeCheckMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_15TypeCheckMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_vtabptr_9apischema_13serialization_7methods_TypeCheckMethod;


/* "apischema/serialization/methods.pyx":150
 *         self._dispatch = 11
 * 
 * cdef class CollectionCheckOnlyMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod value_method
 * 
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_CollectionCheckOnlyMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *__pyx_vtabptr_9apischema_13serialization_7methods_CollectionCheckOnlyMethod;


/* "apischema/serialization/methods.pyx":160
 *         self._dispatch = 12
 * 
 * cdef class CollectionMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod value_method
 * 
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_CollectionMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_16CollectionMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_CollectionMethod *__pyx_vtabptr_9apischema_13serialization_7methods_CollectionMethod;


/* "apischema/serialization/methods.pyx":170
 *         self._dispatch = 13
 * 
 * cdef class ValueMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_ValueMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11ValueMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_ValueMethod *__pyx_vtabptr_9apischema_13serialization_7methods_ValueMethod;


/* "apischema/serialization/methods.pyx":178
 *         self._dispatch = 14
 * 
 * cdef class EnumMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly AnyMethod any_method
 * 
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_EnumMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10EnumMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_EnumMethod *__pyx_vtabptr_9apischema_13serialization_7methods_EnumMethod;


/* "apischema/serialization/methods.pyx":188
 *         self._dispatch = 15
 * 
 * cdef class MappingCheckOnlyMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod key_method
 *     cdef readonly SerializationMethod value_method
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_MappingCheckOnlyMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_vtabptr_9apischema_13serialization_7methods_MappingCheckOnlyMethod;


/* "apischema/serialization/methods.pyx":200
 *         self._dispatch = 16
 * 
 * cdef class MappingMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod key_method
 *     cdef readonly SerializationMethod value_method
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_MappingMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_13MappingMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_MappingMethod *__pyx_vtabptr_9apischema_13serialization_7methods_MappingMethod;


/* "apischema/serialization/methods.pyx":215
 *     cdef int _dispatch
 * 
 * cdef class IdentityField(BaseField):             # <<<<<<<<<<<<<<
 *     cdef readonly str name
 *     cdef readonly str alias
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_IdentityField {
  PyObject *(*update_result)(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *, PyObject *, PyObject *, int, int, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_IdentityField *__pyx_vtabptr_9apischema_13serialization_7methods_IdentityField;


/* "apischema/serialization/methods.pyx":229
 *         self._dispatch = 0
 * 
 * cdef class SimpleField(IdentityField):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod method
 * 
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_SimpleField {
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_IdentityField __pyx_base;
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_SimpleField *__pyx_vtabptr_9apischema_13serialization_7methods_SimpleField;


/* "apischema/serialization/methods.pyx":242
 *         self._dispatch = 1
 * 
 * cdef class ComplexField(SimpleField):             # <<<<<<<<<<<<<<
 *     cdef readonly object skip_if
 *     cdef readonly bint undefined
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_ComplexField {
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_SimpleField __pyx_base;
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_ComplexField *__pyx_vtabptr_9apischema_13serialization_7methods_ComplexField;


/* "apischema/serialization/methods.pyx":268
 *         self._dispatch = 2
 * 
 * cdef class SerializedField(BaseField):             # <<<<<<<<<<<<<<
 *     cdef readonly str alias
 *     cdef readonly object func
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_SerializedField {
  PyObject *(*update_result)(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *, PyObject *, PyObject *, int, int, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_SerializedField *__pyx_vtabptr_9apischema_13serialization_7methods_SerializedField;


/* "apischema/serialization/methods.pyx":293
 *         self._dispatch = 18
 * 
 * cdef class ClassMethod(ObjectMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_ClassMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11ClassMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_ClassMethod *__pyx_vtabptr_9apischema_13serialization_7methods_ClassMethod;


/* "apischema/serialization/methods.pyx":302
 *         self._dispatch = 19
 * 
 * cdef class ClassWithFieldsSetMethod(ObjectMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_ClassWithFieldsSetMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *__pyx_vtabptr_9apischema_13serialization_7methods_ClassWithFieldsSetMethod;


/* "apischema/serialization/methods.pyx":311
 *         self._dispatch = 20
 * 
 * cdef class TypedDictMethod(ObjectMethod):             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypedDictMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_15TypedDictMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypedDictMethod *__pyx_vtabptr_9apischema_13serialization_7methods_TypedDictMethod;


/* "apischema/serialization/methods.pyx":320
 *         self._dispatch = 21
 * 
 * cdef class TypedDictWithAdditionalMethod(TypedDictMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly set field_names
 *     cdef readonly SerializationMethod any_method
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod {
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypedDictMethod __pyx_base;
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *__pyx_vtabptr_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod;


/* "apischema/serialization/methods.pyx":333
 *         self._dispatch = 22
 * 
 * cdef class TupleCheckOnlyMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly tuple elt_methods
 * 
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_TupleCheckOnlyMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_TupleCheckOnlyMethod *__pyx_vtabptr_9apischema_13serialization_7methods_TupleCheckOnlyMethod;


/* "apischema/serialization/methods.pyx":343
 *         self._dispatch = 23
 * 
 * cdef class TupleMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly tuple elt_methods
 * 
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_TupleMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11TupleMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_TupleMethod *__pyx_vtabptr_9apischema_13serialization_7methods_TupleMethod;


/* "apischema/serialization/methods.pyx":353
 *         self._dispatch = 24
 * 
 * cdef class CheckedTupleMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly long nb_elts
 *     cdef readonly SerializationMethod method
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_CheckedTupleMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_18CheckedTupleMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_vtabptr_9apischema_13serialization_7methods_CheckedTupleMethod;


/* "apischema/serialization/methods.pyx":365
 *         self._dispatch = 25
 * 
 * cdef class OptionalMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod value_method
 * 
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_OptionalMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_14OptionalMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_OptionalMethod *__pyx_vtabptr_9apischema_13serialization_7methods_OptionalMethod;


/* "apischema/serialization/methods.pyx":375
 *         self._dispatch = 26
 * 
 * cdef class UnionAlternative(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly object cls
 *     cdef readonly SerializationMethod method
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_UnionAlternative {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_16UnionAlternative_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_UnionAlternative *__pyx_vtabptr_9apischema_13serialization_7methods_UnionAlternative;


/* "apischema/serialization/methods.pyx":387
 *         self._dispatch = 27
 * 
 * cdef class DiscriminatedAlternative(UnionAlternative):             # <<<<<<<<<<<<<<
 *     cdef readonly str alias
 *     cdef readonly str key
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_DiscriminatedAlternative {
  struct __pyx_vtabstruct_9apischema_13serialization_7methods_UnionAlternative __pyx_base;
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_DiscriminatedAlternative *__pyx_vtabptr_9apischema_13serialization_7methods_DiscriminatedAlternative;


/* "apischema/serialization/methods.pyx":401
 *         self._dispatch = 28
 * 
 * cdef class UnionMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly tuple alternatives
 *     cdef readonly Fallback fallback
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_UnionMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11UnionMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_UnionMethod *__pyx_vtabptr_9apischema_13serialization_7methods_UnionMethod;


/* "apischema/serialization/methods.pyx":413
 *         self._dispatch = 29
 * 
 * cdef class WrapperMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly object wrapped
 * 
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_WrapperMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_13WrapperMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_WrapperMethod *__pyx_vtabptr_9apischema_13serialization_7methods_WrapperMethod;


/* "apischema/serialization/methods.pyx":423
 *         self._dispatch = 30
 * 
 * cdef class ConversionMethod(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly object converter
 *     cdef readonly SerializationMethod method
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_ConversionMethod {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_16ConversionMethod_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_ConversionMethod *__pyx_vtabptr_9apischema_13serialization_7methods_ConversionMethod;


/* "apischema/serialization/methods.pyx":435
 *         self._dispatch = 31
 * 
 * cdef class DiscriminateTypedDict(SerializationMethod):             # <<<<<<<<<<<<<<
 *     cdef readonly str field_name
 *     cdef readonly dict mapping
 */

struct __pyx_vtabstruct_9apischema_13serialization_7methods_DiscriminateTypedDict {
  PyObject *(*serialize)(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_21DiscriminateTypedDict_serialize *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_vtabptr_9apischema_13serialization_7methods_DiscriminateTypedDict;

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

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

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

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

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

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

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

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

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

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

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

static PyObject *__pyx_f_9apischema_13serialization_7methods_14IdentityMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_14IdentityMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_10ListMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10ListMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_10DictMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10DictMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_9StrMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9StrMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_9IntMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9IntMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_10BoolMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10BoolMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_11FloatMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11FloatMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_10NoneMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10NoneMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_9RecMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9RecMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_9AnyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9AnyMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_10NoFallback_fall_back(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_11AnyFallback_fall_back(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_15TypeCheckMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_15TypeCheckMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_16CollectionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_16CollectionMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_11ValueMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11ValueMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_10EnumMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10EnumMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_13MappingMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_13MappingMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_13IdentityField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_11SimpleField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_12ComplexField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_15SerializedField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_11ClassMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11ClassMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_15TypedDictMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_15TypedDictMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_11TupleMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11TupleMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_18CheckedTupleMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_18CheckedTupleMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_14OptionalMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_14OptionalMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_16UnionAlternative_serialize(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_16UnionAlternative_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_24DiscriminatedAlternative_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_24DiscriminatedAlternative_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_11UnionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11UnionMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_13WrapperMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_13WrapperMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_16ConversionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_16ConversionMethod_serialize *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_21DiscriminateTypedDict_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_21DiscriminateTypedDict_serialize *__pyx_optional_args); /* proto*/

/* Module declarations from 'cython' */

/* Module declarations from 'apischema.serialization.methods' */
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_IdentityMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_ListMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_DictMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_StrMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_IntMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_BoolMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_FloatMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_NoneMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_RecMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_AnyMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_Fallback = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_NoFallback = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_AnyFallback = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_TypeCheckIdentityMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_TypeCheckMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_CollectionCheckOnlyMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_CollectionMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_ValueMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_EnumMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_MappingCheckOnlyMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_MappingMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_BaseField = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_IdentityField = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_SimpleField = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_ComplexField = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_SerializedField = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_ObjectMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_ClassMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_ClassWithFieldsSetMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_TypedDictMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_TupleCheckOnlyMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_TupleMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_CheckedTupleMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_OptionalMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_UnionAlternative = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_DiscriminatedAlternative = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_UnionMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_WrapperMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_ConversionMethod = 0;
static PyTypeObject *__pyx_ptype_9apischema_13serialization_7methods_DiscriminateTypedDict = 0;
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_serialize_field(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *, PyObject *, int, int, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_get_field_value(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_IdentityMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_IdentityMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_ListMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_ListMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_DictMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_DictMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_StrMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_StrMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_IntMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_IntMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_BoolMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_BoolMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_FloatMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_FloatMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_NoneMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_NoneMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_RecMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_RecMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_AnyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_AnyMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_TypeCheckIdentityMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_TypeCheckIdentityMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_TypeCheckMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_TypeCheckMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_CollectionCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_CollectionCheckOnlyMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_CollectionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_CollectionMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_ValueMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_ValueMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_EnumMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_EnumMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_MappingCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_MappingCheckOnlyMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_MappingMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_MappingMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_ClassMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_ClassMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_ClassWithFieldsSetMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_ClassWithFieldsSetMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_TypedDictMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_TypedDictMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_TupleCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_TupleCheckOnlyMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_TupleMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_TupleMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_CheckedTupleMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_CheckedTupleMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_OptionalMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_OptionalMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_UnionAlternative_serialize(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_UnionAlternative_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_DiscriminatedAlternative_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_DiscriminatedAlternative_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_UnionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_UnionMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_WrapperMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_WrapperMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_ConversionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_ConversionMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_DiscriminateTypedDict_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_DiscriminateTypedDict_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_NoFallback_fall_back(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *, PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_AnyFallback_fall_back(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *, PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_IdentityField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *, PyObject *, PyObject *, int, int); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_SimpleField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *, PyObject *, PyObject *, int, int); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_ComplexField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *, PyObject *, PyObject *, int, int); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_SerializedField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *, PyObject *, PyObject *, int, int); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *, PyObject *, struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_Fallback_fall_back(struct __pyx_obj_9apischema_13serialization_7methods_Fallback *, PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_BaseField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_BaseField *, PyObject *, PyObject *, int, int); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_SerializationMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_IdentityMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ListMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_DictMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_StrMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_IntMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_BoolMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_FloatMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_NoneMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_RecMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_AnyMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_Fallback__set_state(struct __pyx_obj_9apischema_13serialization_7methods_Fallback *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_NoFallback__set_state(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_AnyFallback__set_state(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TypeCheckIdentityMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TypeCheckMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_CollectionCheckOnlyMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_CollectionMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ValueMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_EnumMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_MappingCheckOnlyMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_MappingMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_BaseField__set_state(struct __pyx_obj_9apischema_13serialization_7methods_BaseField *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_IdentityField__set_state(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_SimpleField__set_state(struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ComplexField__set_state(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_SerializedField__set_state(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ObjectMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ClassMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ClassWithFieldsSetMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TypedDictMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TypedDictWithAdditionalMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TupleCheckOnlyMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TupleMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_CheckedTupleMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_OptionalMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_UnionAlternative__set_state(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_DiscriminatedAlternative__set_state(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_UnionMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_WrapperMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ConversionMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *, PyObject *); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_DiscriminateTypedDict__set_state(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *, PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "apischema.serialization.methods"
extern int __pyx_module_is_main_apischema__serialization__methods;
int __pyx_module_is_main_apischema__serialization__methods = 0;

/* Implementation of 'apischema.serialization.methods' */
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_TypeError;
static const char __pyx_k_tp[] = "tp";
static const char __pyx_k_Any[] = "Any";
static const char __pyx_k_cls[] = "cls";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_loc[] = "loc";
static const char __pyx_k_msg[] = "msg";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_Dict[] = "Dict";
static const char __pyx_k_Lazy[] = "Lazy";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_func[] = "func";
static const char __pyx_k_lazy[] = "lazy";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_Tuple[] = "Tuple";
static const char __pyx_k_Union[] = "Union";
static const char __pyx_k_alias[] = "alias";
static const char __pyx_k_class[] = "__class__";
static const char __pyx_k_field[] = "field";
static const char __pyx_k_found[] = ", found ";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_tuple[] = "-tuple";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_fields[] = "fields";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_method[] = "method";
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_result[] = "result";
static const char __pyx_k_typing[] = "typing";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_AnyType[] = "AnyType";
static const char __pyx_k_factory[] = "factory";
static const char __pyx_k_mapping[] = "mapping";
static const char __pyx_k_nb_elts[] = "nb_elts";
static const char __pyx_k_skip_if[] = "skip_if";
static const char __pyx_k_wrapped[] = "wrapped";
static const char __pyx_k_Callable[] = "Callable";
static const char __pyx_k_Expected[] = "Expected ";
static const char __pyx_k_Fallback[] = "Fallback";
static const char __pyx_k_Optional[] = "Optional";
static const char __pyx_k_expected[] = "expected";
static const char __pyx_k_fallback[] = "fallback";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_required[] = "required";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_AnyMethod[] = "AnyMethod";
static const char __pyx_k_BaseField[] = "BaseField";
static const char __pyx_k_Converter[] = "Converter";
static const char __pyx_k_IntMethod[] = "IntMethod";
static const char __pyx_k_RecMethod[] = "RecMethod";
static const char __pyx_k_StrMethod[] = "StrMethod";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_Undefined[] = "Undefined";
static const char __pyx_k_converter[] = "converter";
static const char __pyx_k_dataclass[] = "dataclass";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_fall_back[] = "fall_back";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_serialize[] = "serialize";
static const char __pyx_k_skip_none[] = "skip_none";
static const char __pyx_k_undefined[] = "undefined";
static const char __pyx_k_BoolMethod[] = "BoolMethod";
static const char __pyx_k_DictMethod[] = "DictMethod";
static const char __pyx_k_EnumMethod[] = "EnumMethod";
static const char __pyx_k_ListMethod[] = "ListMethod";
static const char __pyx_k_NoFallback[] = "NoFallback";
static const char __pyx_k_NoneMethod[] = "NoneMethod";
static const char __pyx_k_any_method[] = "any_method";
static const char __pyx_k_field_name[] = "field_name";
static const char __pyx_k_key_method[] = "key_method";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_typed_dict[] = "typed_dict";
static const char __pyx_k_AbstractSet[] = "AbstractSet";
static const char __pyx_k_AnyFallback[] = "AnyFallback";
static const char __pyx_k_ClassMethod[] = "ClassMethod";
static const char __pyx_k_FloatMethod[] = "FloatMethod";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_SimpleField[] = "SimpleField";
static const char __pyx_k_TupleMethod[] = "TupleMethod";
static const char __pyx_k_UnionMethod[] = "UnionMethod";
static const char __pyx_k_ValueMethod[] = "ValueMethod";
static const char __pyx_k_dataclasses[] = "dataclasses";
static const char __pyx_k_elt_methods[] = "elt_methods";
static const char __pyx_k_field_names[] = "field_names";
static const char __pyx_k_tuple_found[] = "-tuple, found ";
static const char __pyx_k_ComplexField[] = "ComplexField";
static const char __pyx_k_ObjectMethod[] = "ObjectMethod";
static const char __pyx_k_alternatives[] = "alternatives";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_skip_default[] = "skip_default";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_value_method[] = "value_method";
static const char __pyx_k_IdentityField[] = "IdentityField";
static const char __pyx_k_MappingMethod[] = "MappingMethod";
static const char __pyx_k_WrapperMethod[] = "WrapperMethod";
static const char __pyx_k_default_value[] = "default_value";
static const char __pyx_k_exclude_unset[] = "exclude_unset";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_update_result[] = "update_result";
static const char __pyx_k_IdentityMethod[] = "IdentityMethod";
static const char __pyx_k_OptionalMethod[] = "OptionalMethod";
static const char __pyx_k_TypeCheckError[] = "TypeCheckError";
static const char __pyx_k_FIELDS_SET_ATTR[] = "FIELDS_SET_ATTR";
static const char __pyx_k_SerializedField[] = "SerializedField";
static const char __pyx_k_TypeCheckMethod[] = "TypeCheckMethod";
static const char __pyx_k_TypedDictMethod[] = "TypedDictMethod";
static const char __pyx_k_apischema_types[] = "apischema.types";
static const char __pyx_k_apischema_utils[] = "apischema.utils";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_CollectionMethod[] = "CollectionMethod";
static const char __pyx_k_ConversionMethod[] = "ConversionMethod";
static const char __pyx_k_UnionAlternative[] = "UnionAlternative";
static const char __pyx_k_apischema_fields[] = "apischema.fields";
static const char __pyx_k_CheckedTupleMethod[] = "CheckedTupleMethod";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_SerializationMethod[] = "SerializationMethod";
static const char __pyx_k_TupleCheckOnlyMethod[] = "TupleCheckOnlyMethod";
static const char __pyx_k_DiscriminateTypedDict[] = "DiscriminateTypedDict";
static const char __pyx_k_pyx_unpickle_Fallback[] = "__pyx_unpickle_Fallback";
static const char __pyx_k_MappingCheckOnlyMethod[] = "MappingCheckOnlyMethod";
static const char __pyx_k_pyx_unpickle_AnyMethod[] = "__pyx_unpickle_AnyMethod";
static const char __pyx_k_pyx_unpickle_BaseField[] = "__pyx_unpickle_BaseField";
static const char __pyx_k_pyx_unpickle_IntMethod[] = "__pyx_unpickle_IntMethod";
static const char __pyx_k_pyx_unpickle_RecMethod[] = "__pyx_unpickle_RecMethod";
static const char __pyx_k_pyx_unpickle_StrMethod[] = "__pyx_unpickle_StrMethod";
static const char __pyx_k_TypeCheckIdentityMethod[] = "TypeCheckIdentityMethod";
static const char __pyx_k_pyx_unpickle_BoolMethod[] = "__pyx_unpickle_BoolMethod";
static const char __pyx_k_pyx_unpickle_DictMethod[] = "__pyx_unpickle_DictMethod";
static const char __pyx_k_pyx_unpickle_EnumMethod[] = "__pyx_unpickle_EnumMethod";
static const char __pyx_k_pyx_unpickle_ListMethod[] = "__pyx_unpickle_ListMethod";
static const char __pyx_k_pyx_unpickle_NoFallback[] = "__pyx_unpickle_NoFallback";
static const char __pyx_k_pyx_unpickle_NoneMethod[] = "__pyx_unpickle_NoneMethod";
static const char __pyx_k_ClassWithFieldsSetMethod[] = "ClassWithFieldsSetMethod";
static const char __pyx_k_DiscriminatedAlternative[] = "DiscriminatedAlternative";
static const char __pyx_k_pyx_unpickle_AnyFallback[] = "__pyx_unpickle_AnyFallback";
static const char __pyx_k_pyx_unpickle_ClassMethod[] = "__pyx_unpickle_ClassMethod";
static const char __pyx_k_pyx_unpickle_FloatMethod[] = "__pyx_unpickle_FloatMethod";
static const char __pyx_k_pyx_unpickle_SimpleField[] = "__pyx_unpickle_SimpleField";
static const char __pyx_k_pyx_unpickle_TupleMethod[] = "__pyx_unpickle_TupleMethod";
static const char __pyx_k_pyx_unpickle_UnionMethod[] = "__pyx_unpickle_UnionMethod";
static const char __pyx_k_pyx_unpickle_ValueMethod[] = "__pyx_unpickle_ValueMethod";
static const char __pyx_k_CollectionCheckOnlyMethod[] = "CollectionCheckOnlyMethod";
static const char __pyx_k_pyx_unpickle_ComplexField[] = "__pyx_unpickle_ComplexField";
static const char __pyx_k_pyx_unpickle_ObjectMethod[] = "__pyx_unpickle_ObjectMethod";
static const char __pyx_k_pyx_unpickle_IdentityField[] = "__pyx_unpickle_IdentityField";
static const char __pyx_k_pyx_unpickle_MappingMethod[] = "__pyx_unpickle_MappingMethod";
static const char __pyx_k_pyx_unpickle_WrapperMethod[] = "__pyx_unpickle_WrapperMethod";
static const char __pyx_k_apischema_conversions_utils[] = "apischema.conversions.utils";
static const char __pyx_k_pyx_unpickle_IdentityMethod[] = "__pyx_unpickle_IdentityMethod";
static const char __pyx_k_pyx_unpickle_OptionalMethod[] = "__pyx_unpickle_OptionalMethod";
static const char __pyx_k_pyx_unpickle_SerializedField[] = "__pyx_unpickle_SerializedField";
static const char __pyx_k_pyx_unpickle_TypeCheckMethod[] = "__pyx_unpickle_TypeCheckMethod";
static const char __pyx_k_pyx_unpickle_TypedDictMethod[] = "__pyx_unpickle_TypedDictMethod";
static const char __pyx_k_TypedDictWithAdditionalMethod[] = "TypedDictWithAdditionalMethod";
static const char __pyx_k_pyx_unpickle_CollectionMethod[] = "__pyx_unpickle_CollectionMethod";
static const char __pyx_k_pyx_unpickle_ConversionMethod[] = "__pyx_unpickle_ConversionMethod";
static const char __pyx_k_pyx_unpickle_UnionAlternative[] = "__pyx_unpickle_UnionAlternative";
static const char __pyx_k_apischema_serialization_errors[] = "apischema.serialization.errors";
static const char __pyx_k_pyx_unpickle_CheckedTupleMetho[] = "__pyx_unpickle_CheckedTupleMethod";
static const char __pyx_k_pyx_unpickle_ClassWithFieldsSe[] = "__pyx_unpickle_ClassWithFieldsSetMethod";
static const char __pyx_k_pyx_unpickle_CollectionCheckOn[] = "__pyx_unpickle_CollectionCheckOnlyMethod";
static const char __pyx_k_pyx_unpickle_DiscriminateTyped[] = "__pyx_unpickle_DiscriminateTypedDict";
static const char __pyx_k_pyx_unpickle_DiscriminatedAlte[] = "__pyx_unpickle_DiscriminatedAlternative";
static const char __pyx_k_pyx_unpickle_MappingCheckOnlyM[] = "__pyx_unpickle_MappingCheckOnlyMethod";
static const char __pyx_k_pyx_unpickle_SerializationMeth[] = "__pyx_unpickle_SerializationMethod";
static const char __pyx_k_pyx_unpickle_TupleCheckOnlyMet[] = "__pyx_unpickle_TupleCheckOnlyMethod";
static const char __pyx_k_pyx_unpickle_TypeCheckIdentity[] = "__pyx_unpickle_TypeCheckIdentityMethod";
static const char __pyx_k_pyx_unpickle_TypedDictWithAddi[] = "__pyx_unpickle_TypedDictWithAdditionalMethod";
static const char __pyx_k_apischema_serialization_methods[] = "apischema.serialization.methods";
static const char __pyx_k_Incompatible_checksums_s_vs_0x05[] = "Incompatible checksums (%s vs 0x05289b3 = (_dispatch))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x0b[] = "Incompatible checksums (%s vs 0x0b01ca9 = (_dispatch, wrapped))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x21[] = "Incompatible checksums (%s vs 0x2180c5e = (_dispatch, elt_methods))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x29[] = "Incompatible checksums (%s vs 0x29257f8 = (_dispatch, expected, fallback))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x33[] = "Incompatible checksums (%s vs 0x336f605 = (_dispatch, method, nb_elts))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x4d[] = "Incompatible checksums (%s vs 0x4dbe773 = (_dispatch, expected, fallback, method))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x64[] = "Incompatible checksums (%s vs 0x64c25a2 = (_dispatch, lazy, method))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x6f[] = "Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x93[] = "Incompatible checksums (%s vs 0x938bcc6 = (_dispatch, alias, name, required))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x95[] = "Incompatible checksums (%s vs 0x9526c11 = (_dispatch, tp))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xa6[] = "Incompatible checksums (%s vs 0xa61373f = (_dispatch, cls, method))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xae[] = "Incompatible checksums (%s vs 0xae0e92f = (_dispatch, alias, cls, key, method))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xb0[] = "Incompatible checksums (%s vs 0xb01c51d = (_dispatch, any_method))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xb9[] = "Incompatible checksums (%s vs 0xb99ff26 = (_dispatch, any_method, field_names, fields))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xbb[] = "Incompatible checksums (%s vs 0xbb7bf61 = (_dispatch, key_method, value_method))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xbc[] = "Incompatible checksums (%s vs 0xbcf5656 = (_dispatch, alias, func, method, skip_none, undefined))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xd4[] = "Incompatible checksums (%s vs 0xd48703b = (_dispatch, alias, default_value, method, name, required, skip_default, skip_if, skip_none, skippable, undefined))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xdb[] = "Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xdd[] = "Incompatible checksums (%s vs 0xddc0fd7 = (_dispatch, fallback, field_name, mapping))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xde[] = "Incompatible checksums (%s vs 0xdedeae4 = (_dispatch, factory))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xdf[] = "Incompatible checksums (%s vs 0xdfc9cea = (_dispatch, alternatives, fallback))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xf6[] = "Incompatible checksums (%s vs 0xf60e9e9 = (_dispatch, converter, method))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xfb[] = "Incompatible checksums (%s vs 0xfbe2b2e = (_dispatch, alias, method, name, required))";
static PyObject *__pyx_n_s_AbstractSet;
static PyObject *__pyx_n_s_Any;
static PyObject *__pyx_n_s_AnyFallback;
static PyObject *__pyx_n_s_AnyMethod;
static PyObject *__pyx_n_s_AnyType;
static PyObject *__pyx_n_s_BaseField;
static PyObject *__pyx_n_s_BoolMethod;
static PyObject *__pyx_n_s_Callable;
static PyObject *__pyx_n_s_CheckedTupleMethod;
static PyObject *__pyx_n_s_ClassMethod;
static PyObject *__pyx_n_s_ClassWithFieldsSetMethod;
static PyObject *__pyx_n_s_CollectionCheckOnlyMethod;
static PyObject *__pyx_n_s_CollectionMethod;
static PyObject *__pyx_n_s_ComplexField;
static PyObject *__pyx_n_s_ConversionMethod;
static PyObject *__pyx_n_s_Converter;
static PyObject *__pyx_n_s_Dict;
static PyObject *__pyx_n_s_DictMethod;
static PyObject *__pyx_n_s_DiscriminateTypedDict;
static PyObject *__pyx_n_s_DiscriminatedAlternative;
static PyObject *__pyx_n_s_EnumMethod;
static PyObject *__pyx_kp_u_Expected;
static PyObject *__pyx_n_s_FIELDS_SET_ATTR;
static PyObject *__pyx_n_s_Fallback;
static PyObject *__pyx_n_s_FloatMethod;
static PyObject *__pyx_n_s_IdentityField;
static PyObject *__pyx_n_s_IdentityMethod;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x05;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x0b;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x21;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x29;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x33;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x4d;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x64;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x6f;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x93;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x95;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xa6;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xae;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb0;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb9;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xbb;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xbc;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xd4;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xdb;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xdd;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xde;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xdf;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xf6;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xfb;
static PyObject *__pyx_n_s_IntMethod;
static PyObject *__pyx_n_s_Lazy;
static PyObject *__pyx_n_s_ListMethod;
static PyObject *__pyx_n_s_MappingCheckOnlyMethod;
static PyObject *__pyx_n_s_MappingMethod;
static PyObject *__pyx_n_s_NoFallback;
static PyObject *__pyx_n_s_NoneMethod;
static PyObject *__pyx_n_s_ObjectMethod;
static PyObject *__pyx_n_s_Optional;
static PyObject *__pyx_n_s_OptionalMethod;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_n_s_RecMethod;
static PyObject *__pyx_n_s_SerializationMethod;
static PyObject *__pyx_n_s_SerializedField;
static PyObject *__pyx_n_s_SimpleField;
static PyObject *__pyx_n_s_StrMethod;
static PyObject *__pyx_n_s_Tuple;
static PyObject *__pyx_n_s_TupleCheckOnlyMethod;
static PyObject *__pyx_n_s_TupleMethod;
static PyObject *__pyx_n_s_TypeCheckError;
static PyObject *__pyx_n_s_TypeCheckIdentityMethod;
static PyObject *__pyx_n_s_TypeCheckMethod;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_TypedDictMethod;
static PyObject *__pyx_n_s_TypedDictWithAdditionalMethod;
static PyObject *__pyx_n_s_Undefined;
static PyObject *__pyx_n_s_Union;
static PyObject *__pyx_n_s_UnionAlternative;
static PyObject *__pyx_n_s_UnionMethod;
static PyObject *__pyx_n_s_ValueMethod;
static PyObject *__pyx_n_s_WrapperMethod;
static PyObject *__pyx_n_s_alias;
static PyObject *__pyx_n_s_alternatives;
static PyObject *__pyx_n_s_any_method;
static PyObject *__pyx_n_s_apischema_conversions_utils;
static PyObject *__pyx_n_s_apischema_fields;
static PyObject *__pyx_n_s_apischema_serialization_errors;
static PyObject *__pyx_n_s_apischema_serialization_methods;
static PyObject *__pyx_n_s_apischema_types;
static PyObject *__pyx_n_s_apischema_utils;
static PyObject *__pyx_n_s_class;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_cls;
static PyObject *__pyx_n_s_converter;
static PyObject *__pyx_n_s_dataclass;
static PyObject *__pyx_n_s_dataclasses;
static PyObject *__pyx_n_s_default_value;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_elt_methods;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_exclude_unset;
static PyObject *__pyx_n_s_expected;
static PyObject *__pyx_n_s_factory;
static PyObject *__pyx_n_s_fall_back;
static PyObject *__pyx_n_s_fallback;
static PyObject *__pyx_n_s_field;
static PyObject *__pyx_n_s_field_name;
static PyObject *__pyx_n_s_field_names;
static PyObject *__pyx_n_s_fields;
static PyObject *__pyx_kp_u_found;
static PyObject *__pyx_n_s_func;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_key_method;
static PyObject *__pyx_n_s_lazy;
static PyObject *__pyx_n_s_loc;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_mapping;
static PyObject *__pyx_n_s_method;
static PyObject *__pyx_n_s_msg;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_nb_elts;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_AnyFallback;
static PyObject *__pyx_n_s_pyx_unpickle_AnyMethod;
static PyObject *__pyx_n_s_pyx_unpickle_BaseField;
static PyObject *__pyx_n_s_pyx_unpickle_BoolMethod;
static PyObject *__pyx_n_s_pyx_unpickle_CheckedTupleMetho;
static PyObject *__pyx_n_s_pyx_unpickle_ClassMethod;
static PyObject *__pyx_n_s_pyx_unpickle_ClassWithFieldsSe;
static PyObject *__pyx_n_s_pyx_unpickle_CollectionCheckOn;
static PyObject *__pyx_n_s_pyx_unpickle_CollectionMethod;
static PyObject *__pyx_n_s_pyx_unpickle_ComplexField;
static PyObject *__pyx_n_s_pyx_unpickle_ConversionMethod;
static PyObject *__pyx_n_s_pyx_unpickle_DictMethod;
static PyObject *__pyx_n_s_pyx_unpickle_DiscriminateTyped;
static PyObject *__pyx_n_s_pyx_unpickle_DiscriminatedAlte;
static PyObject *__pyx_n_s_pyx_unpickle_EnumMethod;
static PyObject *__pyx_n_s_pyx_unpickle_Fallback;
static PyObject *__pyx_n_s_pyx_unpickle_FloatMethod;
static PyObject *__pyx_n_s_pyx_unpickle_IdentityField;
static PyObject *__pyx_n_s_pyx_unpickle_IdentityMethod;
static PyObject *__pyx_n_s_pyx_unpickle_IntMethod;
static PyObject *__pyx_n_s_pyx_unpickle_ListMethod;
static PyObject *__pyx_n_s_pyx_unpickle_MappingCheckOnlyM;
static PyObject *__pyx_n_s_pyx_unpickle_MappingMethod;
static PyObject *__pyx_n_s_pyx_unpickle_NoFallback;
static PyObject *__pyx_n_s_pyx_unpickle_NoneMethod;
static PyObject *__pyx_n_s_pyx_unpickle_ObjectMethod;
static PyObject *__pyx_n_s_pyx_unpickle_OptionalMethod;
static PyObject *__pyx_n_s_pyx_unpickle_RecMethod;
static PyObject *__pyx_n_s_pyx_unpickle_SerializationMeth;
static PyObject *__pyx_n_s_pyx_unpickle_SerializedField;
static PyObject *__pyx_n_s_pyx_unpickle_SimpleField;
static PyObject *__pyx_n_s_pyx_unpickle_StrMethod;
static PyObject *__pyx_n_s_pyx_unpickle_TupleCheckOnlyMet;
static PyObject *__pyx_n_s_pyx_unpickle_TupleMethod;
static PyObject *__pyx_n_s_pyx_unpickle_TypeCheckIdentity;
static PyObject *__pyx_n_s_pyx_unpickle_TypeCheckMethod;
static PyObject *__pyx_n_s_pyx_unpickle_TypedDictMethod;
static PyObject *__pyx_n_s_pyx_unpickle_TypedDictWithAddi;
static PyObject *__pyx_n_s_pyx_unpickle_UnionAlternative;
static PyObject *__pyx_n_s_pyx_unpickle_UnionMethod;
static PyObject *__pyx_n_s_pyx_unpickle_ValueMethod;
static PyObject *__pyx_n_s_pyx_unpickle_WrapperMethod;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_range;
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_required;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_serialize;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_skip_default;
static PyObject *__pyx_n_s_skip_if;
static PyObject *__pyx_n_s_skip_none;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_tp;
static PyObject *__pyx_kp_u_tuple;
static PyObject *__pyx_kp_u_tuple_found;
static PyObject *__pyx_n_s_typed_dict;
static PyObject *__pyx_n_s_typing;
static PyObject *__pyx_n_s_undefined;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_update_result;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_value_method;
static PyObject *__pyx_n_s_wrapped;
static PyObject *__pyx_pf_9apischema_13serialization_7methods_19SerializationMethod___reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_19SerializationMethod_2__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_14IdentityMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_14IdentityMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_14IdentityMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_14IdentityMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10ListMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_10ListMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10ListMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10ListMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10DictMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_10DictMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10DictMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10DictMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9StrMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_9StrMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9StrMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9StrMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9IntMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_9IntMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9IntMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9IntMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10BoolMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_10BoolMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10BoolMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10BoolMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11FloatMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_11FloatMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11FloatMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11FloatMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10NoneMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_10NoneMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10NoneMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10NoneMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9RecMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_9RecMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *__pyx_v_self, PyObject *__pyx_v_lazy); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9RecMethod_4lazy___get__(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9RecMethod_6method___get__(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9RecMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9RecMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9AnyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_9AnyMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *__pyx_v_self, PyObject *__pyx_v_factory); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9AnyMethod_7factory___get__(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9AnyMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9AnyMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_8Fallback___reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_Fallback *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_8Fallback_2__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_Fallback *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10NoFallback_fall_back(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_10NoFallback_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *__pyx_v_self, PyObject *__pyx_v_tp); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10NoFallback_2tp___get__(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10NoFallback_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10NoFallback_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11AnyFallback_fall_back(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_11AnyFallback_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *__pyx_v_self, PyObject *__pyx_v_any_method); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11AnyFallback_10any_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11AnyFallback_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11AnyFallback_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_v_self, PyObject *__pyx_v_expected, PyObject *__pyx_v_fallback); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_8expected___get__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_8fallback___get__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v_self, PyObject *__pyx_v_method, PyObject *__pyx_v_expected, PyObject *__pyx_v_fallback); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_6method___get__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_8expected___get__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_8fallback___get__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_value_method); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_12value_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_16CollectionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_16CollectionMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *__pyx_v_self, PyObject *__pyx_v_value_method); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_16CollectionMethod_12value_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_16CollectionMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_16CollectionMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11ValueMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_11ValueMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11ValueMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11ValueMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10EnumMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_10EnumMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *__pyx_v_self, PyObject *__pyx_v_any_method); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10EnumMethod_10any_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10EnumMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10EnumMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_key_method, PyObject *__pyx_v_value_method); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_10key_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_12value_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_13MappingMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_13MappingMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *__pyx_v_self, PyObject *__pyx_v_key_method, PyObject *__pyx_v_value_method); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_13MappingMethod_10key_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_13MappingMethod_12value_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_13MappingMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_13MappingMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9BaseField___reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_BaseField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_9BaseField_2__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_BaseField *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_13IdentityField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_13IdentityField_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_alias, PyObject *__pyx_v_required); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_13IdentityField_4name___get__(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_13IdentityField_5alias___get__(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_13IdentityField_8required___get__(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_13IdentityField_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_13IdentityField_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11SimpleField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_11SimpleField_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_alias, PyObject *__pyx_v_required, PyObject *__pyx_v_method); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11SimpleField_6method___get__(struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11SimpleField_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11SimpleField_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_12ComplexField_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_alias, PyObject *__pyx_v_required, PyObject *__pyx_v_method, PyObject *__pyx_v_skip_if, PyObject *__pyx_v_undefined, PyObject *__pyx_v_skip_none, PyObject *__pyx_v_skip_default, PyObject *__pyx_v_default_value); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_7skip_if___get__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_9undefined___get__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_9skip_none___get__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_12skip_default___get__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_13default_value___get__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_9skippable___get__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15SerializedField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_15SerializedField_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self, PyObject *__pyx_v_alias, PyObject *__pyx_v_func, PyObject *__pyx_v_undefined, PyObject *__pyx_v_skip_none, PyObject *__pyx_v_method); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15SerializedField_5alias___get__(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15SerializedField_4func___get__(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15SerializedField_9undefined___get__(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15SerializedField_9skip_none___get__(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15SerializedField_6method___get__(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15SerializedField_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15SerializedField_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_12ObjectMethod___init__(struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *__pyx_v_self, PyObject *__pyx_v_fields); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ObjectMethod_6fields___get__(struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ObjectMethod_2__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ObjectMethod_4__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11ClassMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_11ClassMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *__pyx_v_self, PyObject *__pyx_v_fields); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11ClassMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11ClassMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *__pyx_v_self, PyObject *__pyx_v_fields); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15TypedDictMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_15TypedDictMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *__pyx_v_self, PyObject *__pyx_v_fields); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15TypedDictMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_15TypedDictMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *__pyx_v_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_field_names, PyObject *__pyx_v_any_method); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_11field_names___get__(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_10any_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_elt_methods); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_11elt_methods___get__(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11TupleMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_11TupleMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *__pyx_v_self, PyObject *__pyx_v_elt_methods); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11TupleMethod_11elt_methods___get__(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11TupleMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11TupleMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_v_self, PyObject *__pyx_v_nb_elts, PyObject *__pyx_v_method); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_7nb_elts___get__(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_6method___get__(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_14OptionalMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_14OptionalMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *__pyx_v_self, PyObject *__pyx_v_value_method); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_14OptionalMethod_12value_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_14OptionalMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_14OptionalMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_serialize(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *__pyx_v_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_method); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_3cls___get__(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_6method___get__(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *__pyx_v_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_method, PyObject *__pyx_v_alias, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_5alias___get__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_3key___get__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11UnionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_11UnionMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *__pyx_v_self, PyObject *__pyx_v_alternatives, PyObject *__pyx_v_fallback); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11UnionMethod_12alternatives___get__(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11UnionMethod_8fallback___get__(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11UnionMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_11UnionMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_13WrapperMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_13WrapperMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *__pyx_v_self, PyObject *__pyx_v_wrapped); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_13WrapperMethod_7wrapped___get__(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_13WrapperMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_13WrapperMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v_self, PyObject *__pyx_v_converter, PyObject *__pyx_v_method); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_9converter___get__(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_6method___get__(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path); /* proto */
static int __pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self, PyObject *__pyx_v_field_name, PyObject *__pyx_v_mapping, PyObject *__pyx_v_fallback); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_10field_name___get__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_7mapping___get__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_8fallback___get__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_serialize_field(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_field, PyObject *__pyx_v_obj, int __pyx_v_typed_dict, int __pyx_v_exclude_unset); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_2get_field_value(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_field, PyObject *__pyx_v_obj, int __pyx_v_typed_dict); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_4__pyx_unpickle_SerializationMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_6__pyx_unpickle_IdentityMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_8__pyx_unpickle_ListMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_10__pyx_unpickle_DictMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_12__pyx_unpickle_StrMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_14__pyx_unpickle_IntMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_16__pyx_unpickle_BoolMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_18__pyx_unpickle_FloatMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_20__pyx_unpickle_NoneMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_22__pyx_unpickle_RecMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_24__pyx_unpickle_AnyMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_26__pyx_unpickle_Fallback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_28__pyx_unpickle_NoFallback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_30__pyx_unpickle_AnyFallback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_32__pyx_unpickle_TypeCheckIdentityMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_34__pyx_unpickle_TypeCheckMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_36__pyx_unpickle_CollectionCheckOnlyMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_38__pyx_unpickle_CollectionMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_40__pyx_unpickle_ValueMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_42__pyx_unpickle_EnumMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_44__pyx_unpickle_MappingCheckOnlyMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_46__pyx_unpickle_MappingMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_48__pyx_unpickle_BaseField(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_50__pyx_unpickle_IdentityField(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_52__pyx_unpickle_SimpleField(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_54__pyx_unpickle_ComplexField(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_56__pyx_unpickle_SerializedField(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_58__pyx_unpickle_ObjectMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_60__pyx_unpickle_ClassMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_62__pyx_unpickle_ClassWithFieldsSetMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_64__pyx_unpickle_TypedDictMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_66__pyx_unpickle_TypedDictWithAdditionalMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_68__pyx_unpickle_TupleCheckOnlyMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_70__pyx_unpickle_TupleMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_72__pyx_unpickle_CheckedTupleMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_74__pyx_unpickle_OptionalMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_76__pyx_unpickle_UnionAlternative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_78__pyx_unpickle_DiscriminatedAlternative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_80__pyx_unpickle_UnionMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_82__pyx_unpickle_WrapperMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_84__pyx_unpickle_ConversionMethod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9apischema_13serialization_7methods_86__pyx_unpickle_DiscriminateTypedDict(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_9apischema_13serialization_7methods_SerializationMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_IdentityMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_ListMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_DictMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_StrMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_IntMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_BoolMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_FloatMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_NoneMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_RecMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_AnyMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_Fallback(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_NoFallback(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_AnyFallback(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_TypeCheckIdentityMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_TypeCheckMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_CollectionCheckOnlyMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_CollectionMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_ValueMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_EnumMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_MappingCheckOnlyMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_MappingMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_BaseField(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_IdentityField(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_SimpleField(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_ComplexField(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_SerializedField(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_ObjectMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_ClassMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_ClassWithFieldsSetMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_TypedDictMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_TupleCheckOnlyMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_TupleMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_CheckedTupleMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_OptionalMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_UnionAlternative(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_DiscriminatedAlternative(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_UnionMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_WrapperMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_ConversionMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_DiscriminateTypedDict(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_update = {0, &__pyx_n_s_update, 0, 0, 0};
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_5409203;
static PyObject *__pyx_int_11541673;
static PyObject *__pyx_int_35130462;
static PyObject *__pyx_int_43145208;
static PyObject *__pyx_int_53933573;
static PyObject *__pyx_int_81520499;
static PyObject *__pyx_int_105653666;
static PyObject *__pyx_int_116866438;
static PyObject *__pyx_int_154713286;
static PyObject *__pyx_int_156396561;
static PyObject *__pyx_int_174143295;
static PyObject *__pyx_int_182511919;
static PyObject *__pyx_int_184665373;
static PyObject *__pyx_int_194641702;
static PyObject *__pyx_int_196591457;
static PyObject *__pyx_int_198137430;
static PyObject *__pyx_int_222851131;
static PyObject *__pyx_int_230527516;
static PyObject *__pyx_int_232525783;
static PyObject *__pyx_int_233695972;
static PyObject *__pyx_int_234659050;
static PyObject *__pyx_int_258009577;
static PyObject *__pyx_int_264121134;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__27;
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__47;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_codeobj__2;
static PyObject *__pyx_codeobj__4;
static PyObject *__pyx_codeobj__6;
static PyObject *__pyx_codeobj__8;
static PyObject *__pyx_codeobj__10;
static PyObject *__pyx_codeobj__12;
static PyObject *__pyx_codeobj__14;
static PyObject *__pyx_codeobj__16;
static PyObject *__pyx_codeobj__18;
static PyObject *__pyx_codeobj__20;
static PyObject *__pyx_codeobj__22;
static PyObject *__pyx_codeobj__24;
static PyObject *__pyx_codeobj__26;
static PyObject *__pyx_codeobj__28;
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__46;
static PyObject *__pyx_codeobj__48;
static PyObject *__pyx_codeobj__50;
static PyObject *__pyx_codeobj__52;
static PyObject *__pyx_codeobj__54;
static PyObject *__pyx_codeobj__56;
static PyObject *__pyx_codeobj__58;
static PyObject *__pyx_codeobj__60;
static PyObject *__pyx_codeobj__62;
static PyObject *__pyx_codeobj__64;
static PyObject *__pyx_codeobj__66;
static PyObject *__pyx_codeobj__68;
static PyObject *__pyx_codeobj__70;
static PyObject *__pyx_codeobj__72;
static PyObject *__pyx_codeobj__74;
static PyObject *__pyx_codeobj__76;
static PyObject *__pyx_codeobj__78;
static PyObject *__pyx_codeobj__80;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__84;
/* Late includes */

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_19SerializationMethod_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_19SerializationMethod_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_9apischema_13serialization_7methods_19SerializationMethod___reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.SerializationMethod.__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_SerializationMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SerializationMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_19SerializationMethod_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_19SerializationMethod_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_9apischema_13serialization_7methods_19SerializationMethod_2__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SerializationMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SerializationMethod__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("apischema.serialization.methods.SerializationMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":17
 * cdef class IdentityMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return IdentityMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_14IdentityMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_14IdentityMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_14IdentityMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_IdentityMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_14IdentityMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 17, __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_obj, __pyx_v_path};
          __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, 17, __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, 17, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":18
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return IdentityMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_IdentityMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":17
 * cdef class IdentityMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return IdentityMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.IdentityMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_14IdentityMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_14IdentityMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 17, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.IdentityMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_14IdentityMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_14IdentityMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_14IdentityMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_IdentityMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.IdentityMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":20
 *         return IdentityMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 0
 * 
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_14IdentityMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_14IdentityMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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 (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_14IdentityMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *)__pyx_v_self));

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

static int __pyx_pf_9apischema_13serialization_7methods_14IdentityMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":21
 * 
 *     def __init__(self):
 *         self._dispatch = 0             # <<<<<<<<<<<<<<
 * 
 * cdef class ListMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 0;

  /* "apischema/serialization/methods.pyx":20
 *         return IdentityMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 0
 * 
 */

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_14IdentityMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_14IdentityMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_14IdentityMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.IdentityMethod.__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_IdentityMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IdentityMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_14IdentityMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_14IdentityMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_14IdentityMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IdentityMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IdentityMethod__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("apischema.serialization.methods.IdentityMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":25
 * cdef class ListMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return ListMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_10ListMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_10ListMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10ListMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_ListMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_10ListMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 25, __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_obj, __pyx_v_path};
          __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, 25, __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, 25, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":26
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return ListMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_ListMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":25
 * cdef class ListMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return ListMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.ListMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10ListMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10ListMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 25, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 25, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.ListMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10ListMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_10ListMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_10ListMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_ListMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ListMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":28
 *         return ListMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 1
 * 
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_10ListMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_10ListMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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 (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10ListMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *)__pyx_v_self));

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

static int __pyx_pf_9apischema_13serialization_7methods_10ListMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":29
 * 
 *     def __init__(self):
 *         self._dispatch = 1             # <<<<<<<<<<<<<<
 * 
 * cdef class DictMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 1;

  /* "apischema/serialization/methods.pyx":28
 *         return ListMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 1
 * 
 */

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10ListMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10ListMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10ListMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.ListMethod.__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_ListMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ListMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10ListMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10ListMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10ListMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ListMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ListMethod__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("apischema.serialization.methods.ListMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":33
 * cdef class DictMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return DictMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_10DictMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_10DictMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10DictMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_DictMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_10DictMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 33, __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_obj, __pyx_v_path};
          __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, 33, __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, 33, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":34
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return DictMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_DictMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":33
 * cdef class DictMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return DictMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.DictMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10DictMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10DictMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 33, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 33, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.DictMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10DictMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_10DictMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_10DictMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_DictMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.DictMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":36
 *         return DictMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 2
 * 
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_10DictMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_10DictMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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 (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10DictMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *)__pyx_v_self));

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

static int __pyx_pf_9apischema_13serialization_7methods_10DictMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":37
 * 
 *     def __init__(self):
 *         self._dispatch = 2             # <<<<<<<<<<<<<<
 * 
 * cdef class StrMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 2;

  /* "apischema/serialization/methods.pyx":36
 *         return DictMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 2
 * 
 */

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10DictMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10DictMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10DictMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.DictMethod.__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_DictMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DictMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10DictMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10DictMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10DictMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DictMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DictMethod__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("apischema.serialization.methods.DictMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":41
 * cdef class StrMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return StrMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_9StrMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_9StrMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9StrMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_StrMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_9StrMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 41, __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_obj, __pyx_v_path};
          __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, 41, __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, 41, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":42
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return StrMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_StrMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":41
 * cdef class StrMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return StrMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.StrMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9StrMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9StrMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 41, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 41, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.StrMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9StrMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_9StrMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_9StrMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_StrMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.StrMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":44
 *         return StrMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 3
 * 
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_9StrMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_9StrMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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 (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9StrMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *)__pyx_v_self));

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

static int __pyx_pf_9apischema_13serialization_7methods_9StrMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":45
 * 
 *     def __init__(self):
 *         self._dispatch = 3             # <<<<<<<<<<<<<<
 * 
 * cdef class IntMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 3;

  /* "apischema/serialization/methods.pyx":44
 *         return StrMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 3
 * 
 */

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9StrMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9StrMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9StrMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.StrMethod.__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_StrMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StrMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9StrMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9StrMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9StrMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StrMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StrMethod__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("apischema.serialization.methods.StrMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":49
 * cdef class IntMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return IntMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_9IntMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_9IntMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9IntMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_IntMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_9IntMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 49, __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_obj, __pyx_v_path};
          __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, 49, __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, 49, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":50
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return IntMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_IntMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":49
 * cdef class IntMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return IntMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.IntMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9IntMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9IntMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 49, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 49, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.IntMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9IntMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_9IntMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_9IntMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_IntMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.IntMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":52
 *         return IntMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 4
 * 
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_9IntMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_9IntMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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 (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9IntMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *)__pyx_v_self));

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

static int __pyx_pf_9apischema_13serialization_7methods_9IntMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":53
 * 
 *     def __init__(self):
 *         self._dispatch = 4             # <<<<<<<<<<<<<<
 * 
 * cdef class BoolMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 4;

  /* "apischema/serialization/methods.pyx":52
 *         return IntMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 4
 * 
 */

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9IntMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9IntMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9IntMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.IntMethod.__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_IntMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9IntMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9IntMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9IntMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntMethod__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("apischema.serialization.methods.IntMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":57
 * cdef class BoolMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return BoolMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_10BoolMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_10BoolMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10BoolMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_BoolMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_10BoolMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 57, __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_obj, __pyx_v_path};
          __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, 57, __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, 57, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":58
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return BoolMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_BoolMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":57
 * cdef class BoolMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return BoolMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.BoolMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10BoolMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10BoolMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 57, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 57, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.BoolMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10BoolMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_10BoolMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_10BoolMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_BoolMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.BoolMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":60
 *         return BoolMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 5
 * 
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_10BoolMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_10BoolMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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 (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10BoolMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *)__pyx_v_self));

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

static int __pyx_pf_9apischema_13serialization_7methods_10BoolMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":61
 * 
 *     def __init__(self):
 *         self._dispatch = 5             # <<<<<<<<<<<<<<
 * 
 * cdef class FloatMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 5;

  /* "apischema/serialization/methods.pyx":60
 *         return BoolMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 5
 * 
 */

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10BoolMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10BoolMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10BoolMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.BoolMethod.__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_BoolMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10BoolMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10BoolMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10BoolMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BoolMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BoolMethod__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("apischema.serialization.methods.BoolMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":65
 * cdef class FloatMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return FloatMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_11FloatMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_11FloatMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11FloatMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_FloatMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_11FloatMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 65, __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_obj, __pyx_v_path};
          __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, 65, __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, 65, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":66
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return FloatMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_FloatMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":65
 * cdef class FloatMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return FloatMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.FloatMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11FloatMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11FloatMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 65, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 65, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.FloatMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11FloatMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_11FloatMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_11FloatMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_FloatMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.FloatMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":68
 *         return FloatMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 6
 * 
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_11FloatMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_11FloatMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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 (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11FloatMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *)__pyx_v_self));

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

static int __pyx_pf_9apischema_13serialization_7methods_11FloatMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":69
 * 
 *     def __init__(self):
 *         self._dispatch = 6             # <<<<<<<<<<<<<<
 * 
 * cdef class NoneMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 6;

  /* "apischema/serialization/methods.pyx":68
 *         return FloatMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 6
 * 
 */

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11FloatMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11FloatMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11FloatMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.FloatMethod.__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_FloatMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11FloatMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11FloatMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11FloatMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatMethod__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("apischema.serialization.methods.FloatMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":73
 * cdef class NoneMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return NoneMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoneMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_10NoneMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10NoneMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_NoneMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_10NoneMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 73, __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_obj, __pyx_v_path};
          __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, 73, __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, 73, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":74
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return NoneMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_NoneMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":73
 * cdef class NoneMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return NoneMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.NoneMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoneMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoneMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 73, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 73, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.NoneMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10NoneMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_10NoneMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_10NoneMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_NoneMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.NoneMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":76
 *         return NoneMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 7
 * 
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_10NoneMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_10NoneMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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 (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10NoneMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *)__pyx_v_self));

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

static int __pyx_pf_9apischema_13serialization_7methods_10NoneMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":77
 * 
 *     def __init__(self):
 *         self._dispatch = 7             # <<<<<<<<<<<<<<
 * 
 * cdef class RecMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 7;

  /* "apischema/serialization/methods.pyx":76
 *         return NoneMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 7
 * 
 */

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoneMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoneMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10NoneMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.NoneMethod.__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_NoneMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NoneMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoneMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoneMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10NoneMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NoneMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NoneMethod__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("apischema.serialization.methods.NoneMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":83
 *     cdef readonly object method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return RecMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_9RecMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_9RecMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9RecMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_RecMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_9RecMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 83, __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_obj, __pyx_v_path};
          __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, 83, __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, 83, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":84
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return RecMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, lazy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_RecMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":83
 *     cdef readonly object method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return RecMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.RecMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9RecMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9RecMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 83, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 83, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.RecMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9RecMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_9RecMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_9RecMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_RecMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.RecMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":86
 *         return RecMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, lazy):             # <<<<<<<<<<<<<<
 *         self.lazy = lazy
 *         self.method = None
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_9RecMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_9RecMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_lazy = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lazy,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_lazy)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 86, __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_lazy = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 86, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.RecMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9RecMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *)__pyx_v_self), __pyx_v_lazy);

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

static int __pyx_pf_9apischema_13serialization_7methods_9RecMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *__pyx_v_self, PyObject *__pyx_v_lazy) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":87
 * 
 *     def __init__(self, lazy):
 *         self.lazy = lazy             # <<<<<<<<<<<<<<
 *         self.method = None
 *         self._dispatch = 8
 */
  __Pyx_INCREF(__pyx_v_lazy);
  __Pyx_GIVEREF(__pyx_v_lazy);
  __Pyx_GOTREF(__pyx_v_self->lazy);
  __Pyx_DECREF(__pyx_v_self->lazy);
  __pyx_v_self->lazy = __pyx_v_lazy;

  /* "apischema/serialization/methods.pyx":88
 *     def __init__(self, lazy):
 *         self.lazy = lazy
 *         self.method = None             # <<<<<<<<<<<<<<
 *         self._dispatch = 8
 * 
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->method);
  __Pyx_DECREF(__pyx_v_self->method);
  __pyx_v_self->method = Py_None;

  /* "apischema/serialization/methods.pyx":89
 *         self.lazy = lazy
 *         self.method = None
 *         self._dispatch = 8             # <<<<<<<<<<<<<<
 * 
 * cdef class AnyMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 8;

  /* "apischema/serialization/methods.pyx":86
 *         return RecMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, lazy):             # <<<<<<<<<<<<<<
 *         self.lazy = lazy
 *         self.method = None
 */

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

/* "apischema/serialization/methods.pyx":80
 * 
 * cdef class RecMethod(SerializationMethod):
 *     cdef readonly object lazy             # <<<<<<<<<<<<<<
 *     cdef readonly object method
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9RecMethod_4lazy_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9RecMethod_4lazy_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9RecMethod_4lazy___get__(((struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_9RecMethod_4lazy___get__(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->lazy);
  __pyx_r = __pyx_v_self->lazy;
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":81
 * cdef class RecMethod(SerializationMethod):
 *     cdef readonly object lazy
 *     cdef readonly object method             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9RecMethod_6method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9RecMethod_6method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9RecMethod_6method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_9RecMethod_6method___get__(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->method);
  __pyx_r = __pyx_v_self->method;
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9RecMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9RecMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9RecMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.lazy, self.method)
 *     _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.lazy is not None or self.method is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_RecMethod, (type(self), 0x64c25a2, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->lazy != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->method != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    __pyx_t_4 = __pyx_t_3;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.lazy is not None or self.method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_RecMethod, (type(self), 0x64c25a2, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.lazy is not None or self.method is not None
 *     if use_setstate:
 *         return __pyx_unpickle_RecMethod, (type(self), 0x64c25a2, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_RecMethod, (type(self), 0x64c25a2, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_RecMethod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_105653666);
    __Pyx_GIVEREF(__pyx_int_105653666);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_105653666);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.lazy is not None or self.method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_RecMethod, (type(self), 0x64c25a2, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.RecMethod.__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_RecMethod, (type(self), 0x64c25a2, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RecMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9RecMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9RecMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9RecMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RecMethod, (type(self), 0x64c25a2, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RecMethod__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("apischema.serialization.methods.RecMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":94
 *     cdef readonly object factory
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return AnyMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_9AnyMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_9AnyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9AnyMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_AnyMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_9AnyMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 94, __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_obj, __pyx_v_path};
          __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, 94, __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, 94, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":95
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return AnyMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, factory):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_AnyMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":94
 *     cdef readonly object factory
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return AnyMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.AnyMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9AnyMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9AnyMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 94, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 94, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.AnyMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9AnyMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_9AnyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_9AnyMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_AnyMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.AnyMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":97
 *         return AnyMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, factory):             # <<<<<<<<<<<<<<
 *         self.factory = factory
 *         self._dispatch = 9
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_9AnyMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_9AnyMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_factory = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_factory,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_factory)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 97, __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_factory = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 97, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.AnyMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9AnyMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *)__pyx_v_self), __pyx_v_factory);

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

static int __pyx_pf_9apischema_13serialization_7methods_9AnyMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *__pyx_v_self, PyObject *__pyx_v_factory) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":98
 * 
 *     def __init__(self, factory):
 *         self.factory = factory             # <<<<<<<<<<<<<<
 *         self._dispatch = 9
 * 
 */
  __Pyx_INCREF(__pyx_v_factory);
  __Pyx_GIVEREF(__pyx_v_factory);
  __Pyx_GOTREF(__pyx_v_self->factory);
  __Pyx_DECREF(__pyx_v_self->factory);
  __pyx_v_self->factory = __pyx_v_factory;

  /* "apischema/serialization/methods.pyx":99
 *     def __init__(self, factory):
 *         self.factory = factory
 *         self._dispatch = 9             # <<<<<<<<<<<<<<
 * 
 * cdef class Fallback():
 */
  __pyx_v_self->__pyx_base._dispatch = 9;

  /* "apischema/serialization/methods.pyx":97
 *         return AnyMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, factory):             # <<<<<<<<<<<<<<
 *         self.factory = factory
 *         self._dispatch = 9
 */

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

/* "apischema/serialization/methods.pyx":92
 * 
 * cdef class AnyMethod(SerializationMethod):
 *     cdef readonly object factory             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9AnyMethod_7factory_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9AnyMethod_7factory_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9AnyMethod_7factory___get__(((struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_9AnyMethod_7factory___get__(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->factory);
  __pyx_r = __pyx_v_self->factory;
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9AnyMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9AnyMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9AnyMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.factory)
 *     _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.factory is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_AnyMethod, (type(self), 0xdedeae4, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->factory != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.factory is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_AnyMethod, (type(self), 0xdedeae4, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.factory is not None
 *     if use_setstate:
 *         return __pyx_unpickle_AnyMethod, (type(self), 0xdedeae4, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_AnyMethod, (type(self), 0xdedeae4, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_AnyMethod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_233695972);
    __Pyx_GIVEREF(__pyx_int_233695972);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_233695972);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.factory is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_AnyMethod, (type(self), 0xdedeae4, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.AnyMethod.__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_AnyMethod, (type(self), 0xdedeae4, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_AnyMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9AnyMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9AnyMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_9AnyMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_AnyMethod, (type(self), 0xdedeae4, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_AnyMethod__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("apischema.serialization.methods.AnyMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_8Fallback_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_8Fallback_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_9apischema_13serialization_7methods_8Fallback___reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)__pyx_v_self));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.Fallback.__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_Fallback, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Fallback__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_8Fallback_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_8Fallback_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_9apischema_13serialization_7methods_8Fallback_2__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Fallback, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Fallback__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("apischema.serialization.methods.Fallback.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":107
 *     cdef readonly object tp
 * 
 *     cpdef fall_back(self, object obj, object path):             # <<<<<<<<<<<<<<
 *         return NoFallback_fall_back(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoFallback_1fall_back(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_10NoFallback_fall_back(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fall_back", 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_fall_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_10NoFallback_1fall_back)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 107, __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_obj, __pyx_v_path};
          __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, 107, __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, 107, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":108
 * 
 *     cpdef fall_back(self, object obj, object path):
 *         return NoFallback_fall_back(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, tp):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_NoFallback_fall_back(__pyx_v_self, __pyx_v_obj, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":107
 *     cdef readonly object tp
 * 
 *     cpdef fall_back(self, object obj, object path):             # <<<<<<<<<<<<<<
 *         return NoFallback_fall_back(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.NoFallback.fall_back", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoFallback_1fall_back(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoFallback_1fall_back(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fall_back (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_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_path)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fall_back", 1, 2, 2, 1); __PYX_ERR(0, 107, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fall_back") < 0)) __PYX_ERR(0, 107, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fall_back", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 107, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.NoFallback.fall_back", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10NoFallback_fall_back(((struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_10NoFallback_fall_back(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fall_back", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_10NoFallback_fall_back(__pyx_v_self, __pyx_v_obj, __pyx_v_path, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.NoFallback.fall_back", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":110
 *         return NoFallback_fall_back(self, obj, path)
 * 
 *     def __init__(self, tp):             # <<<<<<<<<<<<<<
 *         self.tp = tp
 *         self._dispatch = 0
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_10NoFallback_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_10NoFallback_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tp = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tp,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_tp)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 110, __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_tp = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 110, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.NoFallback.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10NoFallback_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *)__pyx_v_self), __pyx_v_tp);

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

static int __pyx_pf_9apischema_13serialization_7methods_10NoFallback_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *__pyx_v_self, PyObject *__pyx_v_tp) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":111
 * 
 *     def __init__(self, tp):
 *         self.tp = tp             # <<<<<<<<<<<<<<
 *         self._dispatch = 0
 * 
 */
  __Pyx_INCREF(__pyx_v_tp);
  __Pyx_GIVEREF(__pyx_v_tp);
  __Pyx_GOTREF(__pyx_v_self->tp);
  __Pyx_DECREF(__pyx_v_self->tp);
  __pyx_v_self->tp = __pyx_v_tp;

  /* "apischema/serialization/methods.pyx":112
 *     def __init__(self, tp):
 *         self.tp = tp
 *         self._dispatch = 0             # <<<<<<<<<<<<<<
 * 
 * cdef class AnyFallback(Fallback):
 */
  __pyx_v_self->__pyx_base._dispatch = 0;

  /* "apischema/serialization/methods.pyx":110
 *         return NoFallback_fall_back(self, obj, path)
 * 
 *     def __init__(self, tp):             # <<<<<<<<<<<<<<
 *         self.tp = tp
 *         self._dispatch = 0
 */

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

/* "apischema/serialization/methods.pyx":105
 * 
 * cdef class NoFallback(Fallback):
 *     cdef readonly object tp             # <<<<<<<<<<<<<<
 * 
 *     cpdef fall_back(self, object obj, object path):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoFallback_2tp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoFallback_2tp_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10NoFallback_2tp___get__(((struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_10NoFallback_2tp___get__(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->tp);
  __pyx_r = __pyx_v_self->tp;
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoFallback_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoFallback_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10NoFallback_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.tp)
 *     _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.tp is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_NoFallback, (type(self), 0x9526c11, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->tp != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.tp is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_NoFallback, (type(self), 0x9526c11, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.tp is not None
 *     if use_setstate:
 *         return __pyx_unpickle_NoFallback, (type(self), 0x9526c11, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_NoFallback, (type(self), 0x9526c11, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_NoFallback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_156396561);
    __Pyx_GIVEREF(__pyx_int_156396561);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_156396561);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.tp is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_NoFallback, (type(self), 0x9526c11, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.NoFallback.__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_NoFallback, (type(self), 0x9526c11, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NoFallback__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoFallback_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10NoFallback_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10NoFallback_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_NoFallback, (type(self), 0x9526c11, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_NoFallback__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("apischema.serialization.methods.NoFallback.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":117
 *     cdef readonly SerializationMethod any_method
 * 
 *     cpdef fall_back(self, object obj, object path):             # <<<<<<<<<<<<<<
 *         return AnyFallback_fall_back(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_11AnyFallback_1fall_back(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_11AnyFallback_fall_back(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fall_back", 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_fall_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_11AnyFallback_1fall_back)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 117, __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_obj, __pyx_v_path};
          __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, 117, __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, 117, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":118
 * 
 *     cpdef fall_back(self, object obj, object path):
 *         return AnyFallback_fall_back(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, any_method):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_AnyFallback_fall_back(__pyx_v_self, __pyx_v_obj, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":117
 *     cdef readonly SerializationMethod any_method
 * 
 *     cpdef fall_back(self, object obj, object path):             # <<<<<<<<<<<<<<
 *         return AnyFallback_fall_back(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.AnyFallback.fall_back", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11AnyFallback_1fall_back(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11AnyFallback_1fall_back(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fall_back (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_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_path)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fall_back", 1, 2, 2, 1); __PYX_ERR(0, 117, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fall_back") < 0)) __PYX_ERR(0, 117, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fall_back", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 117, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.AnyFallback.fall_back", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11AnyFallback_fall_back(((struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_11AnyFallback_fall_back(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fall_back", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_11AnyFallback_fall_back(__pyx_v_self, __pyx_v_obj, __pyx_v_path, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.AnyFallback.fall_back", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":120
 *         return AnyFallback_fall_back(self, obj, path)
 * 
 *     def __init__(self, any_method):             # <<<<<<<<<<<<<<
 *         self.any_method = any_method
 *         self._dispatch = 1
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_11AnyFallback_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_11AnyFallback_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_any_method = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_any_method,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_any_method)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 120, __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_any_method = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 120, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.AnyFallback.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11AnyFallback_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *)__pyx_v_self), __pyx_v_any_method);

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

static int __pyx_pf_9apischema_13serialization_7methods_11AnyFallback_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *__pyx_v_self, PyObject *__pyx_v_any_method) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":121
 * 
 *     def __init__(self, any_method):
 *         self.any_method = any_method             # <<<<<<<<<<<<<<
 *         self._dispatch = 1
 * 
 */
  if (!(likely(((__pyx_v_any_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_any_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 121, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_any_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->any_method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->any_method));
  __pyx_v_self->any_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":122
 *     def __init__(self, any_method):
 *         self.any_method = any_method
 *         self._dispatch = 1             # <<<<<<<<<<<<<<
 * 
 * cdef class TypeCheckIdentityMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 1;

  /* "apischema/serialization/methods.pyx":120
 *         return AnyFallback_fall_back(self, obj, path)
 * 
 *     def __init__(self, any_method):             # <<<<<<<<<<<<<<
 *         self.any_method = any_method
 *         self._dispatch = 1
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.AnyFallback.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":115
 * 
 * cdef class AnyFallback(Fallback):
 *     cdef readonly SerializationMethod any_method             # <<<<<<<<<<<<<<
 * 
 *     cpdef fall_back(self, object obj, object path):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11AnyFallback_10any_method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11AnyFallback_10any_method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11AnyFallback_10any_method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_11AnyFallback_10any_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->any_method));
  __pyx_r = ((PyObject *)__pyx_v_self->any_method);
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11AnyFallback_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11AnyFallback_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11AnyFallback_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.any_method)
 *     _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.any_method is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_AnyFallback, (type(self), 0xb01c51d, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->any_method) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.any_method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_AnyFallback, (type(self), 0xb01c51d, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.any_method is not None
 *     if use_setstate:
 *         return __pyx_unpickle_AnyFallback, (type(self), 0xb01c51d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_AnyFallback, (type(self), 0xb01c51d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_AnyFallback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_184665373);
    __Pyx_GIVEREF(__pyx_int_184665373);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_184665373);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.any_method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_AnyFallback, (type(self), 0xb01c51d, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.AnyFallback.__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_AnyFallback, (type(self), 0xb01c51d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_AnyFallback__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11AnyFallback_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11AnyFallback_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11AnyFallback_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_AnyFallback, (type(self), 0xb01c51d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_AnyFallback__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("apischema.serialization.methods.AnyFallback.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":128
 *     cdef readonly Fallback fallback
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TypeCheckIdentityMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_TypeCheckIdentityMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 128, __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_obj, __pyx_v_path};
          __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, 128, __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, 128, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":129
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return TypeCheckIdentityMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, expected, fallback):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_TypeCheckIdentityMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":128
 *     cdef readonly Fallback fallback
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TypeCheckIdentityMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.TypeCheckIdentityMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 128, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 128, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.TypeCheckIdentityMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_TypeCheckIdentityMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.TypeCheckIdentityMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":131
 *         return TypeCheckIdentityMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, expected, fallback):             # <<<<<<<<<<<<<<
 *         self.expected = expected
 *         self.fallback = fallback
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_expected = 0;
  PyObject *__pyx_v_fallback = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_expected,&__pyx_n_s_fallback,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_expected)) != 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_fallback)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 131, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 131, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_expected = values[0];
    __pyx_v_fallback = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 131, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.TypeCheckIdentityMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *)__pyx_v_self), __pyx_v_expected, __pyx_v_fallback);

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

static int __pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_v_self, PyObject *__pyx_v_expected, PyObject *__pyx_v_fallback) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":132
 * 
 *     def __init__(self, expected, fallback):
 *         self.expected = expected             # <<<<<<<<<<<<<<
 *         self.fallback = fallback
 *         self._dispatch = 10
 */
  __Pyx_INCREF(__pyx_v_expected);
  __Pyx_GIVEREF(__pyx_v_expected);
  __Pyx_GOTREF(__pyx_v_self->expected);
  __Pyx_DECREF(__pyx_v_self->expected);
  __pyx_v_self->expected = __pyx_v_expected;

  /* "apischema/serialization/methods.pyx":133
 *     def __init__(self, expected, fallback):
 *         self.expected = expected
 *         self.fallback = fallback             # <<<<<<<<<<<<<<
 *         self._dispatch = 10
 * 
 */
  if (!(likely(((__pyx_v_fallback) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_fallback, __pyx_ptype_9apischema_13serialization_7methods_Fallback))))) __PYX_ERR(0, 133, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_fallback;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->fallback);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->fallback));
  __pyx_v_self->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":134
 *         self.expected = expected
 *         self.fallback = fallback
 *         self._dispatch = 10             # <<<<<<<<<<<<<<
 * 
 * cdef class TypeCheckMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 10;

  /* "apischema/serialization/methods.pyx":131
 *         return TypeCheckIdentityMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, expected, fallback):             # <<<<<<<<<<<<<<
 *         self.expected = expected
 *         self.fallback = fallback
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.TypeCheckIdentityMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":125
 * 
 * cdef class TypeCheckIdentityMethod(SerializationMethod):
 *     cdef readonly object expected             # <<<<<<<<<<<<<<
 *     cdef readonly Fallback fallback
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_8expected_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_8expected_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_8expected___get__(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_8expected___get__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->expected);
  __pyx_r = __pyx_v_self->expected;
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":126
 * cdef class TypeCheckIdentityMethod(SerializationMethod):
 *     cdef readonly object expected
 *     cdef readonly Fallback fallback             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_8fallback_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_8fallback_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_8fallback___get__(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_8fallback___get__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->fallback));
  __pyx_r = ((PyObject *)__pyx_v_self->fallback);
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.expected is not None or self.fallback is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TypeCheckIdentityMethod, (type(self), 0x29257f8, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->expected != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->fallback) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    __pyx_t_4 = __pyx_t_3;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.expected is not None or self.fallback is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TypeCheckIdentityMethod, (type(self), 0x29257f8, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.expected is not None or self.fallback is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TypeCheckIdentityMethod, (type(self), 0x29257f8, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TypeCheckIdentityMethod, (type(self), 0x29257f8, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TypeCheckIdentity); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_43145208);
    __Pyx_GIVEREF(__pyx_int_43145208);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_43145208);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.expected is not None or self.fallback is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TypeCheckIdentityMethod, (type(self), 0x29257f8, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.TypeCheckIdentityMethod.__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_TypeCheckIdentityMethod, (type(self), 0x29257f8, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TypeCheckIdentityMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TypeCheckIdentityMethod, (type(self), 0x29257f8, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TypeCheckIdentityMethod__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("apischema.serialization.methods.TypeCheckIdentityMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":141
 *     cdef readonly Fallback fallback
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TypeCheckMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_15TypeCheckMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_15TypeCheckMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_TypeCheckMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 141, __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_obj, __pyx_v_path};
          __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, 141, __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, 141, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":142
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return TypeCheckMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, method, expected, fallback):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_TypeCheckMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":141
 *     cdef readonly Fallback fallback
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TypeCheckMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.TypeCheckMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 141, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 141, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.TypeCheckMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_15TypeCheckMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_TypeCheckMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.TypeCheckMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":144
 *         return TypeCheckMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, method, expected, fallback):             # <<<<<<<<<<<<<<
 *         self.method = method
 *         self.expected = expected
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_method = 0;
  PyObject *__pyx_v_expected = 0;
  PyObject *__pyx_v_fallback = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_method,&__pyx_n_s_expected,&__pyx_n_s_fallback,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_method)) != 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_expected)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 144, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fallback)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 144, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 144, __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_method = values[0];
    __pyx_v_expected = values[1];
    __pyx_v_fallback = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 144, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.TypeCheckMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *)__pyx_v_self), __pyx_v_method, __pyx_v_expected, __pyx_v_fallback);

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

static int __pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v_self, PyObject *__pyx_v_method, PyObject *__pyx_v_expected, PyObject *__pyx_v_fallback) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":145
 * 
 *     def __init__(self, method, expected, fallback):
 *         self.method = method             # <<<<<<<<<<<<<<
 *         self.expected = expected
 *         self.fallback = fallback
 */
  if (!(likely(((__pyx_v_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 145, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->method));
  __pyx_v_self->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":146
 *     def __init__(self, method, expected, fallback):
 *         self.method = method
 *         self.expected = expected             # <<<<<<<<<<<<<<
 *         self.fallback = fallback
 *         self._dispatch = 11
 */
  __Pyx_INCREF(__pyx_v_expected);
  __Pyx_GIVEREF(__pyx_v_expected);
  __Pyx_GOTREF(__pyx_v_self->expected);
  __Pyx_DECREF(__pyx_v_self->expected);
  __pyx_v_self->expected = __pyx_v_expected;

  /* "apischema/serialization/methods.pyx":147
 *         self.method = method
 *         self.expected = expected
 *         self.fallback = fallback             # <<<<<<<<<<<<<<
 *         self._dispatch = 11
 * 
 */
  if (!(likely(((__pyx_v_fallback) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_fallback, __pyx_ptype_9apischema_13serialization_7methods_Fallback))))) __PYX_ERR(0, 147, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_fallback;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->fallback);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->fallback));
  __pyx_v_self->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":148
 *         self.expected = expected
 *         self.fallback = fallback
 *         self._dispatch = 11             # <<<<<<<<<<<<<<
 * 
 * cdef class CollectionCheckOnlyMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 11;

  /* "apischema/serialization/methods.pyx":144
 *         return TypeCheckMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, method, expected, fallback):             # <<<<<<<<<<<<<<
 *         self.method = method
 *         self.expected = expected
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.TypeCheckMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":137
 * 
 * cdef class TypeCheckMethod(SerializationMethod):
 *     cdef readonly SerializationMethod method             # <<<<<<<<<<<<<<
 *     cdef readonly object expected
 *     cdef readonly Fallback fallback
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_6method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_6method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_6method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_6method___get__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->method));
  __pyx_r = ((PyObject *)__pyx_v_self->method);
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":138
 * cdef class TypeCheckMethod(SerializationMethod):
 *     cdef readonly SerializationMethod method
 *     cdef readonly object expected             # <<<<<<<<<<<<<<
 *     cdef readonly Fallback fallback
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_8expected_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_8expected_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_8expected___get__(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_8expected___get__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->expected);
  __pyx_r = __pyx_v_self->expected;
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":139
 *     cdef readonly SerializationMethod method
 *     cdef readonly object expected
 *     cdef readonly Fallback fallback             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_8fallback_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_8fallback_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_8fallback___get__(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_8fallback___get__(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->fallback));
  __pyx_r = ((PyObject *)__pyx_v_self->fallback);
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.expected, self.fallback, self.method)
 *     _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.expected is not None or self.fallback is not None or self.method is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TypeCheckMethod, (type(self), 0x4dbe773, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->expected != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->fallback) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_4 = __pyx_t_3;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = (((PyObject *)__pyx_v_self->method) != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    __pyx_t_4 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.expected is not None or self.fallback is not None or self.method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TypeCheckMethod, (type(self), 0x4dbe773, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.expected is not None or self.fallback is not None or self.method is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TypeCheckMethod, (type(self), 0x4dbe773, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TypeCheckMethod, (type(self), 0x4dbe773, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TypeCheckMethod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_81520499);
    __Pyx_GIVEREF(__pyx_int_81520499);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_81520499);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.expected is not None or self.fallback is not None or self.method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TypeCheckMethod, (type(self), 0x4dbe773, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.TypeCheckMethod.__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_TypeCheckMethod, (type(self), 0x4dbe773, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TypeCheckMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15TypeCheckMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TypeCheckMethod, (type(self), 0x4dbe773, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TypeCheckMethod__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("apischema.serialization.methods.TypeCheckMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":153
 *     cdef readonly SerializationMethod value_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return CollectionCheckOnlyMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_CollectionCheckOnlyMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 153, __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_obj, __pyx_v_path};
          __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, 153, __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, 153, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":154
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return CollectionCheckOnlyMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, value_method):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_CollectionCheckOnlyMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":153
 *     cdef readonly SerializationMethod value_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return CollectionCheckOnlyMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.CollectionCheckOnlyMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 153, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 153, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.CollectionCheckOnlyMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_CollectionCheckOnlyMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.CollectionCheckOnlyMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":156
 *         return CollectionCheckOnlyMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, value_method):             # <<<<<<<<<<<<<<
 *         self.value_method = value_method
 *         self._dispatch = 12
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value_method = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value_method,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value_method)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 156, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_value_method = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 156, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.CollectionCheckOnlyMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *)__pyx_v_self), __pyx_v_value_method);

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

static int __pyx_pf_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_value_method) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":157
 * 
 *     def __init__(self, value_method):
 *         self.value_method = value_method             # <<<<<<<<<<<<<<
 *         self._dispatch = 12
 * 
 */
  if (!(likely(((__pyx_v_value_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 157, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->value_method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->value_method));
  __pyx_v_self->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":158
 *     def __init__(self, value_method):
 *         self.value_method = value_method
 *         self._dispatch = 12             # <<<<<<<<<<<<<<
 * 
 * cdef class CollectionMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 12;

  /* "apischema/serialization/methods.pyx":156
 *         return CollectionCheckOnlyMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, value_method):             # <<<<<<<<<<<<<<
 *         self.value_method = value_method
 *         self._dispatch = 12
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.CollectionCheckOnlyMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":151
 * 
 * cdef class CollectionCheckOnlyMethod(SerializationMethod):
 *     cdef readonly SerializationMethod value_method             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_12value_method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_12value_method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_12value_method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_12value_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->value_method));
  __pyx_r = ((PyObject *)__pyx_v_self->value_method);
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.value_method is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_CollectionCheckOnlyMethod, (type(self), 0x6f73d86, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->value_method) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.value_method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CollectionCheckOnlyMethod, (type(self), 0x6f73d86, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.value_method is not None
 *     if use_setstate:
 *         return __pyx_unpickle_CollectionCheckOnlyMethod, (type(self), 0x6f73d86, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CollectionCheckOnlyMethod, (type(self), 0x6f73d86, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_CollectionCheckOn); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_116866438);
    __Pyx_GIVEREF(__pyx_int_116866438);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_116866438);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.value_method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CollectionCheckOnlyMethod, (type(self), 0x6f73d86, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.CollectionCheckOnlyMethod.__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_CollectionCheckOnlyMethod, (type(self), 0x6f73d86, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CollectionCheckOnlyMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CollectionCheckOnlyMethod, (type(self), 0x6f73d86, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CollectionCheckOnlyMethod__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("apischema.serialization.methods.CollectionCheckOnlyMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":163
 *     cdef readonly SerializationMethod value_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return CollectionMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_16CollectionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_16CollectionMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_CollectionMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 163, __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_obj, __pyx_v_path};
          __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, 163, __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, 163, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":164
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return CollectionMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, value_method):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_CollectionMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":163
 *     cdef readonly SerializationMethod value_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return CollectionMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.CollectionMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 163, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 163, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.CollectionMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16CollectionMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_16CollectionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_16CollectionMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_CollectionMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.CollectionMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":166
 *         return CollectionMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, value_method):             # <<<<<<<<<<<<<<
 *         self.value_method = value_method
 *         self._dispatch = 13
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value_method = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value_method,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value_method)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 166, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_value_method = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 166, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.CollectionMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16CollectionMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *)__pyx_v_self), __pyx_v_value_method);

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

static int __pyx_pf_9apischema_13serialization_7methods_16CollectionMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *__pyx_v_self, PyObject *__pyx_v_value_method) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":167
 * 
 *     def __init__(self, value_method):
 *         self.value_method = value_method             # <<<<<<<<<<<<<<
 *         self._dispatch = 13
 * 
 */
  if (!(likely(((__pyx_v_value_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 167, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->value_method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->value_method));
  __pyx_v_self->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":168
 *     def __init__(self, value_method):
 *         self.value_method = value_method
 *         self._dispatch = 13             # <<<<<<<<<<<<<<
 * 
 * cdef class ValueMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 13;

  /* "apischema/serialization/methods.pyx":166
 *         return CollectionMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, value_method):             # <<<<<<<<<<<<<<
 *         self.value_method = value_method
 *         self._dispatch = 13
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.CollectionMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":161
 * 
 * cdef class CollectionMethod(SerializationMethod):
 *     cdef readonly SerializationMethod value_method             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_12value_method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_12value_method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16CollectionMethod_12value_method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_16CollectionMethod_12value_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->value_method));
  __pyx_r = ((PyObject *)__pyx_v_self->value_method);
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16CollectionMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.value_method is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_CollectionMethod, (type(self), 0x6f73d86, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->value_method) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.value_method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CollectionMethod, (type(self), 0x6f73d86, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.value_method is not None
 *     if use_setstate:
 *         return __pyx_unpickle_CollectionMethod, (type(self), 0x6f73d86, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CollectionMethod, (type(self), 0x6f73d86, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_CollectionMethod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_116866438);
    __Pyx_GIVEREF(__pyx_int_116866438);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_116866438);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.value_method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CollectionMethod, (type(self), 0x6f73d86, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.CollectionMethod.__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_CollectionMethod, (type(self), 0x6f73d86, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CollectionMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16CollectionMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CollectionMethod, (type(self), 0x6f73d86, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CollectionMethod__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("apischema.serialization.methods.CollectionMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":172
 * cdef class ValueMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return ValueMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_11ValueMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_11ValueMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11ValueMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_ValueMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_11ValueMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 172, __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_obj, __pyx_v_path};
          __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, 172, __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, 172, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":173
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return ValueMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_ValueMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); 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;

  /* "apischema/serialization/methods.pyx":172
 * cdef class ValueMethod(SerializationMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return ValueMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.ValueMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11ValueMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11ValueMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 172, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 172, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.ValueMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11ValueMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_11ValueMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_11ValueMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_ValueMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ValueMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":175
 *         return ValueMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 14
 * 
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_11ValueMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_11ValueMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  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 (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11ValueMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *)__pyx_v_self));

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

static int __pyx_pf_9apischema_13serialization_7methods_11ValueMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":176
 * 
 *     def __init__(self):
 *         self._dispatch = 14             # <<<<<<<<<<<<<<
 * 
 * cdef class EnumMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 14;

  /* "apischema/serialization/methods.pyx":175
 *         return ValueMethod_serialize(self, obj, path)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._dispatch = 14
 * 
 */

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11ValueMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11ValueMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11ValueMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.ValueMethod.__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_ValueMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ValueMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11ValueMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11ValueMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11ValueMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ValueMethod, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ValueMethod__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("apischema.serialization.methods.ValueMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":181
 *     cdef readonly AnyMethod any_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return EnumMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_10EnumMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_10EnumMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10EnumMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_EnumMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_10EnumMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 181, __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_obj, __pyx_v_path};
          __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, 181, __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, 181, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":182
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return EnumMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, any_method):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_EnumMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":181
 *     cdef readonly AnyMethod any_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return EnumMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.EnumMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10EnumMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10EnumMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 181, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 181, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.EnumMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10EnumMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_10EnumMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_10EnumMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_EnumMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.EnumMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":184
 *         return EnumMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, any_method):             # <<<<<<<<<<<<<<
 *         self.any_method = any_method
 *         self._dispatch = 15
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_10EnumMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_10EnumMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_any_method = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_any_method,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_any_method)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 184, __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_any_method = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 184, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.EnumMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10EnumMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *)__pyx_v_self), __pyx_v_any_method);

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

static int __pyx_pf_9apischema_13serialization_7methods_10EnumMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *__pyx_v_self, PyObject *__pyx_v_any_method) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":185
 * 
 *     def __init__(self, any_method):
 *         self.any_method = any_method             # <<<<<<<<<<<<<<
 *         self._dispatch = 15
 * 
 */
  if (!(likely(((__pyx_v_any_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_any_method, __pyx_ptype_9apischema_13serialization_7methods_AnyMethod))))) __PYX_ERR(0, 185, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_any_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->any_method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->any_method));
  __pyx_v_self->any_method = ((struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":186
 *     def __init__(self, any_method):
 *         self.any_method = any_method
 *         self._dispatch = 15             # <<<<<<<<<<<<<<
 * 
 * cdef class MappingCheckOnlyMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 15;

  /* "apischema/serialization/methods.pyx":184
 *         return EnumMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, any_method):             # <<<<<<<<<<<<<<
 *         self.any_method = any_method
 *         self._dispatch = 15
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.EnumMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":179
 * 
 * cdef class EnumMethod(SerializationMethod):
 *     cdef readonly AnyMethod any_method             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10EnumMethod_10any_method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10EnumMethod_10any_method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10EnumMethod_10any_method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_10EnumMethod_10any_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->any_method));
  __pyx_r = ((PyObject *)__pyx_v_self->any_method);
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10EnumMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10EnumMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10EnumMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.any_method)
 *     _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.any_method is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_EnumMethod, (type(self), 0xb01c51d, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->any_method) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.any_method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_EnumMethod, (type(self), 0xb01c51d, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.any_method is not None
 *     if use_setstate:
 *         return __pyx_unpickle_EnumMethod, (type(self), 0xb01c51d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_EnumMethod, (type(self), 0xb01c51d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_EnumMethod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_184665373);
    __Pyx_GIVEREF(__pyx_int_184665373);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_184665373);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.any_method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_EnumMethod, (type(self), 0xb01c51d, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.EnumMethod.__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_EnumMethod, (type(self), 0xb01c51d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_EnumMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10EnumMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_10EnumMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10EnumMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_EnumMethod, (type(self), 0xb01c51d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_EnumMethod__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("apischema.serialization.methods.EnumMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":192
 *     cdef readonly SerializationMethod value_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return MappingCheckOnlyMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_MappingCheckOnlyMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 192, __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_obj, __pyx_v_path};
          __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, 192, __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, 192, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":193
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return MappingCheckOnlyMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, key_method, value_method):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_MappingCheckOnlyMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":192
 *     cdef readonly SerializationMethod value_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return MappingCheckOnlyMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.MappingCheckOnlyMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 192, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 192, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.MappingCheckOnlyMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_MappingCheckOnlyMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.MappingCheckOnlyMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":195
 *         return MappingCheckOnlyMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, key_method, value_method):             # <<<<<<<<<<<<<<
 *         self.key_method = key_method
 *         self.value_method = value_method
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key_method = 0;
  PyObject *__pyx_v_value_method = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key_method,&__pyx_n_s_value_method,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key_method)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value_method)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 195, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 195, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key_method = values[0];
    __pyx_v_value_method = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 195, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.MappingCheckOnlyMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *)__pyx_v_self), __pyx_v_key_method, __pyx_v_value_method);

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

static int __pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_key_method, PyObject *__pyx_v_value_method) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":196
 * 
 *     def __init__(self, key_method, value_method):
 *         self.key_method = key_method             # <<<<<<<<<<<<<<
 *         self.value_method = value_method
 *         self._dispatch = 16
 */
  if (!(likely(((__pyx_v_key_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_key_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 196, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_key_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->key_method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->key_method));
  __pyx_v_self->key_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":197
 *     def __init__(self, key_method, value_method):
 *         self.key_method = key_method
 *         self.value_method = value_method             # <<<<<<<<<<<<<<
 *         self._dispatch = 16
 * 
 */
  if (!(likely(((__pyx_v_value_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 197, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->value_method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->value_method));
  __pyx_v_self->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":198
 *         self.key_method = key_method
 *         self.value_method = value_method
 *         self._dispatch = 16             # <<<<<<<<<<<<<<
 * 
 * cdef class MappingMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 16;

  /* "apischema/serialization/methods.pyx":195
 *         return MappingCheckOnlyMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, key_method, value_method):             # <<<<<<<<<<<<<<
 *         self.key_method = key_method
 *         self.value_method = value_method
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.MappingCheckOnlyMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":189
 * 
 * cdef class MappingCheckOnlyMethod(SerializationMethod):
 *     cdef readonly SerializationMethod key_method             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod value_method
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_10key_method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_10key_method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_10key_method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_10key_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->key_method));
  __pyx_r = ((PyObject *)__pyx_v_self->key_method);
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":190
 * cdef class MappingCheckOnlyMethod(SerializationMethod):
 *     cdef readonly SerializationMethod key_method
 *     cdef readonly SerializationMethod value_method             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_12value_method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_12value_method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_12value_method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_12value_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->value_method));
  __pyx_r = ((PyObject *)__pyx_v_self->value_method);
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.key_method is not None or self.value_method is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_MappingCheckOnlyMethod, (type(self), 0xbb7bf61, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->key_method) != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->value_method) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    __pyx_t_4 = __pyx_t_3;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.key_method is not None or self.value_method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_MappingCheckOnlyMethod, (type(self), 0xbb7bf61, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.key_method is not None or self.value_method is not None
 *     if use_setstate:
 *         return __pyx_unpickle_MappingCheckOnlyMethod, (type(self), 0xbb7bf61, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_MappingCheckOnlyMethod, (type(self), 0xbb7bf61, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_MappingCheckOnlyM); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_196591457);
    __Pyx_GIVEREF(__pyx_int_196591457);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_196591457);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.key_method is not None or self.value_method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_MappingCheckOnlyMethod, (type(self), 0xbb7bf61, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.MappingCheckOnlyMethod.__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_MappingCheckOnlyMethod, (type(self), 0xbb7bf61, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_MappingCheckOnlyMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_MappingCheckOnlyMethod, (type(self), 0xbb7bf61, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_MappingCheckOnlyMethod__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("apischema.serialization.methods.MappingCheckOnlyMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":204
 *     cdef readonly SerializationMethod value_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return MappingMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_13MappingMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_13MappingMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_13MappingMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_MappingMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_13MappingMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 204, __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_obj, __pyx_v_path};
          __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, 204, __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, 204, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":205
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return MappingMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, key_method, value_method):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_MappingMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":204
 *     cdef readonly SerializationMethod value_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return MappingMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.MappingMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13MappingMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13MappingMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 204, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 204, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.MappingMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13MappingMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_13MappingMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_13MappingMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_MappingMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.MappingMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":207
 *         return MappingMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, key_method, value_method):             # <<<<<<<<<<<<<<
 *         self.key_method = key_method
 *         self.value_method = value_method
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_13MappingMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_13MappingMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key_method = 0;
  PyObject *__pyx_v_value_method = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key_method,&__pyx_n_s_value_method,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key_method)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value_method)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 207, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 207, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key_method = values[0];
    __pyx_v_value_method = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 207, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.MappingMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13MappingMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *)__pyx_v_self), __pyx_v_key_method, __pyx_v_value_method);

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

static int __pyx_pf_9apischema_13serialization_7methods_13MappingMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *__pyx_v_self, PyObject *__pyx_v_key_method, PyObject *__pyx_v_value_method) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":208
 * 
 *     def __init__(self, key_method, value_method):
 *         self.key_method = key_method             # <<<<<<<<<<<<<<
 *         self.value_method = value_method
 *         self._dispatch = 17
 */
  if (!(likely(((__pyx_v_key_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_key_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 208, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_key_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->key_method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->key_method));
  __pyx_v_self->key_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":209
 *     def __init__(self, key_method, value_method):
 *         self.key_method = key_method
 *         self.value_method = value_method             # <<<<<<<<<<<<<<
 *         self._dispatch = 17
 * 
 */
  if (!(likely(((__pyx_v_value_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 209, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->value_method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->value_method));
  __pyx_v_self->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":210
 *         self.key_method = key_method
 *         self.value_method = value_method
 *         self._dispatch = 17             # <<<<<<<<<<<<<<
 * 
 * cdef class BaseField():
 */
  __pyx_v_self->__pyx_base._dispatch = 17;

  /* "apischema/serialization/methods.pyx":207
 *         return MappingMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, key_method, value_method):             # <<<<<<<<<<<<<<
 *         self.key_method = key_method
 *         self.value_method = value_method
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.MappingMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":201
 * 
 * cdef class MappingMethod(SerializationMethod):
 *     cdef readonly SerializationMethod key_method             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod value_method
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13MappingMethod_10key_method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13MappingMethod_10key_method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13MappingMethod_10key_method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_13MappingMethod_10key_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->key_method));
  __pyx_r = ((PyObject *)__pyx_v_self->key_method);
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":202
 * cdef class MappingMethod(SerializationMethod):
 *     cdef readonly SerializationMethod key_method
 *     cdef readonly SerializationMethod value_method             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13MappingMethod_12value_method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13MappingMethod_12value_method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13MappingMethod_12value_method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_13MappingMethod_12value_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->value_method));
  __pyx_r = ((PyObject *)__pyx_v_self->value_method);
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13MappingMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13MappingMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13MappingMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.key_method is not None or self.value_method is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_MappingMethod, (type(self), 0xbb7bf61, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->key_method) != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->value_method) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    __pyx_t_4 = __pyx_t_3;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.key_method is not None or self.value_method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_MappingMethod, (type(self), 0xbb7bf61, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.key_method is not None or self.value_method is not None
 *     if use_setstate:
 *         return __pyx_unpickle_MappingMethod, (type(self), 0xbb7bf61, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_MappingMethod, (type(self), 0xbb7bf61, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_MappingMethod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_196591457);
    __Pyx_GIVEREF(__pyx_int_196591457);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_196591457);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.key_method is not None or self.value_method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_MappingMethod, (type(self), 0xbb7bf61, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.MappingMethod.__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_MappingMethod, (type(self), 0xbb7bf61, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_MappingMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13MappingMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13MappingMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13MappingMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_MappingMethod, (type(self), 0xbb7bf61, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_MappingMethod__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("apischema.serialization.methods.MappingMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9BaseField_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9BaseField_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_9apischema_13serialization_7methods_9BaseField___reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_BaseField *)__pyx_v_self));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.BaseField.__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_BaseField, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BaseField__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9BaseField_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9BaseField_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_9apischema_13serialization_7methods_9BaseField_2__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_BaseField *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BaseField, (type(self), 0x05289b3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BaseField__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("apischema.serialization.methods.BaseField.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":220
 *     cdef readonly bint required
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         return IdentityField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_13IdentityField_1update_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_13IdentityField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_result", 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_update_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_13IdentityField_1update_result)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_typed_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_exclude_unset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 220, __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_obj, __pyx_v_result, __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, 220, __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_obj, __pyx_v_result, __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, 220, __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, 220, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_result);
          __Pyx_GIVEREF(__pyx_v_result);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_result);
          __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, 220, __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_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":221
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         return IdentityField_update_result(self, obj, result, typed_dict, exclude_unset)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, name, alias, required):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_IdentityField_update_result(__pyx_v_self, __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":220
 *     cdef readonly bint required
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         return IdentityField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.IdentityField.update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13IdentityField_1update_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13IdentityField_1update_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_result = 0;
  int __pyx_v_typed_dict;
  int __pyx_v_exclude_unset;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update_result (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_result,&__pyx_n_s_typed_dict,&__pyx_n_s_exclude_unset,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_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_result)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, 1); __PYX_ERR(0, 220, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_typed_dict)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, 2); __PYX_ERR(0, 220, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exclude_unset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, 3); __PYX_ERR(0, 220, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update_result") < 0)) __PYX_ERR(0, 220, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_obj = values[0];
    __pyx_v_result = ((PyObject*)values[1]);
    __pyx_v_typed_dict = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_typed_dict == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 220, __pyx_L3_error)
    __pyx_v_exclude_unset = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_exclude_unset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 220, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 220, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.IdentityField.update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_result), (&PyDict_Type), 1, "result", 1))) __PYX_ERR(0, 220, __pyx_L1_error)
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13IdentityField_update_result(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)__pyx_v_self), __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_13IdentityField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_result", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_13IdentityField_update_result(__pyx_v_self, __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.IdentityField.update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":223
 *         return IdentityField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 *     def __init__(self, name, alias, required):             # <<<<<<<<<<<<<<
 *         self.name = name
 *         self.alias = alias
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_13IdentityField_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_13IdentityField_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_alias = 0;
  PyObject *__pyx_v_required = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_alias,&__pyx_n_s_required,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_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alias)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 223, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_required)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 223, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 223, __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_name = values[0];
    __pyx_v_alias = values[1];
    __pyx_v_required = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 223, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.IdentityField.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13IdentityField_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)__pyx_v_self), __pyx_v_name, __pyx_v_alias, __pyx_v_required);

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

static int __pyx_pf_9apischema_13serialization_7methods_13IdentityField_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_alias, PyObject *__pyx_v_required) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":224
 * 
 *     def __init__(self, name, alias, required):
 *         self.name = name             # <<<<<<<<<<<<<<
 *         self.alias = alias
 *         self.required = required
 */
  if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(0, 224, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_name;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":225
 *     def __init__(self, name, alias, required):
 *         self.name = name
 *         self.alias = alias             # <<<<<<<<<<<<<<
 *         self.required = required
 *         self._dispatch = 0
 */
  if (!(likely(PyUnicode_CheckExact(__pyx_v_alias))||((__pyx_v_alias) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_alias)->tp_name), 0))) __PYX_ERR(0, 225, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_alias;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->alias);
  __Pyx_DECREF(__pyx_v_self->alias);
  __pyx_v_self->alias = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":226
 *         self.name = name
 *         self.alias = alias
 *         self.required = required             # <<<<<<<<<<<<<<
 *         self._dispatch = 0
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_required); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 226, __pyx_L1_error)
  __pyx_v_self->required = __pyx_t_2;

  /* "apischema/serialization/methods.pyx":227
 *         self.alias = alias
 *         self.required = required
 *         self._dispatch = 0             # <<<<<<<<<<<<<<
 * 
 * cdef class SimpleField(IdentityField):
 */
  __pyx_v_self->__pyx_base._dispatch = 0;

  /* "apischema/serialization/methods.pyx":223
 *         return IdentityField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 *     def __init__(self, name, alias, required):             # <<<<<<<<<<<<<<
 *         self.name = name
 *         self.alias = alias
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.IdentityField.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":216
 * 
 * cdef class IdentityField(BaseField):
 *     cdef readonly str name             # <<<<<<<<<<<<<<
 *     cdef readonly str alias
 *     cdef readonly bint required
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13IdentityField_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13IdentityField_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13IdentityField_4name___get__(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_13IdentityField_4name___get__(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":217
 * cdef class IdentityField(BaseField):
 *     cdef readonly str name
 *     cdef readonly str alias             # <<<<<<<<<<<<<<
 *     cdef readonly bint required
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13IdentityField_5alias_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13IdentityField_5alias_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13IdentityField_5alias___get__(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_13IdentityField_5alias___get__(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->alias);
  __pyx_r = __pyx_v_self->alias;
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":218
 *     cdef readonly str name
 *     cdef readonly str alias
 *     cdef readonly bint required             # <<<<<<<<<<<<<<
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13IdentityField_8required_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13IdentityField_8required_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13IdentityField_8required___get__(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_13IdentityField_8required___get__(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->required); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.IdentityField.required.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13IdentityField_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13IdentityField_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13IdentityField_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)__pyx_v_self));

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

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

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._dispatch, self.alias, self.name, self.required)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base._dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->required); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->alias);
  __Pyx_GIVEREF(__pyx_v_self->alias);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->alias);
  __Pyx_INCREF(__pyx_v_self->name);
  __Pyx_GIVEREF(__pyx_v_self->name);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->name);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

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

  /* "(tree fragment)":7
 *     state = (self._dispatch, self.alias, self.name, self.required)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.alias, self.name, self.required)
 *     _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.alias is not None or self.name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_IdentityField, (type(self), 0x938bcc6, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->alias != ((PyObject*)Py_None));
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->name != ((PyObject*)Py_None));
    __pyx_t_4 = (__pyx_t_6 != 0);
    __pyx_t_5 = __pyx_t_4;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.alias is not None or self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IdentityField, (type(self), 0x938bcc6, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self.alias is not None or self.name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_IdentityField, (type(self), 0x938bcc6, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_IdentityField, (type(self), 0x938bcc6, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_IdentityField); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_154713286);
    __Pyx_GIVEREF(__pyx_int_154713286);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_154713286);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.alias is not None or self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IdentityField, (type(self), 0x938bcc6, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_IdentityField, (type(self), 0x938bcc6, None), state
 *     else:
 *         return __pyx_unpickle_IdentityField, (type(self), 0x938bcc6, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IdentityField__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_IdentityField); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_154713286);
    __Pyx_GIVEREF(__pyx_int_154713286);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_154713286);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apischema.serialization.methods.IdentityField.__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_IdentityField, (type(self), 0x938bcc6, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IdentityField__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13IdentityField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13IdentityField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13IdentityField_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IdentityField, (type(self), 0x938bcc6, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IdentityField__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("apischema.serialization.methods.IdentityField.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":232
 *     cdef readonly SerializationMethod method
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         return SimpleField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_11SimpleField_1update_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_11SimpleField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_result", 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_update_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_11SimpleField_1update_result)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_typed_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_exclude_unset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 232, __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_obj, __pyx_v_result, __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, 232, __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_obj, __pyx_v_result, __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, 232, __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, 232, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_result);
          __Pyx_GIVEREF(__pyx_v_result);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_result);
          __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, 232, __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_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":233
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         return SimpleField_update_result(self, obj, result, typed_dict, exclude_unset)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, name, alias, required, method):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_SimpleField_update_result(__pyx_v_self, __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":232
 *     cdef readonly SerializationMethod method
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         return SimpleField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.SimpleField.update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11SimpleField_1update_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11SimpleField_1update_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_result = 0;
  int __pyx_v_typed_dict;
  int __pyx_v_exclude_unset;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update_result (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_result,&__pyx_n_s_typed_dict,&__pyx_n_s_exclude_unset,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_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_result)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, 1); __PYX_ERR(0, 232, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_typed_dict)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, 2); __PYX_ERR(0, 232, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exclude_unset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, 3); __PYX_ERR(0, 232, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update_result") < 0)) __PYX_ERR(0, 232, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_obj = values[0];
    __pyx_v_result = ((PyObject*)values[1]);
    __pyx_v_typed_dict = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_typed_dict == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 232, __pyx_L3_error)
    __pyx_v_exclude_unset = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_exclude_unset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 232, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 232, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.SimpleField.update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_result), (&PyDict_Type), 1, "result", 1))) __PYX_ERR(0, 232, __pyx_L1_error)
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11SimpleField_update_result(((struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *)__pyx_v_self), __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_11SimpleField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_result", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_11SimpleField_update_result(__pyx_v_self, __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.SimpleField.update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":235
 *         return SimpleField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 *     def __init__(self, name, alias, required, method):             # <<<<<<<<<<<<<<
 *         self.name = name
 *         self.alias = alias
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_11SimpleField_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_11SimpleField_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_alias = 0;
  PyObject *__pyx_v_required = 0;
  PyObject *__pyx_v_method = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_alias,&__pyx_n_s_required,&__pyx_n_s_method,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 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_alias)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 235, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_required)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 235, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_method)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 235, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 235, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_name = values[0];
    __pyx_v_alias = values[1];
    __pyx_v_required = values[2];
    __pyx_v_method = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 235, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.SimpleField.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11SimpleField_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *)__pyx_v_self), __pyx_v_name, __pyx_v_alias, __pyx_v_required, __pyx_v_method);

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

static int __pyx_pf_9apischema_13serialization_7methods_11SimpleField_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_alias, PyObject *__pyx_v_required, PyObject *__pyx_v_method) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":236
 * 
 *     def __init__(self, name, alias, required, method):
 *         self.name = name             # <<<<<<<<<<<<<<
 *         self.alias = alias
 *         self.required = required
 */
  if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(0, 236, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_name;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.name);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.name);
  __pyx_v_self->__pyx_base.name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":237
 *     def __init__(self, name, alias, required, method):
 *         self.name = name
 *         self.alias = alias             # <<<<<<<<<<<<<<
 *         self.required = required
 *         self.method = method
 */
  if (!(likely(PyUnicode_CheckExact(__pyx_v_alias))||((__pyx_v_alias) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_alias)->tp_name), 0))) __PYX_ERR(0, 237, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_alias;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.alias);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.alias);
  __pyx_v_self->__pyx_base.alias = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":238
 *         self.name = name
 *         self.alias = alias
 *         self.required = required             # <<<<<<<<<<<<<<
 *         self.method = method
 *         self._dispatch = 1
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_required); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 238, __pyx_L1_error)
  __pyx_v_self->__pyx_base.required = __pyx_t_2;

  /* "apischema/serialization/methods.pyx":239
 *         self.alias = alias
 *         self.required = required
 *         self.method = method             # <<<<<<<<<<<<<<
 *         self._dispatch = 1
 * 
 */
  if (!(likely(((__pyx_v_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 239, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->method));
  __pyx_v_self->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":240
 *         self.required = required
 *         self.method = method
 *         self._dispatch = 1             # <<<<<<<<<<<<<<
 * 
 * cdef class ComplexField(SimpleField):
 */
  __pyx_v_self->__pyx_base.__pyx_base._dispatch = 1;

  /* "apischema/serialization/methods.pyx":235
 *         return SimpleField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 *     def __init__(self, name, alias, required, method):             # <<<<<<<<<<<<<<
 *         self.name = name
 *         self.alias = alias
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.SimpleField.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":230
 * 
 * cdef class SimpleField(IdentityField):
 *     cdef readonly SerializationMethod method             # <<<<<<<<<<<<<<
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11SimpleField_6method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11SimpleField_6method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11SimpleField_6method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_11SimpleField_6method___get__(struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->method));
  __pyx_r = ((PyObject *)__pyx_v_self->method);
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11SimpleField_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11SimpleField_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11SimpleField_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *)__pyx_v_self));

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

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

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._dispatch, self.alias, self.method, self.name, self.required)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx_base._dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.required); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.alias);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.alias);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.alias);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->method));
  PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_self->method));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->__pyx_base.name);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

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

  /* "(tree fragment)":7
 *     state = (self._dispatch, self.alias, self.method, self.name, self.required)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.alias, self.method, self.name, self.required)
 *     _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.alias is not None or self.method is not None or self.name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_SimpleField, (type(self), 0xfbe2b2e, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->__pyx_base.alias != ((PyObject*)Py_None));
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->method) != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->__pyx_base.name != ((PyObject*)Py_None));
    __pyx_t_6 = (__pyx_t_4 != 0);
    __pyx_t_5 = __pyx_t_6;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.alias is not None or self.method is not None or self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SimpleField, (type(self), 0xfbe2b2e, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self.alias is not None or self.method is not None or self.name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_SimpleField, (type(self), 0xfbe2b2e, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_SimpleField, (type(self), 0xfbe2b2e, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_SimpleField); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_264121134);
    __Pyx_GIVEREF(__pyx_int_264121134);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_264121134);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.alias is not None or self.method is not None or self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SimpleField, (type(self), 0xfbe2b2e, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_SimpleField, (type(self), 0xfbe2b2e, None), state
 *     else:
 *         return __pyx_unpickle_SimpleField, (type(self), 0xfbe2b2e, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_SimpleField__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_SimpleField); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_264121134);
    __Pyx_GIVEREF(__pyx_int_264121134);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_264121134);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apischema.serialization.methods.SimpleField.__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_SimpleField, (type(self), 0xfbe2b2e, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SimpleField__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11SimpleField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11SimpleField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11SimpleField_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SimpleField, (type(self), 0xfbe2b2e, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SimpleField__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("apischema.serialization.methods.SimpleField.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":250
 *     cdef readonly bint skippable
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         return ComplexField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_1update_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_12ComplexField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_result", 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_update_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_12ComplexField_1update_result)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_typed_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_exclude_unset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __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_obj, __pyx_v_result, __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, 250, __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_obj, __pyx_v_result, __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, 250, __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, 250, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_result);
          __Pyx_GIVEREF(__pyx_v_result);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_result);
          __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, 250, __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_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":251
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         return ComplexField_update_result(self, obj, result, typed_dict, exclude_unset)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, name, alias, required, method, skip_if, undefined, skip_none, skip_default, default_value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_ComplexField_update_result(__pyx_v_self, __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":250
 *     cdef readonly bint skippable
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         return ComplexField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.ComplexField.update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_1update_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_1update_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_result = 0;
  int __pyx_v_typed_dict;
  int __pyx_v_exclude_unset;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update_result (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_result,&__pyx_n_s_typed_dict,&__pyx_n_s_exclude_unset,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_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_result)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, 1); __PYX_ERR(0, 250, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_typed_dict)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, 2); __PYX_ERR(0, 250, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exclude_unset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, 3); __PYX_ERR(0, 250, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update_result") < 0)) __PYX_ERR(0, 250, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_obj = values[0];
    __pyx_v_result = ((PyObject*)values[1]);
    __pyx_v_typed_dict = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_typed_dict == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 250, __pyx_L3_error)
    __pyx_v_exclude_unset = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_exclude_unset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 250, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 250, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.ComplexField.update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_result), (&PyDict_Type), 1, "result", 1))) __PYX_ERR(0, 250, __pyx_L1_error)
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_12ComplexField_update_result(((struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)__pyx_v_self), __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_result", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_12ComplexField_update_result(__pyx_v_self, __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ComplexField.update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":253
 *         return ComplexField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 *     def __init__(self, name, alias, required, method, skip_if, undefined, skip_none, skip_default, default_value):             # <<<<<<<<<<<<<<
 *         self.name = name
 *         self.alias = alias
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_12ComplexField_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_12ComplexField_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_alias = 0;
  PyObject *__pyx_v_required = 0;
  PyObject *__pyx_v_method = 0;
  PyObject *__pyx_v_skip_if = 0;
  PyObject *__pyx_v_undefined = 0;
  PyObject *__pyx_v_skip_none = 0;
  PyObject *__pyx_v_skip_default = 0;
  PyObject *__pyx_v_default_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_alias,&__pyx_n_s_required,&__pyx_n_s_method,&__pyx_n_s_skip_if,&__pyx_n_s_undefined,&__pyx_n_s_skip_none,&__pyx_n_s_skip_default,&__pyx_n_s_default_value,0};
    PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 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_alias)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 1); __PYX_ERR(0, 253, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_required)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 2); __PYX_ERR(0, 253, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_method)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 3); __PYX_ERR(0, 253, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip_if)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 4); __PYX_ERR(0, 253, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_undefined)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 5); __PYX_ERR(0, 253, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip_none)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 6); __PYX_ERR(0, 253, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip_default)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 7); __PYX_ERR(0, 253, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 8); __PYX_ERR(0, 253, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 253, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
    }
    __pyx_v_name = values[0];
    __pyx_v_alias = values[1];
    __pyx_v_required = values[2];
    __pyx_v_method = values[3];
    __pyx_v_skip_if = values[4];
    __pyx_v_undefined = values[5];
    __pyx_v_skip_none = values[6];
    __pyx_v_skip_default = values[7];
    __pyx_v_default_value = values[8];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 253, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.ComplexField.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_12ComplexField_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)__pyx_v_self), __pyx_v_name, __pyx_v_alias, __pyx_v_required, __pyx_v_method, __pyx_v_skip_if, __pyx_v_undefined, __pyx_v_skip_none, __pyx_v_skip_default, __pyx_v_default_value);

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

static int __pyx_pf_9apischema_13serialization_7methods_12ComplexField_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_alias, PyObject *__pyx_v_required, PyObject *__pyx_v_method, PyObject *__pyx_v_skip_if, PyObject *__pyx_v_undefined, PyObject *__pyx_v_skip_none, PyObject *__pyx_v_skip_default, PyObject *__pyx_v_default_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":254
 * 
 *     def __init__(self, name, alias, required, method, skip_if, undefined, skip_none, skip_default, default_value):
 *         self.name = name             # <<<<<<<<<<<<<<
 *         self.alias = alias
 *         self.required = required
 */
  if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(0, 254, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_name;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.name);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base.name);
  __pyx_v_self->__pyx_base.__pyx_base.name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":255
 *     def __init__(self, name, alias, required, method, skip_if, undefined, skip_none, skip_default, default_value):
 *         self.name = name
 *         self.alias = alias             # <<<<<<<<<<<<<<
 *         self.required = required
 *         self.method = method
 */
  if (!(likely(PyUnicode_CheckExact(__pyx_v_alias))||((__pyx_v_alias) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_alias)->tp_name), 0))) __PYX_ERR(0, 255, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_alias;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.alias);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base.alias);
  __pyx_v_self->__pyx_base.__pyx_base.alias = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":256
 *         self.name = name
 *         self.alias = alias
 *         self.required = required             # <<<<<<<<<<<<<<
 *         self.method = method
 *         self.skip_if = skip_if
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_required); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error)
  __pyx_v_self->__pyx_base.__pyx_base.required = __pyx_t_2;

  /* "apischema/serialization/methods.pyx":257
 *         self.alias = alias
 *         self.required = required
 *         self.method = method             # <<<<<<<<<<<<<<
 *         self.skip_if = skip_if
 *         self.undefined = undefined
 */
  if (!(likely(((__pyx_v_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 257, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx_base.method));
  __pyx_v_self->__pyx_base.method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":258
 *         self.required = required
 *         self.method = method
 *         self.skip_if = skip_if             # <<<<<<<<<<<<<<
 *         self.undefined = undefined
 *         self.skip_none = skip_none
 */
  __Pyx_INCREF(__pyx_v_skip_if);
  __Pyx_GIVEREF(__pyx_v_skip_if);
  __Pyx_GOTREF(__pyx_v_self->skip_if);
  __Pyx_DECREF(__pyx_v_self->skip_if);
  __pyx_v_self->skip_if = __pyx_v_skip_if;

  /* "apischema/serialization/methods.pyx":259
 *         self.method = method
 *         self.skip_if = skip_if
 *         self.undefined = undefined             # <<<<<<<<<<<<<<
 *         self.skip_none = skip_none
 *         self.skip_default = skip_default
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_undefined); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error)
  __pyx_v_self->undefined = __pyx_t_2;

  /* "apischema/serialization/methods.pyx":260
 *         self.skip_if = skip_if
 *         self.undefined = undefined
 *         self.skip_none = skip_none             # <<<<<<<<<<<<<<
 *         self.skip_default = skip_default
 *         self.default_value = default_value
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_none); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 260, __pyx_L1_error)
  __pyx_v_self->skip_none = __pyx_t_2;

  /* "apischema/serialization/methods.pyx":261
 *         self.undefined = undefined
 *         self.skip_none = skip_none
 *         self.skip_default = skip_default             # <<<<<<<<<<<<<<
 *         self.default_value = default_value
 *         self.skippable = (
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_default); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 261, __pyx_L1_error)
  __pyx_v_self->skip_default = __pyx_t_2;

  /* "apischema/serialization/methods.pyx":262
 *         self.skip_none = skip_none
 *         self.skip_default = skip_default
 *         self.default_value = default_value             # <<<<<<<<<<<<<<
 *         self.skippable = (
 *             self.skip_if or self.undefined or self.skip_none or self.skip_default
 */
  __Pyx_INCREF(__pyx_v_default_value);
  __Pyx_GIVEREF(__pyx_v_default_value);
  __Pyx_GOTREF(__pyx_v_self->default_value);
  __Pyx_DECREF(__pyx_v_self->default_value);
  __pyx_v_self->default_value = __pyx_v_default_value;

  /* "apischema/serialization/methods.pyx":264
 *         self.default_value = default_value
 *         self.skippable = (
 *             self.skip_if or self.undefined or self.skip_none or self.skip_default             # <<<<<<<<<<<<<<
 *         )
 *         self._dispatch = 2
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->skip_if); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 264, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_self->undefined != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_self->skip_none != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_self->skip_default != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L3_bool_binop_done:;

  /* "apischema/serialization/methods.pyx":263
 *         self.skip_default = skip_default
 *         self.default_value = default_value
 *         self.skippable = (             # <<<<<<<<<<<<<<
 *             self.skip_if or self.undefined or self.skip_none or self.skip_default
 *         )
 */
  __pyx_v_self->skippable = __pyx_t_2;

  /* "apischema/serialization/methods.pyx":266
 *             self.skip_if or self.undefined or self.skip_none or self.skip_default
 *         )
 *         self._dispatch = 2             # <<<<<<<<<<<<<<
 * 
 * cdef class SerializedField(BaseField):
 */
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._dispatch = 2;

  /* "apischema/serialization/methods.pyx":253
 *         return ComplexField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 *     def __init__(self, name, alias, required, method, skip_if, undefined, skip_none, skip_default, default_value):             # <<<<<<<<<<<<<<
 *         self.name = name
 *         self.alias = alias
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ComplexField.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":243
 * 
 * cdef class ComplexField(SimpleField):
 *     cdef readonly object skip_if             # <<<<<<<<<<<<<<
 *     cdef readonly bint undefined
 *     cdef readonly bint skip_none
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_7skip_if_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_7skip_if_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_12ComplexField_7skip_if___get__(((struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_7skip_if___get__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->skip_if);
  __pyx_r = __pyx_v_self->skip_if;
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":244
 * cdef class ComplexField(SimpleField):
 *     cdef readonly object skip_if
 *     cdef readonly bint undefined             # <<<<<<<<<<<<<<
 *     cdef readonly bint skip_none
 *     cdef readonly bint skip_default
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_9undefined_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_9undefined_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_12ComplexField_9undefined___get__(((struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_9undefined___get__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->undefined); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ComplexField.undefined.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":245
 *     cdef readonly object skip_if
 *     cdef readonly bint undefined
 *     cdef readonly bint skip_none             # <<<<<<<<<<<<<<
 *     cdef readonly bint skip_default
 *     cdef readonly object default_value
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_9skip_none_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_9skip_none_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_12ComplexField_9skip_none___get__(((struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_9skip_none___get__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->skip_none); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ComplexField.skip_none.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":246
 *     cdef readonly bint undefined
 *     cdef readonly bint skip_none
 *     cdef readonly bint skip_default             # <<<<<<<<<<<<<<
 *     cdef readonly object default_value
 *     cdef readonly bint skippable
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_12skip_default_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_12skip_default_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_12ComplexField_12skip_default___get__(((struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_12skip_default___get__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->skip_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ComplexField.skip_default.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":247
 *     cdef readonly bint skip_none
 *     cdef readonly bint skip_default
 *     cdef readonly object default_value             # <<<<<<<<<<<<<<
 *     cdef readonly bint skippable
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_13default_value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_13default_value_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_12ComplexField_13default_value___get__(((struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_13default_value___get__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->default_value);
  __pyx_r = __pyx_v_self->default_value;
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":248
 *     cdef readonly bint skip_default
 *     cdef readonly object default_value
 *     cdef readonly bint skippable             # <<<<<<<<<<<<<<
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_9skippable_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_9skippable_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_12ComplexField_9skippable___get__(((struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ComplexField_9skippable___get__(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->skippable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ComplexField.skippable.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_12ComplexField_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)__pyx_v_self));

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

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

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._dispatch, self.alias, self.default_value, self.method, self.name, self.required, self.skip_default, self.skip_if, self.skip_none, self.skippable, self.undefined)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.required); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->skip_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->skip_none); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->skippable); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->undefined); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(11); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.alias);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.alias);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_self->__pyx_base.__pyx_base.alias);
  __Pyx_INCREF(__pyx_v_self->default_value);
  __Pyx_GIVEREF(__pyx_v_self->default_value);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_self->default_value);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.method));
  PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_v_self->__pyx_base.method));
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.name);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.name);
  PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_v_self->__pyx_base.__pyx_base.name);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 6, __pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->skip_if);
  __Pyx_GIVEREF(__pyx_v_self->skip_if);
  PyTuple_SET_ITEM(__pyx_t_7, 7, __pyx_v_self->skip_if);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 8, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 9, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 10, __pyx_t_6);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._dispatch, self.alias, self.default_value, self.method, self.name, self.required, self.skip_default, self.skip_if, self.skip_none, self.skippable, self.undefined)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_7 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v__dict = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "(tree fragment)":7
 *     state = (self._dispatch, self.alias, self.default_value, self.method, self.name, self.required, self.skip_default, self.skip_if, self.skip_none, self.skippable, self.undefined)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_8 = (__pyx_v__dict != Py_None);
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (__pyx_t_9) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.alias is not None or self.default_value is not None or self.method is not None or self.name is not None or self.skip_if is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.alias, self.default_value, self.method, self.name, self.required, self.skip_default, self.skip_if, self.skip_none, self.skippable, self.undefined)
 *     _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.alias is not None or self.default_value is not None or self.method is not None or self.name is not None or self.skip_if is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_ComplexField, (type(self), 0xd48703b, None), state
 */
  /*else*/ {
    __pyx_t_8 = (__pyx_v_self->__pyx_base.__pyx_base.alias != ((PyObject*)Py_None));
    __pyx_t_10 = (__pyx_t_8 != 0);
    if (!__pyx_t_10) {
    } else {
      __pyx_t_9 = __pyx_t_10;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_10 = (__pyx_v_self->default_value != Py_None);
    __pyx_t_8 = (__pyx_t_10 != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_9 = __pyx_t_8;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_8 = (((PyObject *)__pyx_v_self->__pyx_base.method) != Py_None);
    __pyx_t_10 = (__pyx_t_8 != 0);
    if (!__pyx_t_10) {
    } else {
      __pyx_t_9 = __pyx_t_10;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_10 = (__pyx_v_self->__pyx_base.__pyx_base.name != ((PyObject*)Py_None));
    __pyx_t_8 = (__pyx_t_10 != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_9 = __pyx_t_8;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_8 = (__pyx_v_self->skip_if != Py_None);
    __pyx_t_10 = (__pyx_t_8 != 0);
    __pyx_t_9 = __pyx_t_10;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_9;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.alias is not None or self.default_value is not None or self.method is not None or self.name is not None or self.skip_if is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ComplexField, (type(self), 0xd48703b, None), state
 *     else:
 */
  __pyx_t_9 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_9) {

    /* "(tree fragment)":13
 *         use_setstate = self.alias is not None or self.default_value is not None or self.method is not None or self.name is not None or self.skip_if is not None
 *     if use_setstate:
 *         return __pyx_unpickle_ComplexField, (type(self), 0xd48703b, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_ComplexField, (type(self), 0xd48703b, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_ComplexField); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222851131);
    __Pyx_GIVEREF(__pyx_int_222851131);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_222851131);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_7, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.alias is not None or self.default_value is not None or self.method is not None or self.name is not None or self.skip_if is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ComplexField, (type(self), 0xd48703b, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_ComplexField, (type(self), 0xd48703b, None), state
 *     else:
 *         return __pyx_unpickle_ComplexField, (type(self), 0xd48703b, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ComplexField__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_ComplexField); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222851131);
    __Pyx_GIVEREF(__pyx_int_222851131);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_222851131);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_state);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
    __pyx_t_5 = 0;
    __pyx_t_7 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apischema.serialization.methods.ComplexField.__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_ComplexField, (type(self), 0xd48703b, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ComplexField__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ComplexField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_12ComplexField_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ComplexField, (type(self), 0xd48703b, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ComplexField__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("apischema.serialization.methods.ComplexField.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":275
 *     cdef readonly SerializationMethod method
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         return SerializedField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_1update_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_15SerializedField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_result", 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_update_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_15SerializedField_1update_result)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_typed_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_exclude_unset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __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_obj, __pyx_v_result, __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, 275, __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_obj, __pyx_v_result, __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, 275, __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, 275, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_result);
          __Pyx_GIVEREF(__pyx_v_result);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_result);
          __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, 275, __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_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":276
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         return SerializedField_update_result(self, obj, result, typed_dict, exclude_unset)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, alias, func, undefined, skip_none, method):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_SerializedField_update_result(__pyx_v_self, __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":275
 *     cdef readonly SerializationMethod method
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         return SerializedField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.SerializedField.update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_1update_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_1update_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_result = 0;
  int __pyx_v_typed_dict;
  int __pyx_v_exclude_unset;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update_result (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_result,&__pyx_n_s_typed_dict,&__pyx_n_s_exclude_unset,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_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_result)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, 1); __PYX_ERR(0, 275, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_typed_dict)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, 2); __PYX_ERR(0, 275, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exclude_unset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, 3); __PYX_ERR(0, 275, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update_result") < 0)) __PYX_ERR(0, 275, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_obj = values[0];
    __pyx_v_result = ((PyObject*)values[1]);
    __pyx_v_typed_dict = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_typed_dict == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 275, __pyx_L3_error)
    __pyx_v_exclude_unset = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_exclude_unset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 275, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update_result", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 275, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.SerializedField.update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_result), (&PyDict_Type), 1, "result", 1))) __PYX_ERR(0, 275, __pyx_L1_error)
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15SerializedField_update_result(((struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *)__pyx_v_self), __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_15SerializedField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_result", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_15SerializedField_update_result(__pyx_v_self, __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.SerializedField.update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":278
 *         return SerializedField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 *     def __init__(self, alias, func, undefined, skip_none, method):             # <<<<<<<<<<<<<<
 *         self.alias = alias
 *         self.func = func
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_15SerializedField_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_15SerializedField_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_alias = 0;
  PyObject *__pyx_v_func = 0;
  PyObject *__pyx_v_undefined = 0;
  PyObject *__pyx_v_skip_none = 0;
  PyObject *__pyx_v_method = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alias,&__pyx_n_s_func,&__pyx_n_s_undefined,&__pyx_n_s_skip_none,&__pyx_n_s_method,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alias)) != 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_func)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 278, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_undefined)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 278, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip_none)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 278, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_method)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 278, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 278, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_alias = values[0];
    __pyx_v_func = values[1];
    __pyx_v_undefined = values[2];
    __pyx_v_skip_none = values[3];
    __pyx_v_method = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 278, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.SerializedField.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15SerializedField_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *)__pyx_v_self), __pyx_v_alias, __pyx_v_func, __pyx_v_undefined, __pyx_v_skip_none, __pyx_v_method);

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

static int __pyx_pf_9apischema_13serialization_7methods_15SerializedField_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self, PyObject *__pyx_v_alias, PyObject *__pyx_v_func, PyObject *__pyx_v_undefined, PyObject *__pyx_v_skip_none, PyObject *__pyx_v_method) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":279
 * 
 *     def __init__(self, alias, func, undefined, skip_none, method):
 *         self.alias = alias             # <<<<<<<<<<<<<<
 *         self.func = func
 *         self.undefined = undefined
 */
  if (!(likely(PyUnicode_CheckExact(__pyx_v_alias))||((__pyx_v_alias) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_alias)->tp_name), 0))) __PYX_ERR(0, 279, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_alias;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->alias);
  __Pyx_DECREF(__pyx_v_self->alias);
  __pyx_v_self->alias = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":280
 *     def __init__(self, alias, func, undefined, skip_none, method):
 *         self.alias = alias
 *         self.func = func             # <<<<<<<<<<<<<<
 *         self.undefined = undefined
 *         self.skip_none = skip_none
 */
  __Pyx_INCREF(__pyx_v_func);
  __Pyx_GIVEREF(__pyx_v_func);
  __Pyx_GOTREF(__pyx_v_self->func);
  __Pyx_DECREF(__pyx_v_self->func);
  __pyx_v_self->func = __pyx_v_func;

  /* "apischema/serialization/methods.pyx":281
 *         self.alias = alias
 *         self.func = func
 *         self.undefined = undefined             # <<<<<<<<<<<<<<
 *         self.skip_none = skip_none
 *         self.method = method
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_undefined); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 281, __pyx_L1_error)
  __pyx_v_self->undefined = __pyx_t_2;

  /* "apischema/serialization/methods.pyx":282
 *         self.func = func
 *         self.undefined = undefined
 *         self.skip_none = skip_none             # <<<<<<<<<<<<<<
 *         self.method = method
 *         self._dispatch = 3
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_none); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 282, __pyx_L1_error)
  __pyx_v_self->skip_none = __pyx_t_2;

  /* "apischema/serialization/methods.pyx":283
 *         self.undefined = undefined
 *         self.skip_none = skip_none
 *         self.method = method             # <<<<<<<<<<<<<<
 *         self._dispatch = 3
 * 
 */
  if (!(likely(((__pyx_v_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 283, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->method));
  __pyx_v_self->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":284
 *         self.skip_none = skip_none
 *         self.method = method
 *         self._dispatch = 3             # <<<<<<<<<<<<<<
 * 
 * cdef class ObjectMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 3;

  /* "apischema/serialization/methods.pyx":278
 *         return SerializedField_update_result(self, obj, result, typed_dict, exclude_unset)
 * 
 *     def __init__(self, alias, func, undefined, skip_none, method):             # <<<<<<<<<<<<<<
 *         self.alias = alias
 *         self.func = func
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.SerializedField.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":269
 * 
 * cdef class SerializedField(BaseField):
 *     cdef readonly str alias             # <<<<<<<<<<<<<<
 *     cdef readonly object func
 *     cdef readonly bint undefined
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_5alias_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_5alias_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15SerializedField_5alias___get__(((struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_15SerializedField_5alias___get__(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->alias);
  __pyx_r = __pyx_v_self->alias;
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":270
 * cdef class SerializedField(BaseField):
 *     cdef readonly str alias
 *     cdef readonly object func             # <<<<<<<<<<<<<<
 *     cdef readonly bint undefined
 *     cdef readonly bint skip_none
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_4func_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_4func_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15SerializedField_4func___get__(((struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_15SerializedField_4func___get__(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->func);
  __pyx_r = __pyx_v_self->func;
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":271
 *     cdef readonly str alias
 *     cdef readonly object func
 *     cdef readonly bint undefined             # <<<<<<<<<<<<<<
 *     cdef readonly bint skip_none
 *     cdef readonly SerializationMethod method
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_9undefined_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_9undefined_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15SerializedField_9undefined___get__(((struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_15SerializedField_9undefined___get__(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->undefined); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.SerializedField.undefined.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":272
 *     cdef readonly object func
 *     cdef readonly bint undefined
 *     cdef readonly bint skip_none             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod method
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_9skip_none_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_9skip_none_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15SerializedField_9skip_none___get__(((struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_15SerializedField_9skip_none___get__(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->skip_none); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.SerializedField.skip_none.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":273
 *     cdef readonly bint undefined
 *     cdef readonly bint skip_none
 *     cdef readonly SerializationMethod method             # <<<<<<<<<<<<<<
 * 
 *     cpdef update_result(self, object obj, dict result, bint typed_dict, bint exclude_unset):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_6method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_6method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15SerializedField_6method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_15SerializedField_6method___get__(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->method));
  __pyx_r = ((PyObject *)__pyx_v_self->method);
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15SerializedField_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *)__pyx_v_self));

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

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

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._dispatch, self.alias, self.func, self.method, self.skip_none, self.undefined)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base._dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->skip_none); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->alias);
  __Pyx_GIVEREF(__pyx_v_self->alias);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->alias);
  __Pyx_INCREF(__pyx_v_self->func);
  __Pyx_GIVEREF(__pyx_v_self->func);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_self->func);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->method));
  PyTuple_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_v_self->method));
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

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

  /* "(tree fragment)":7
 *     state = (self._dispatch, self.alias, self.func, self.method, self.skip_none, self.undefined)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_5 = (__pyx_v__dict != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.alias, self.func, self.method, self.skip_none, self.undefined)
 *     _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.alias is not None or self.func is not None or self.method is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_SerializedField, (type(self), 0xbcf5656, None), state
 */
  /*else*/ {
    __pyx_t_5 = (__pyx_v_self->alias != ((PyObject*)Py_None));
    __pyx_t_7 = (__pyx_t_5 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->func != Py_None);
    __pyx_t_5 = (__pyx_t_7 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_6 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->method) != Py_None);
    __pyx_t_7 = (__pyx_t_5 != 0);
    __pyx_t_6 = __pyx_t_7;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_6;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.alias is not None or self.func is not None or self.method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SerializedField, (type(self), 0xbcf5656, None), state
 *     else:
 */
  __pyx_t_6 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":13
 *         use_setstate = self.alias is not None or self.func is not None or self.method is not None
 *     if use_setstate:
 *         return __pyx_unpickle_SerializedField, (type(self), 0xbcf5656, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_SerializedField, (type(self), 0xbcf5656, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_SerializedField); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_198137430);
    __Pyx_GIVEREF(__pyx_int_198137430);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_198137430);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.alias is not None or self.func is not None or self.method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SerializedField, (type(self), 0xbcf5656, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_SerializedField, (type(self), 0xbcf5656, None), state
 *     else:
 *         return __pyx_unpickle_SerializedField, (type(self), 0xbcf5656, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_SerializedField__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_SerializedField); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_198137430);
    __Pyx_GIVEREF(__pyx_int_198137430);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_198137430);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apischema.serialization.methods.SerializedField.__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_SerializedField, (type(self), 0xbcf5656, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SerializedField__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15SerializedField_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15SerializedField_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SerializedField, (type(self), 0xbcf5656, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SerializedField__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("apischema.serialization.methods.SerializedField.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":289
 *     cdef readonly tuple fields
 * 
 *     def __init__(self, fields):             # <<<<<<<<<<<<<<
 *         self.fields = fields
 *         self._dispatch = 18
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_12ObjectMethod_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_12ObjectMethod_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fields = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fields,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_fields)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 289, __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_fields = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 289, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.ObjectMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_12ObjectMethod___init__(((struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *)__pyx_v_self), __pyx_v_fields);

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

static int __pyx_pf_9apischema_13serialization_7methods_12ObjectMethod___init__(struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *__pyx_v_self, PyObject *__pyx_v_fields) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":290
 * 
 *     def __init__(self, fields):
 *         self.fields = fields             # <<<<<<<<<<<<<<
 *         self._dispatch = 18
 * 
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v_fields))||((__pyx_v_fields) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_fields)->tp_name), 0))) __PYX_ERR(0, 290, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_fields;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->fields);
  __Pyx_DECREF(__pyx_v_self->fields);
  __pyx_v_self->fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":291
 *     def __init__(self, fields):
 *         self.fields = fields
 *         self._dispatch = 18             # <<<<<<<<<<<<<<
 * 
 * cdef class ClassMethod(ObjectMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 18;

  /* "apischema/serialization/methods.pyx":289
 *     cdef readonly tuple fields
 * 
 *     def __init__(self, fields):             # <<<<<<<<<<<<<<
 *         self.fields = fields
 *         self._dispatch = 18
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ObjectMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":287
 * 
 * cdef class ObjectMethod(SerializationMethod):
 *     cdef readonly tuple fields             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, fields):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ObjectMethod_6fields_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ObjectMethod_6fields_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_12ObjectMethod_6fields___get__(((struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_12ObjectMethod_6fields___get__(struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->fields);
  __pyx_r = __pyx_v_self->fields;
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ObjectMethod_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ObjectMethod_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_12ObjectMethod_2__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.fields)
 *     _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.fields is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_ObjectMethod, (type(self), 0xdbd921c, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->fields != ((PyObject*)Py_None));
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.fields is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ObjectMethod, (type(self), 0xdbd921c, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.fields is not None
 *     if use_setstate:
 *         return __pyx_unpickle_ObjectMethod, (type(self), 0xdbd921c, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_ObjectMethod, (type(self), 0xdbd921c, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_ObjectMethod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_230527516);
    __Pyx_GIVEREF(__pyx_int_230527516);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_230527516);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.fields is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ObjectMethod, (type(self), 0xdbd921c, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.ObjectMethod.__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_ObjectMethod, (type(self), 0xdbd921c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ObjectMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ObjectMethod_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_12ObjectMethod_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_12ObjectMethod_4__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ObjectMethod, (type(self), 0xdbd921c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ObjectMethod__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("apischema.serialization.methods.ObjectMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":295
 * cdef class ClassMethod(ObjectMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return ClassMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_11ClassMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_11ClassMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11ClassMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_ClassMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_11ClassMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 295, __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_obj, __pyx_v_path};
          __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, 295, __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, 295, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":296
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return ClassMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, fields):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_ClassMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":295
 * cdef class ClassMethod(ObjectMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return ClassMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.ClassMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11ClassMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11ClassMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 295, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 295, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.ClassMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11ClassMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_11ClassMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_11ClassMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_ClassMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ClassMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":298
 *         return ClassMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, fields):             # <<<<<<<<<<<<<<
 *         self.fields = fields
 *         self._dispatch = 19
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_11ClassMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_11ClassMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fields = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fields,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_fields)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 298, __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_fields = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 298, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.ClassMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11ClassMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *)__pyx_v_self), __pyx_v_fields);

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

static int __pyx_pf_9apischema_13serialization_7methods_11ClassMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *__pyx_v_self, PyObject *__pyx_v_fields) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":299
 * 
 *     def __init__(self, fields):
 *         self.fields = fields             # <<<<<<<<<<<<<<
 *         self._dispatch = 19
 * 
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v_fields))||((__pyx_v_fields) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_fields)->tp_name), 0))) __PYX_ERR(0, 299, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_fields;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.fields);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.fields);
  __pyx_v_self->__pyx_base.fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":300
 *     def __init__(self, fields):
 *         self.fields = fields
 *         self._dispatch = 19             # <<<<<<<<<<<<<<
 * 
 * cdef class ClassWithFieldsSetMethod(ObjectMethod):
 */
  __pyx_v_self->__pyx_base.__pyx_base._dispatch = 19;

  /* "apischema/serialization/methods.pyx":298
 *         return ClassMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, fields):             # <<<<<<<<<<<<<<
 *         self.fields = fields
 *         self._dispatch = 19
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ClassMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11ClassMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11ClassMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11ClassMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.fields)
 *     _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.fields is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_ClassMethod, (type(self), 0xdbd921c, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->__pyx_base.fields != ((PyObject*)Py_None));
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.fields is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ClassMethod, (type(self), 0xdbd921c, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.fields is not None
 *     if use_setstate:
 *         return __pyx_unpickle_ClassMethod, (type(self), 0xdbd921c, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_ClassMethod, (type(self), 0xdbd921c, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_ClassMethod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_230527516);
    __Pyx_GIVEREF(__pyx_int_230527516);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_230527516);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.fields is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ClassMethod, (type(self), 0xdbd921c, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.ClassMethod.__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_ClassMethod, (type(self), 0xdbd921c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ClassMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11ClassMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11ClassMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11ClassMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ClassMethod, (type(self), 0xdbd921c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ClassMethod__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("apischema.serialization.methods.ClassMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":304
 * cdef class ClassWithFieldsSetMethod(ObjectMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return ClassWithFieldsSetMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_ClassWithFieldsSetMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 304, __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_obj, __pyx_v_path};
          __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, 304, __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, 304, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":305
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return ClassWithFieldsSetMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, fields):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_ClassWithFieldsSetMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":304
 * cdef class ClassWithFieldsSetMethod(ObjectMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return ClassWithFieldsSetMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.ClassWithFieldsSetMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 304, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 304, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.ClassWithFieldsSetMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_ClassWithFieldsSetMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ClassWithFieldsSetMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":307
 *         return ClassWithFieldsSetMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, fields):             # <<<<<<<<<<<<<<
 *         self.fields = fields
 *         self._dispatch = 20
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fields = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fields,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_fields)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 307, __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_fields = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 307, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.ClassWithFieldsSetMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *)__pyx_v_self), __pyx_v_fields);

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

static int __pyx_pf_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *__pyx_v_self, PyObject *__pyx_v_fields) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":308
 * 
 *     def __init__(self, fields):
 *         self.fields = fields             # <<<<<<<<<<<<<<
 *         self._dispatch = 20
 * 
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v_fields))||((__pyx_v_fields) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_fields)->tp_name), 0))) __PYX_ERR(0, 308, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_fields;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.fields);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.fields);
  __pyx_v_self->__pyx_base.fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":309
 *     def __init__(self, fields):
 *         self.fields = fields
 *         self._dispatch = 20             # <<<<<<<<<<<<<<
 * 
 * cdef class TypedDictMethod(ObjectMethod):
 */
  __pyx_v_self->__pyx_base.__pyx_base._dispatch = 20;

  /* "apischema/serialization/methods.pyx":307
 *         return ClassWithFieldsSetMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, fields):             # <<<<<<<<<<<<<<
 *         self.fields = fields
 *         self._dispatch = 20
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ClassWithFieldsSetMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.fields)
 *     _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.fields is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_ClassWithFieldsSetMethod, (type(self), 0xdbd921c, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->__pyx_base.fields != ((PyObject*)Py_None));
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.fields is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ClassWithFieldsSetMethod, (type(self), 0xdbd921c, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.fields is not None
 *     if use_setstate:
 *         return __pyx_unpickle_ClassWithFieldsSetMethod, (type(self), 0xdbd921c, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_ClassWithFieldsSetMethod, (type(self), 0xdbd921c, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_ClassWithFieldsSe); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_230527516);
    __Pyx_GIVEREF(__pyx_int_230527516);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_230527516);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.fields is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ClassWithFieldsSetMethod, (type(self), 0xdbd921c, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.ClassWithFieldsSetMethod.__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_ClassWithFieldsSetMethod, (type(self), 0xdbd921c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ClassWithFieldsSetMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ClassWithFieldsSetMethod, (type(self), 0xdbd921c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ClassWithFieldsSetMethod__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("apischema.serialization.methods.ClassWithFieldsSetMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":313
 * cdef class TypedDictMethod(ObjectMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TypedDictMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypedDictMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_15TypedDictMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_15TypedDictMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_TypedDictMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_15TypedDictMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 313, __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_obj, __pyx_v_path};
          __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, 313, __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, 313, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":314
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return TypedDictMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, fields):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_TypedDictMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":313
 * cdef class TypedDictMethod(ObjectMethod):
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TypedDictMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.TypedDictMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypedDictMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypedDictMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 313, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 313, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.TypedDictMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15TypedDictMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_15TypedDictMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_15TypedDictMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_TypedDictMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.TypedDictMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":316
 *         return TypedDictMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, fields):             # <<<<<<<<<<<<<<
 *         self.fields = fields
 *         self._dispatch = 21
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_15TypedDictMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_15TypedDictMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fields = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fields,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_fields)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 316, __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_fields = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 316, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.TypedDictMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15TypedDictMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *)__pyx_v_self), __pyx_v_fields);

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

static int __pyx_pf_9apischema_13serialization_7methods_15TypedDictMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *__pyx_v_self, PyObject *__pyx_v_fields) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":317
 * 
 *     def __init__(self, fields):
 *         self.fields = fields             # <<<<<<<<<<<<<<
 *         self._dispatch = 21
 * 
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v_fields))||((__pyx_v_fields) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_fields)->tp_name), 0))) __PYX_ERR(0, 317, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_fields;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.fields);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.fields);
  __pyx_v_self->__pyx_base.fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":318
 *     def __init__(self, fields):
 *         self.fields = fields
 *         self._dispatch = 21             # <<<<<<<<<<<<<<
 * 
 * cdef class TypedDictWithAdditionalMethod(TypedDictMethod):
 */
  __pyx_v_self->__pyx_base.__pyx_base._dispatch = 21;

  /* "apischema/serialization/methods.pyx":316
 *         return TypedDictMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, fields):             # <<<<<<<<<<<<<<
 *         self.fields = fields
 *         self._dispatch = 21
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.TypedDictMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypedDictMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypedDictMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15TypedDictMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.fields)
 *     _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.fields is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TypedDictMethod, (type(self), 0xdbd921c, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->__pyx_base.fields != ((PyObject*)Py_None));
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.fields is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TypedDictMethod, (type(self), 0xdbd921c, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.fields is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TypedDictMethod, (type(self), 0xdbd921c, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TypedDictMethod, (type(self), 0xdbd921c, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TypedDictMethod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_230527516);
    __Pyx_GIVEREF(__pyx_int_230527516);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_230527516);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.fields is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TypedDictMethod, (type(self), 0xdbd921c, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.TypedDictMethod.__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_TypedDictMethod, (type(self), 0xdbd921c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TypedDictMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypedDictMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15TypedDictMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_15TypedDictMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TypedDictMethod, (type(self), 0xdbd921c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TypedDictMethod__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("apischema.serialization.methods.TypedDictMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":324
 *     cdef readonly SerializationMethod any_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TypedDictWithAdditionalMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 324, __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_obj, __pyx_v_path};
          __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, 324, __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, 324, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":325
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return TypedDictWithAdditionalMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, fields, field_names, any_method):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":324
 *     cdef readonly SerializationMethod any_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TypedDictWithAdditionalMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.TypedDictWithAdditionalMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 324, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 324, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.TypedDictWithAdditionalMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_15TypedDictMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod->__pyx_base.serialize(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *)__pyx_v_self), __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.TypedDictWithAdditionalMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":327
 *         return TypedDictWithAdditionalMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, fields, field_names, any_method):             # <<<<<<<<<<<<<<
 *         self.fields = fields
 *         self.field_names = field_names
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_field_names = 0;
  PyObject *__pyx_v_any_method = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fields,&__pyx_n_s_field_names,&__pyx_n_s_any_method,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_fields)) != 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_field_names)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 327, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_any_method)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 327, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 327, __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_fields = values[0];
    __pyx_v_field_names = values[1];
    __pyx_v_any_method = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 327, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.TypedDictWithAdditionalMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *)__pyx_v_self), __pyx_v_fields, __pyx_v_field_names, __pyx_v_any_method);

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

static int __pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *__pyx_v_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_field_names, PyObject *__pyx_v_any_method) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":328
 * 
 *     def __init__(self, fields, field_names, any_method):
 *         self.fields = fields             # <<<<<<<<<<<<<<
 *         self.field_names = field_names
 *         self.any_method = any_method
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v_fields))||((__pyx_v_fields) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_fields)->tp_name), 0))) __PYX_ERR(0, 328, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_fields;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base.fields);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base.fields);
  __pyx_v_self->__pyx_base.__pyx_base.fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":329
 *     def __init__(self, fields, field_names, any_method):
 *         self.fields = fields
 *         self.field_names = field_names             # <<<<<<<<<<<<<<
 *         self.any_method = any_method
 *         self._dispatch = 22
 */
  if (!(likely(PySet_CheckExact(__pyx_v_field_names))||((__pyx_v_field_names) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_v_field_names)->tp_name), 0))) __PYX_ERR(0, 329, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_field_names;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->field_names);
  __Pyx_DECREF(__pyx_v_self->field_names);
  __pyx_v_self->field_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":330
 *         self.fields = fields
 *         self.field_names = field_names
 *         self.any_method = any_method             # <<<<<<<<<<<<<<
 *         self._dispatch = 22
 * 
 */
  if (!(likely(((__pyx_v_any_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_any_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 330, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_any_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->any_method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->any_method));
  __pyx_v_self->any_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":331
 *         self.field_names = field_names
 *         self.any_method = any_method
 *         self._dispatch = 22             # <<<<<<<<<<<<<<
 * 
 * cdef class TupleCheckOnlyMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._dispatch = 22;

  /* "apischema/serialization/methods.pyx":327
 *         return TypedDictWithAdditionalMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, fields, field_names, any_method):             # <<<<<<<<<<<<<<
 *         self.fields = fields
 *         self.field_names = field_names
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.TypedDictWithAdditionalMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":321
 * 
 * cdef class TypedDictWithAdditionalMethod(TypedDictMethod):
 *     cdef readonly set field_names             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod any_method
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_11field_names_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_11field_names_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_11field_names___get__(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_11field_names___get__(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->field_names);
  __pyx_r = __pyx_v_self->field_names;
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":322
 * cdef class TypedDictWithAdditionalMethod(TypedDictMethod):
 *     cdef readonly set field_names
 *     cdef readonly SerializationMethod any_method             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_10any_method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_10any_method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_10any_method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_10any_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->any_method));
  __pyx_r = ((PyObject *)__pyx_v_self->any_method);
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.any_method, self.field_names, self.fields)
 *     _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.any_method is not None or self.field_names is not None or self.fields is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TypedDictWithAdditionalMethod, (type(self), 0xb99ff26, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->any_method) != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->field_names != ((PyObject*)Py_None));
    __pyx_t_3 = (__pyx_t_5 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_4 = __pyx_t_3;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = (__pyx_v_self->__pyx_base.__pyx_base.fields != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_3 != 0);
    __pyx_t_4 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.any_method is not None or self.field_names is not None or self.fields is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TypedDictWithAdditionalMethod, (type(self), 0xb99ff26, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.any_method is not None or self.field_names is not None or self.fields is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TypedDictWithAdditionalMethod, (type(self), 0xb99ff26, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TypedDictWithAdditionalMethod, (type(self), 0xb99ff26, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TypedDictWithAddi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_194641702);
    __Pyx_GIVEREF(__pyx_int_194641702);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_194641702);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.any_method is not None or self.field_names is not None or self.fields is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TypedDictWithAdditionalMethod, (type(self), 0xb99ff26, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.TypedDictWithAdditionalMethod.__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_TypedDictWithAdditionalMethod, (type(self), 0xb99ff26, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TypedDictWithAdditionalMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TypedDictWithAdditionalMethod, (type(self), 0xb99ff26, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TypedDictWithAdditionalMethod__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("apischema.serialization.methods.TypedDictWithAdditionalMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":336
 *     cdef readonly tuple elt_methods
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TupleCheckOnlyMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_TupleCheckOnlyMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 336, __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_obj, __pyx_v_path};
          __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, 336, __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, 336, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":337
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return TupleCheckOnlyMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, elt_methods):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyTuple_CheckExact(__pyx_v_obj))||((__pyx_v_obj) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_obj)->tp_name), 0))) __PYX_ERR(0, 337, __pyx_L1_error)
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_TupleCheckOnlyMethod_serialize(__pyx_v_self, ((PyObject*)__pyx_v_obj), &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":336
 *     cdef readonly tuple elt_methods
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TupleCheckOnlyMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.TupleCheckOnlyMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 336, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 336, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.TupleCheckOnlyMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_TupleCheckOnlyMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.TupleCheckOnlyMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":339
 *         return TupleCheckOnlyMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, elt_methods):             # <<<<<<<<<<<<<<
 *         self.elt_methods = elt_methods
 *         self._dispatch = 23
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elt_methods = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elt_methods,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_elt_methods)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 339, __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_elt_methods = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 339, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.TupleCheckOnlyMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *)__pyx_v_self), __pyx_v_elt_methods);

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

static int __pyx_pf_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_elt_methods) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":340
 * 
 *     def __init__(self, elt_methods):
 *         self.elt_methods = elt_methods             # <<<<<<<<<<<<<<
 *         self._dispatch = 23
 * 
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v_elt_methods))||((__pyx_v_elt_methods) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_elt_methods)->tp_name), 0))) __PYX_ERR(0, 340, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_elt_methods;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->elt_methods);
  __Pyx_DECREF(__pyx_v_self->elt_methods);
  __pyx_v_self->elt_methods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":341
 *     def __init__(self, elt_methods):
 *         self.elt_methods = elt_methods
 *         self._dispatch = 23             # <<<<<<<<<<<<<<
 * 
 * cdef class TupleMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 23;

  /* "apischema/serialization/methods.pyx":339
 *         return TupleCheckOnlyMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, elt_methods):             # <<<<<<<<<<<<<<
 *         self.elt_methods = elt_methods
 *         self._dispatch = 23
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.TupleCheckOnlyMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":334
 * 
 * cdef class TupleCheckOnlyMethod(SerializationMethod):
 *     cdef readonly tuple elt_methods             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_11elt_methods_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_11elt_methods_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_11elt_methods___get__(((struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_11elt_methods___get__(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->elt_methods);
  __pyx_r = __pyx_v_self->elt_methods;
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.elt_methods)
 *     _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.elt_methods is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TupleCheckOnlyMethod, (type(self), 0x2180c5e, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->elt_methods != ((PyObject*)Py_None));
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.elt_methods is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TupleCheckOnlyMethod, (type(self), 0x2180c5e, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.elt_methods is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TupleCheckOnlyMethod, (type(self), 0x2180c5e, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TupleCheckOnlyMethod, (type(self), 0x2180c5e, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TupleCheckOnlyMet); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_35130462);
    __Pyx_GIVEREF(__pyx_int_35130462);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_35130462);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.elt_methods is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TupleCheckOnlyMethod, (type(self), 0x2180c5e, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.TupleCheckOnlyMethod.__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_TupleCheckOnlyMethod, (type(self), 0x2180c5e, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TupleCheckOnlyMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TupleCheckOnlyMethod, (type(self), 0x2180c5e, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TupleCheckOnlyMethod__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("apischema.serialization.methods.TupleCheckOnlyMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":346
 *     cdef readonly tuple elt_methods
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TupleMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_11TupleMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_11TupleMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11TupleMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_TupleMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_11TupleMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 346, __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_obj, __pyx_v_path};
          __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, 346, __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, 346, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":347
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return TupleMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, elt_methods):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyTuple_CheckExact(__pyx_v_obj))||((__pyx_v_obj) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_obj)->tp_name), 0))) __PYX_ERR(0, 347, __pyx_L1_error)
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_TupleMethod_serialize(__pyx_v_self, ((PyObject*)__pyx_v_obj), &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":346
 *     cdef readonly tuple elt_methods
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return TupleMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.TupleMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11TupleMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11TupleMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 346, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 346, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.TupleMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11TupleMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_11TupleMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_11TupleMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_TupleMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.TupleMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":349
 *         return TupleMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, elt_methods):             # <<<<<<<<<<<<<<
 *         self.elt_methods = elt_methods
 *         self._dispatch = 24
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_11TupleMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_11TupleMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elt_methods = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elt_methods,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_elt_methods)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 349, __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_elt_methods = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 349, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.TupleMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11TupleMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *)__pyx_v_self), __pyx_v_elt_methods);

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

static int __pyx_pf_9apischema_13serialization_7methods_11TupleMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *__pyx_v_self, PyObject *__pyx_v_elt_methods) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":350
 * 
 *     def __init__(self, elt_methods):
 *         self.elt_methods = elt_methods             # <<<<<<<<<<<<<<
 *         self._dispatch = 24
 * 
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v_elt_methods))||((__pyx_v_elt_methods) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_elt_methods)->tp_name), 0))) __PYX_ERR(0, 350, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_elt_methods;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->elt_methods);
  __Pyx_DECREF(__pyx_v_self->elt_methods);
  __pyx_v_self->elt_methods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":351
 *     def __init__(self, elt_methods):
 *         self.elt_methods = elt_methods
 *         self._dispatch = 24             # <<<<<<<<<<<<<<
 * 
 * cdef class CheckedTupleMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 24;

  /* "apischema/serialization/methods.pyx":349
 *         return TupleMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, elt_methods):             # <<<<<<<<<<<<<<
 *         self.elt_methods = elt_methods
 *         self._dispatch = 24
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.TupleMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":344
 * 
 * cdef class TupleMethod(SerializationMethod):
 *     cdef readonly tuple elt_methods             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11TupleMethod_11elt_methods_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11TupleMethod_11elt_methods_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11TupleMethod_11elt_methods___get__(((struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_11TupleMethod_11elt_methods___get__(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->elt_methods);
  __pyx_r = __pyx_v_self->elt_methods;
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11TupleMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11TupleMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11TupleMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.elt_methods)
 *     _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.elt_methods is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TupleMethod, (type(self), 0x2180c5e, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->elt_methods != ((PyObject*)Py_None));
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.elt_methods is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TupleMethod, (type(self), 0x2180c5e, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.elt_methods is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TupleMethod, (type(self), 0x2180c5e, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TupleMethod, (type(self), 0x2180c5e, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TupleMethod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_35130462);
    __Pyx_GIVEREF(__pyx_int_35130462);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_35130462);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.elt_methods is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TupleMethod, (type(self), 0x2180c5e, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.TupleMethod.__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_TupleMethod, (type(self), 0x2180c5e, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TupleMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11TupleMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11TupleMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11TupleMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TupleMethod, (type(self), 0x2180c5e, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TupleMethod__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("apischema.serialization.methods.TupleMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":357
 *     cdef readonly SerializationMethod method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return CheckedTupleMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_18CheckedTupleMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_18CheckedTupleMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_CheckedTupleMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 357, __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_obj, __pyx_v_path};
          __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, 357, __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, 357, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":358
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return CheckedTupleMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, nb_elts, method):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyTuple_CheckExact(__pyx_v_obj))||((__pyx_v_obj) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_obj)->tp_name), 0))) __PYX_ERR(0, 358, __pyx_L1_error)
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_CheckedTupleMethod_serialize(__pyx_v_self, ((PyObject*)__pyx_v_obj), &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":357
 *     cdef readonly SerializationMethod method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return CheckedTupleMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.CheckedTupleMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 357, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 357, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.CheckedTupleMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_18CheckedTupleMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_CheckedTupleMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.CheckedTupleMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":360
 *         return CheckedTupleMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, nb_elts, method):             # <<<<<<<<<<<<<<
 *         self.nb_elts = nb_elts
 *         self.method = method
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_nb_elts = 0;
  PyObject *__pyx_v_method = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nb_elts,&__pyx_n_s_method,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nb_elts)) != 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_method)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 360, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 360, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_nb_elts = values[0];
    __pyx_v_method = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 360, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.CheckedTupleMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *)__pyx_v_self), __pyx_v_nb_elts, __pyx_v_method);

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

static int __pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_v_self, PyObject *__pyx_v_nb_elts, PyObject *__pyx_v_method) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":361
 * 
 *     def __init__(self, nb_elts, method):
 *         self.nb_elts = nb_elts             # <<<<<<<<<<<<<<
 *         self.method = method
 *         self._dispatch = 25
 */
  __pyx_t_1 = __Pyx_PyInt_As_long(__pyx_v_nb_elts); if (unlikely((__pyx_t_1 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
  __pyx_v_self->nb_elts = __pyx_t_1;

  /* "apischema/serialization/methods.pyx":362
 *     def __init__(self, nb_elts, method):
 *         self.nb_elts = nb_elts
 *         self.method = method             # <<<<<<<<<<<<<<
 *         self._dispatch = 25
 * 
 */
  if (!(likely(((__pyx_v_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 362, __pyx_L1_error)
  __pyx_t_2 = __pyx_v_method;
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->method));
  __pyx_v_self->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "apischema/serialization/methods.pyx":363
 *         self.nb_elts = nb_elts
 *         self.method = method
 *         self._dispatch = 25             # <<<<<<<<<<<<<<
 * 
 * cdef class OptionalMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 25;

  /* "apischema/serialization/methods.pyx":360
 *         return CheckedTupleMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, nb_elts, method):             # <<<<<<<<<<<<<<
 *         self.nb_elts = nb_elts
 *         self.method = method
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apischema.serialization.methods.CheckedTupleMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":354
 * 
 * cdef class CheckedTupleMethod(SerializationMethod):
 *     cdef readonly long nb_elts             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod method
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_7nb_elts_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_7nb_elts_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_7nb_elts___get__(((struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_7nb_elts___get__(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_self->nb_elts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.CheckedTupleMethod.nb_elts.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":355
 * cdef class CheckedTupleMethod(SerializationMethod):
 *     cdef readonly long nb_elts
 *     cdef readonly SerializationMethod method             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_6method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_6method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_6method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_6method___get__(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->method));
  __pyx_r = ((PyObject *)__pyx_v_self->method);
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.method, self.nb_elts)
 *     _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.method is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_CheckedTupleMethod, (type(self), 0x336f605, None), state
 */
  /*else*/ {
    __pyx_t_5 = (((PyObject *)__pyx_v_self->method) != Py_None);
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CheckedTupleMethod, (type(self), 0x336f605, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self.method is not None
 *     if use_setstate:
 *         return __pyx_unpickle_CheckedTupleMethod, (type(self), 0x336f605, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CheckedTupleMethod, (type(self), 0x336f605, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_CheckedTupleMetho); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_53933573);
    __Pyx_GIVEREF(__pyx_int_53933573);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_53933573);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CheckedTupleMethod, (type(self), 0x336f605, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_CheckedTupleMethod, (type(self), 0x336f605, None), state
 *     else:
 *         return __pyx_unpickle_CheckedTupleMethod, (type(self), 0x336f605, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CheckedTupleMethod__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_CheckedTupleMetho); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_53933573);
    __Pyx_GIVEREF(__pyx_int_53933573);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_53933573);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apischema.serialization.methods.CheckedTupleMethod.__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_CheckedTupleMethod, (type(self), 0x336f605, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CheckedTupleMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_18CheckedTupleMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CheckedTupleMethod, (type(self), 0x336f605, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CheckedTupleMethod__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("apischema.serialization.methods.CheckedTupleMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":368
 *     cdef readonly SerializationMethod value_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return OptionalMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_14OptionalMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_14OptionalMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_OptionalMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 368, __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_obj, __pyx_v_path};
          __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, 368, __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, 368, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":369
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return OptionalMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, value_method):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_OptionalMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":368
 *     cdef readonly SerializationMethod value_method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return OptionalMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.OptionalMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 368, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 368, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.OptionalMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_14OptionalMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_14OptionalMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_14OptionalMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_OptionalMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.OptionalMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":371
 *         return OptionalMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, value_method):             # <<<<<<<<<<<<<<
 *         self.value_method = value_method
 *         self._dispatch = 26
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value_method = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value_method,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value_method)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 371, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_value_method = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 371, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.OptionalMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_14OptionalMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *)__pyx_v_self), __pyx_v_value_method);

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

static int __pyx_pf_9apischema_13serialization_7methods_14OptionalMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *__pyx_v_self, PyObject *__pyx_v_value_method) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":372
 * 
 *     def __init__(self, value_method):
 *         self.value_method = value_method             # <<<<<<<<<<<<<<
 *         self._dispatch = 26
 * 
 */
  if (!(likely(((__pyx_v_value_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 372, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->value_method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->value_method));
  __pyx_v_self->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":373
 *     def __init__(self, value_method):
 *         self.value_method = value_method
 *         self._dispatch = 26             # <<<<<<<<<<<<<<
 * 
 * cdef class UnionAlternative(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 26;

  /* "apischema/serialization/methods.pyx":371
 *         return OptionalMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, value_method):             # <<<<<<<<<<<<<<
 *         self.value_method = value_method
 *         self._dispatch = 26
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.OptionalMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":366
 * 
 * cdef class OptionalMethod(SerializationMethod):
 *     cdef readonly SerializationMethod value_method             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_12value_method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_12value_method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_14OptionalMethod_12value_method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_14OptionalMethod_12value_method___get__(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->value_method));
  __pyx_r = ((PyObject *)__pyx_v_self->value_method);
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_14OptionalMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *)__pyx_v_self));

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

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

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

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

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

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

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

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

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.value_method is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_OptionalMethod, (type(self), 0x6f73d86, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->value_method) != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.value_method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_OptionalMethod, (type(self), 0x6f73d86, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.value_method is not None
 *     if use_setstate:
 *         return __pyx_unpickle_OptionalMethod, (type(self), 0x6f73d86, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_OptionalMethod, (type(self), 0x6f73d86, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_OptionalMethod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_116866438);
    __Pyx_GIVEREF(__pyx_int_116866438);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_116866438);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.value_method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_OptionalMethod, (type(self), 0x6f73d86, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.OptionalMethod.__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_OptionalMethod, (type(self), 0x6f73d86, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_OptionalMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_14OptionalMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_OptionalMethod, (type(self), 0x6f73d86, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_OptionalMethod__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("apischema.serialization.methods.OptionalMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":379
 *     cdef readonly SerializationMethod method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return UnionAlternative_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_16UnionAlternative_serialize(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_16UnionAlternative_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_UnionAlternative_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 379, __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_obj, __pyx_v_path};
          __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, 379, __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, 379, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 379, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":380
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return UnionAlternative_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, cls, method):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_UnionAlternative_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":379
 *     cdef readonly SerializationMethod method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return UnionAlternative_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.UnionAlternative.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 379, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 379, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.UnionAlternative.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_serialize(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_16UnionAlternative_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_UnionAlternative->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.UnionAlternative.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":382
 *         return UnionAlternative_serialize(self, obj, path)
 * 
 *     def __init__(self, cls, method):             # <<<<<<<<<<<<<<
 *         self.cls = cls
 *         self.method = method
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_method = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_method,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cls)) != 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_method)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 382, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 382, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_cls = values[0];
    __pyx_v_method = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 382, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.UnionAlternative.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *)__pyx_v_self), __pyx_v_cls, __pyx_v_method);

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

static int __pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *__pyx_v_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_method) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":383
 * 
 *     def __init__(self, cls, method):
 *         self.cls = cls             # <<<<<<<<<<<<<<
 *         self.method = method
 *         self._dispatch = 27
 */
  __Pyx_INCREF(__pyx_v_cls);
  __Pyx_GIVEREF(__pyx_v_cls);
  __Pyx_GOTREF(__pyx_v_self->cls);
  __Pyx_DECREF(__pyx_v_self->cls);
  __pyx_v_self->cls = __pyx_v_cls;

  /* "apischema/serialization/methods.pyx":384
 *     def __init__(self, cls, method):
 *         self.cls = cls
 *         self.method = method             # <<<<<<<<<<<<<<
 *         self._dispatch = 27
 * 
 */
  if (!(likely(((__pyx_v_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 384, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->method));
  __pyx_v_self->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":385
 *         self.cls = cls
 *         self.method = method
 *         self._dispatch = 27             # <<<<<<<<<<<<<<
 * 
 * cdef class DiscriminatedAlternative(UnionAlternative):
 */
  __pyx_v_self->__pyx_base._dispatch = 27;

  /* "apischema/serialization/methods.pyx":382
 *         return UnionAlternative_serialize(self, obj, path)
 * 
 *     def __init__(self, cls, method):             # <<<<<<<<<<<<<<
 *         self.cls = cls
 *         self.method = method
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.UnionAlternative.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":376
 * 
 * cdef class UnionAlternative(SerializationMethod):
 *     cdef readonly object cls             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod method
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_3cls_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_3cls_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_3cls___get__(((struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_3cls___get__(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->cls);
  __pyx_r = __pyx_v_self->cls;
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":377
 * cdef class UnionAlternative(SerializationMethod):
 *     cdef readonly object cls
 *     cdef readonly SerializationMethod method             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_6method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_6method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_6method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_6method___get__(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->method));
  __pyx_r = ((PyObject *)__pyx_v_self->method);
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.cls, self.method)
 *     _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.cls is not None or self.method is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_UnionAlternative, (type(self), 0xa61373f, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->cls != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->method) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    __pyx_t_4 = __pyx_t_3;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.cls is not None or self.method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_UnionAlternative, (type(self), 0xa61373f, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.cls is not None or self.method is not None
 *     if use_setstate:
 *         return __pyx_unpickle_UnionAlternative, (type(self), 0xa61373f, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_UnionAlternative, (type(self), 0xa61373f, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_UnionAlternative); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_174143295);
    __Pyx_GIVEREF(__pyx_int_174143295);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_174143295);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.cls is not None or self.method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_UnionAlternative, (type(self), 0xa61373f, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.UnionAlternative.__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_UnionAlternative, (type(self), 0xa61373f, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_UnionAlternative__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16UnionAlternative_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_UnionAlternative, (type(self), 0xa61373f, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_UnionAlternative__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("apischema.serialization.methods.UnionAlternative.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":391
 *     cdef readonly str key
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return DiscriminatedAlternative_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_24DiscriminatedAlternative_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_24DiscriminatedAlternative_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_DiscriminatedAlternative_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 391, __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_obj, __pyx_v_path};
          __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, 391, __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, 391, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 391, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":392
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return DiscriminatedAlternative_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, cls, method, alias, key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_DiscriminatedAlternative_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":391
 *     cdef readonly str key
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return DiscriminatedAlternative_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.DiscriminatedAlternative.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 391, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 391, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.DiscriminatedAlternative.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_16UnionAlternative_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_DiscriminatedAlternative->__pyx_base.serialize(((struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *)__pyx_v_self), __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.DiscriminatedAlternative.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":394
 *         return DiscriminatedAlternative_serialize(self, obj, path)
 * 
 *     def __init__(self, cls, method, alias, key):             # <<<<<<<<<<<<<<
 *         self.cls = cls
 *         self.method = method
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_method = 0;
  PyObject *__pyx_v_alias = 0;
  PyObject *__pyx_v_key = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_method,&__pyx_n_s_alias,&__pyx_n_s_key,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cls)) != 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_method)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 394, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alias)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 394, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 394, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 394, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_cls = values[0];
    __pyx_v_method = values[1];
    __pyx_v_alias = values[2];
    __pyx_v_key = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 394, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.DiscriminatedAlternative.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *)__pyx_v_self), __pyx_v_cls, __pyx_v_method, __pyx_v_alias, __pyx_v_key);

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

static int __pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *__pyx_v_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_method, PyObject *__pyx_v_alias, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":395
 * 
 *     def __init__(self, cls, method, alias, key):
 *         self.cls = cls             # <<<<<<<<<<<<<<
 *         self.method = method
 *         self.alias = alias
 */
  __Pyx_INCREF(__pyx_v_cls);
  __Pyx_GIVEREF(__pyx_v_cls);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.cls);
  __pyx_v_self->__pyx_base.cls = __pyx_v_cls;

  /* "apischema/serialization/methods.pyx":396
 *     def __init__(self, cls, method, alias, key):
 *         self.cls = cls
 *         self.method = method             # <<<<<<<<<<<<<<
 *         self.alias = alias
 *         self.key = key
 */
  if (!(likely(((__pyx_v_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 396, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx_base.method));
  __pyx_v_self->__pyx_base.method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":397
 *         self.cls = cls
 *         self.method = method
 *         self.alias = alias             # <<<<<<<<<<<<<<
 *         self.key = key
 *         self._dispatch = 28
 */
  if (!(likely(PyUnicode_CheckExact(__pyx_v_alias))||((__pyx_v_alias) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_alias)->tp_name), 0))) __PYX_ERR(0, 397, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_alias;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->alias);
  __Pyx_DECREF(__pyx_v_self->alias);
  __pyx_v_self->alias = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":398
 *         self.method = method
 *         self.alias = alias
 *         self.key = key             # <<<<<<<<<<<<<<
 *         self._dispatch = 28
 * 
 */
  if (!(likely(PyUnicode_CheckExact(__pyx_v_key))||((__pyx_v_key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_key)->tp_name), 0))) __PYX_ERR(0, 398, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_key;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->key);
  __Pyx_DECREF(__pyx_v_self->key);
  __pyx_v_self->key = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":399
 *         self.alias = alias
 *         self.key = key
 *         self._dispatch = 28             # <<<<<<<<<<<<<<
 * 
 * cdef class UnionMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base.__pyx_base._dispatch = 28;

  /* "apischema/serialization/methods.pyx":394
 *         return DiscriminatedAlternative_serialize(self, obj, path)
 * 
 *     def __init__(self, cls, method, alias, key):             # <<<<<<<<<<<<<<
 *         self.cls = cls
 *         self.method = method
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.DiscriminatedAlternative.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":388
 * 
 * cdef class DiscriminatedAlternative(UnionAlternative):
 *     cdef readonly str alias             # <<<<<<<<<<<<<<
 *     cdef readonly str key
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_5alias_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_5alias_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_5alias___get__(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_5alias___get__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->alias);
  __pyx_r = __pyx_v_self->alias;
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":389
 * cdef class DiscriminatedAlternative(UnionAlternative):
 *     cdef readonly str alias
 *     cdef readonly str key             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_3key_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_3key_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_3key___get__(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_3key___get__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->key);
  __pyx_r = __pyx_v_self->key;
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.alias, self.cls, self.key, self.method)
 *     _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.alias is not None or self.cls is not None or self.key is not None or self.method is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DiscriminatedAlternative, (type(self), 0xae0e92f, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->alias != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->__pyx_base.cls != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_4 = __pyx_t_3;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = (__pyx_v_self->key != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.method) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    __pyx_t_4 = __pyx_t_3;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.alias is not None or self.cls is not None or self.key is not None or self.method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DiscriminatedAlternative, (type(self), 0xae0e92f, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.alias is not None or self.cls is not None or self.key is not None or self.method is not None
 *     if use_setstate:
 *         return __pyx_unpickle_DiscriminatedAlternative, (type(self), 0xae0e92f, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DiscriminatedAlternative, (type(self), 0xae0e92f, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_DiscriminatedAlte); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_182511919);
    __Pyx_GIVEREF(__pyx_int_182511919);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_182511919);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.alias is not None or self.cls is not None or self.key is not None or self.method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DiscriminatedAlternative, (type(self), 0xae0e92f, None), state
 *     else:
 */
  }

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.DiscriminatedAlternative.__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_DiscriminatedAlternative, (type(self), 0xae0e92f, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DiscriminatedAlternative__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_24DiscriminatedAlternative_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DiscriminatedAlternative, (type(self), 0xae0e92f, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DiscriminatedAlternative__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("apischema.serialization.methods.DiscriminatedAlternative.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":405
 *     cdef readonly Fallback fallback
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return UnionMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_11UnionMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_11UnionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11UnionMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_UnionMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_11UnionMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 405, __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_obj, __pyx_v_path};
          __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, 405, __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, 405, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":406
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return UnionMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, alternatives, fallback):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_UnionMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":405
 *     cdef readonly Fallback fallback
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return UnionMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.UnionMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11UnionMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11UnionMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 405, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 405, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.UnionMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11UnionMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_11UnionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_11UnionMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_UnionMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.UnionMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":408
 *         return UnionMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, alternatives, fallback):             # <<<<<<<<<<<<<<
 *         self.alternatives = alternatives
 *         self.fallback = fallback
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_11UnionMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_11UnionMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_alternatives = 0;
  PyObject *__pyx_v_fallback = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alternatives,&__pyx_n_s_fallback,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alternatives)) != 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_fallback)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 408, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 408, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_alternatives = values[0];
    __pyx_v_fallback = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 408, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.UnionMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11UnionMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *)__pyx_v_self), __pyx_v_alternatives, __pyx_v_fallback);

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

static int __pyx_pf_9apischema_13serialization_7methods_11UnionMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *__pyx_v_self, PyObject *__pyx_v_alternatives, PyObject *__pyx_v_fallback) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":409
 * 
 *     def __init__(self, alternatives, fallback):
 *         self.alternatives = alternatives             # <<<<<<<<<<<<<<
 *         self.fallback = fallback
 *         self._dispatch = 29
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v_alternatives))||((__pyx_v_alternatives) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_alternatives)->tp_name), 0))) __PYX_ERR(0, 409, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_alternatives;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->alternatives);
  __Pyx_DECREF(__pyx_v_self->alternatives);
  __pyx_v_self->alternatives = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":410
 *     def __init__(self, alternatives, fallback):
 *         self.alternatives = alternatives
 *         self.fallback = fallback             # <<<<<<<<<<<<<<
 *         self._dispatch = 29
 * 
 */
  if (!(likely(((__pyx_v_fallback) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_fallback, __pyx_ptype_9apischema_13serialization_7methods_Fallback))))) __PYX_ERR(0, 410, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_fallback;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->fallback);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->fallback));
  __pyx_v_self->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":411
 *         self.alternatives = alternatives
 *         self.fallback = fallback
 *         self._dispatch = 29             # <<<<<<<<<<<<<<
 * 
 * cdef class WrapperMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 29;

  /* "apischema/serialization/methods.pyx":408
 *         return UnionMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, alternatives, fallback):             # <<<<<<<<<<<<<<
 *         self.alternatives = alternatives
 *         self.fallback = fallback
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.UnionMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":402
 * 
 * cdef class UnionMethod(SerializationMethod):
 *     cdef readonly tuple alternatives             # <<<<<<<<<<<<<<
 *     cdef readonly Fallback fallback
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11UnionMethod_12alternatives_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11UnionMethod_12alternatives_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11UnionMethod_12alternatives___get__(((struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_11UnionMethod_12alternatives___get__(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->alternatives);
  __pyx_r = __pyx_v_self->alternatives;
  goto __pyx_L0;

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

/* "apischema/serialization/methods.pyx":403
 * cdef class UnionMethod(SerializationMethod):
 *     cdef readonly tuple alternatives
 *     cdef readonly Fallback fallback             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11UnionMethod_8fallback_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11UnionMethod_8fallback_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11UnionMethod_8fallback___get__(((struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_9apischema_13serialization_7methods_11UnionMethod_8fallback___get__(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->fallback));
  __pyx_r = ((PyObject *)__pyx_v_self->fallback);
  goto __pyx_L0;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11UnionMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11UnionMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11UnionMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *)__pyx_v_self));

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

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

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

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

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

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

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

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.alternatives, self.fallback)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.alternatives is not None or self.fallback is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_UnionMethod, (type(self), 0xdfc9cea, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->alternatives != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->fallback) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    __pyx_t_4 = __pyx_t_3;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.alternatives is not None or self.fallback is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_UnionMethod, (type(self), 0xdfc9cea, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.alternatives is not None or self.fallback is not None
 *     if use_setstate:
 *         return __pyx_unpickle_UnionMethod, (type(self), 0xdfc9cea, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_UnionMethod, (type(self), 0xdfc9cea, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_UnionMethod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_234659050);
    __Pyx_GIVEREF(__pyx_int_234659050);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_234659050);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.alternatives is not None or self.fallback is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_UnionMethod, (type(self), 0xdfc9cea, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_UnionMethod, (type(self), 0xdfc9cea, None), state
 *     else:
 *         return __pyx_unpickle_UnionMethod, (type(self), 0xdfc9cea, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_UnionMethod__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_UnionMethod); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_234659050);
    __Pyx_GIVEREF(__pyx_int_234659050);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_234659050);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.UnionMethod.__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_UnionMethod, (type(self), 0xdfc9cea, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_UnionMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11UnionMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11UnionMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_11UnionMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_11UnionMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_UnionMethod, (type(self), 0xdfc9cea, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_UnionMethod__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_UnionMethod__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_UnionMethod, (type(self), 0xdfc9cea, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_UnionMethod__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("apischema.serialization.methods.UnionMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":416
 *     cdef readonly object wrapped
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return WrapperMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_13WrapperMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_13WrapperMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_WrapperMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 416, __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_obj, __pyx_v_path};
          __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, 416, __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, 416, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":417
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return WrapperMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, wrapped):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_WrapperMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":416
 *     cdef readonly object wrapped
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return WrapperMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.WrapperMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 416, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 416, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.WrapperMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13WrapperMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_13WrapperMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_13WrapperMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_WrapperMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.WrapperMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":419
 *         return WrapperMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, wrapped):             # <<<<<<<<<<<<<<
 *         self.wrapped = wrapped
 *         self._dispatch = 30
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_wrapped = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_wrapped,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_wrapped)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 419, __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_wrapped = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 419, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.WrapperMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13WrapperMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *)__pyx_v_self), __pyx_v_wrapped);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9apischema_13serialization_7methods_13WrapperMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *__pyx_v_self, PyObject *__pyx_v_wrapped) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":420
 * 
 *     def __init__(self, wrapped):
 *         self.wrapped = wrapped             # <<<<<<<<<<<<<<
 *         self._dispatch = 30
 * 
 */
  __Pyx_INCREF(__pyx_v_wrapped);
  __Pyx_GIVEREF(__pyx_v_wrapped);
  __Pyx_GOTREF(__pyx_v_self->wrapped);
  __Pyx_DECREF(__pyx_v_self->wrapped);
  __pyx_v_self->wrapped = __pyx_v_wrapped;

  /* "apischema/serialization/methods.pyx":421
 *     def __init__(self, wrapped):
 *         self.wrapped = wrapped
 *         self._dispatch = 30             # <<<<<<<<<<<<<<
 * 
 * cdef class ConversionMethod(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 30;

  /* "apischema/serialization/methods.pyx":419
 *         return WrapperMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, wrapped):             # <<<<<<<<<<<<<<
 *         self.wrapped = wrapped
 *         self._dispatch = 30
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":414
 * 
 * cdef class WrapperMethod(SerializationMethod):
 *     cdef readonly object wrapped             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_7wrapped_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_7wrapped_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13WrapperMethod_7wrapped___get__(((struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_13WrapperMethod_7wrapped___get__(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->wrapped);
  __pyx_r = __pyx_v_self->wrapped;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13WrapperMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_13WrapperMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._dispatch, self.wrapped)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base._dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->wrapped);
  __Pyx_GIVEREF(__pyx_v_self->wrapped);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->wrapped);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._dispatch, self.wrapped)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._dispatch, self.wrapped)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.wrapped is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.wrapped)
 *     _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.wrapped is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_WrapperMethod, (type(self), 0x0b01ca9, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->wrapped != Py_None);
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.wrapped is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_WrapperMethod, (type(self), 0x0b01ca9, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.wrapped is not None
 *     if use_setstate:
 *         return __pyx_unpickle_WrapperMethod, (type(self), 0x0b01ca9, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_WrapperMethod, (type(self), 0x0b01ca9, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_WrapperMethod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_11541673);
    __Pyx_GIVEREF(__pyx_int_11541673);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_11541673);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.wrapped is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_WrapperMethod, (type(self), 0x0b01ca9, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_WrapperMethod, (type(self), 0x0b01ca9, None), state
 *     else:
 *         return __pyx_unpickle_WrapperMethod, (type(self), 0x0b01ca9, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_WrapperMethod__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_WrapperMethod); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_11541673);
    __Pyx_GIVEREF(__pyx_int_11541673);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_11541673);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.WrapperMethod.__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_WrapperMethod, (type(self), 0x0b01ca9, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_WrapperMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_13WrapperMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_13WrapperMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_WrapperMethod, (type(self), 0x0b01ca9, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_WrapperMethod__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_WrapperMethod__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_WrapperMethod, (type(self), 0x0b01ca9, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_WrapperMethod__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("apischema.serialization.methods.WrapperMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":427
 *     cdef readonly SerializationMethod method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return ConversionMethod_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_16ConversionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_16ConversionMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_ConversionMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 427, __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_obj, __pyx_v_path};
          __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, 427, __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, 427, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":428
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return ConversionMethod_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, converter, method):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_ConversionMethod_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":427
 *     cdef readonly SerializationMethod method
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return ConversionMethod_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.ConversionMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 0)) __PYX_ERR(0, 427, __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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 427, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.ConversionMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_16ConversionMethod_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_ConversionMethod->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ConversionMethod.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":430
 *         return ConversionMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, converter, method):             # <<<<<<<<<<<<<<
 *         self.converter = converter
 *         self.method = method
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_converter = 0;
  PyObject *__pyx_v_method = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_converter,&__pyx_n_s_method,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_converter)) != 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_method)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 430, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 430, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_converter = values[0];
    __pyx_v_method = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 430, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.ConversionMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *)__pyx_v_self), __pyx_v_converter, __pyx_v_method);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v_self, PyObject *__pyx_v_converter, PyObject *__pyx_v_method) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":431
 * 
 *     def __init__(self, converter, method):
 *         self.converter = converter             # <<<<<<<<<<<<<<
 *         self.method = method
 *         self._dispatch = 31
 */
  __Pyx_INCREF(__pyx_v_converter);
  __Pyx_GIVEREF(__pyx_v_converter);
  __Pyx_GOTREF(__pyx_v_self->converter);
  __Pyx_DECREF(__pyx_v_self->converter);
  __pyx_v_self->converter = __pyx_v_converter;

  /* "apischema/serialization/methods.pyx":432
 *     def __init__(self, converter, method):
 *         self.converter = converter
 *         self.method = method             # <<<<<<<<<<<<<<
 *         self._dispatch = 31
 * 
 */
  if (!(likely(((__pyx_v_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 432, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_method;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->method);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->method));
  __pyx_v_self->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":433
 *         self.converter = converter
 *         self.method = method
 *         self._dispatch = 31             # <<<<<<<<<<<<<<
 * 
 * cdef class DiscriminateTypedDict(SerializationMethod):
 */
  __pyx_v_self->__pyx_base._dispatch = 31;

  /* "apischema/serialization/methods.pyx":430
 *         return ConversionMethod_serialize(self, obj, path)
 * 
 *     def __init__(self, converter, method):             # <<<<<<<<<<<<<<
 *         self.converter = converter
 *         self.method = method
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ConversionMethod.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":424
 * 
 * cdef class ConversionMethod(SerializationMethod):
 *     cdef readonly object converter             # <<<<<<<<<<<<<<
 *     cdef readonly SerializationMethod method
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_9converter_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_9converter_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_9converter___get__(((struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_9converter___get__(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->converter);
  __pyx_r = __pyx_v_self->converter;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":425
 * cdef class ConversionMethod(SerializationMethod):
 *     cdef readonly object converter
 *     cdef readonly SerializationMethod method             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_6method_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_6method_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_6method___get__(((struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_6method___get__(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->method));
  __pyx_r = ((PyObject *)__pyx_v_self->method);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._dispatch, self.converter, self.method)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base._dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->converter);
  __Pyx_GIVEREF(__pyx_v_self->converter);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->converter);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->method));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->method));
  PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_self->method));
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._dispatch, self.converter, self.method)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._dispatch, self.converter, self.method)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.converter is not None or self.method is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.converter, self.method)
 *     _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.converter is not None or self.method is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_ConversionMethod, (type(self), 0xf60e9e9, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->converter != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->method) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    __pyx_t_4 = __pyx_t_3;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.converter is not None or self.method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ConversionMethod, (type(self), 0xf60e9e9, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.converter is not None or self.method is not None
 *     if use_setstate:
 *         return __pyx_unpickle_ConversionMethod, (type(self), 0xf60e9e9, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_ConversionMethod, (type(self), 0xf60e9e9, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_ConversionMethod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_258009577);
    __Pyx_GIVEREF(__pyx_int_258009577);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_258009577);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.converter is not None or self.method is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ConversionMethod, (type(self), 0xf60e9e9, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_ConversionMethod, (type(self), 0xf60e9e9, None), state
 *     else:
 *         return __pyx_unpickle_ConversionMethod, (type(self), 0xf60e9e9, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ConversionMethod__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_ConversionMethod); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_258009577);
    __Pyx_GIVEREF(__pyx_int_258009577);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_258009577);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.ConversionMethod.__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_ConversionMethod, (type(self), 0xf60e9e9, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ConversionMethod__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_16ConversionMethod_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_ConversionMethod, (type(self), 0xf60e9e9, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ConversionMethod__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ConversionMethod__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ConversionMethod, (type(self), 0xf60e9e9, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ConversionMethod__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("apischema.serialization.methods.ConversionMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":440
 *     cdef readonly Fallback fallback
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return DiscriminateTypedDict_serialize(self, obj, path)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9apischema_13serialization_7methods_21DiscriminateTypedDict_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_21DiscriminateTypedDict_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_DiscriminateTypedDict_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_1serialize)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_obj, __pyx_v_path};
          __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, 440, __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_obj, __pyx_v_path};
          __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, 440, __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, 440, __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_obj);
          __Pyx_GIVEREF(__pyx_v_obj);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apischema/serialization/methods.pyx":441
 * 
 *     cpdef serialize(self, object obj, object path = None):
 *         return DiscriminateTypedDict_serialize(self, obj, path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, field_name, mapping, fallback):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_DiscriminateTypedDict_serialize(__pyx_v_self, __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":440
 *     cdef readonly Fallback fallback
 * 
 *     cpdef serialize(self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return DiscriminateTypedDict_serialize(self, obj, path)
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.DiscriminateTypedDict.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_1serialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_path,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_obj)) != 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_path);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize") < 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_obj = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 440, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.DiscriminateTypedDict.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *)__pyx_v_self), __pyx_v_obj, __pyx_v_path);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_21DiscriminateTypedDict_serialize __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_vtabptr_9apischema_13serialization_7methods_DiscriminateTypedDict->serialize(__pyx_v_self, __pyx_v_obj, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.DiscriminateTypedDict.serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":443
 *         return DiscriminateTypedDict_serialize(self, obj, path)
 * 
 *     def __init__(self, field_name, mapping, fallback):             # <<<<<<<<<<<<<<
 *         self.field_name = field_name
 *         self.mapping = mapping
 */

/* Python wrapper */
static int __pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_field_name = 0;
  PyObject *__pyx_v_mapping = 0;
  PyObject *__pyx_v_fallback = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_field_name,&__pyx_n_s_mapping,&__pyx_n_s_fallback,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_field_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mapping)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 443, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fallback)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 443, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 443, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_field_name = values[0];
    __pyx_v_mapping = values[1];
    __pyx_v_fallback = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 443, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.DiscriminateTypedDict.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_2__init__(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *)__pyx_v_self), __pyx_v_field_name, __pyx_v_mapping, __pyx_v_fallback);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_2__init__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self, PyObject *__pyx_v_field_name, PyObject *__pyx_v_mapping, PyObject *__pyx_v_fallback) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apischema/serialization/methods.pyx":444
 * 
 *     def __init__(self, field_name, mapping, fallback):
 *         self.field_name = field_name             # <<<<<<<<<<<<<<
 *         self.mapping = mapping
 *         self.fallback = fallback
 */
  if (!(likely(PyUnicode_CheckExact(__pyx_v_field_name))||((__pyx_v_field_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_field_name)->tp_name), 0))) __PYX_ERR(0, 444, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_field_name;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->field_name);
  __Pyx_DECREF(__pyx_v_self->field_name);
  __pyx_v_self->field_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":445
 *     def __init__(self, field_name, mapping, fallback):
 *         self.field_name = field_name
 *         self.mapping = mapping             # <<<<<<<<<<<<<<
 *         self.fallback = fallback
 *         self._dispatch = 32
 */
  if (!(likely(PyDict_CheckExact(__pyx_v_mapping))||((__pyx_v_mapping) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_mapping)->tp_name), 0))) __PYX_ERR(0, 445, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_mapping;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->mapping);
  __Pyx_DECREF(__pyx_v_self->mapping);
  __pyx_v_self->mapping = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":446
 *         self.field_name = field_name
 *         self.mapping = mapping
 *         self.fallback = fallback             # <<<<<<<<<<<<<<
 *         self._dispatch = 32
 * 
 */
  if (!(likely(((__pyx_v_fallback) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_fallback, __pyx_ptype_9apischema_13serialization_7methods_Fallback))))) __PYX_ERR(0, 446, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_fallback;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->fallback);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->fallback));
  __pyx_v_self->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":447
 *         self.mapping = mapping
 *         self.fallback = fallback
 *         self._dispatch = 32             # <<<<<<<<<<<<<<
 * 
 * cpdef inline serialize_field(IdentityField field, object obj, bint typed_dict, bint exclude_unset):
 */
  __pyx_v_self->__pyx_base._dispatch = 32;

  /* "apischema/serialization/methods.pyx":443
 *         return DiscriminateTypedDict_serialize(self, obj, path)
 * 
 *     def __init__(self, field_name, mapping, fallback):             # <<<<<<<<<<<<<<
 *         self.field_name = field_name
 *         self.mapping = mapping
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.DiscriminateTypedDict.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":436
 * 
 * cdef class DiscriminateTypedDict(SerializationMethod):
 *     cdef readonly str field_name             # <<<<<<<<<<<<<<
 *     cdef readonly dict mapping
 *     cdef readonly Fallback fallback
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_10field_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_10field_name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_10field_name___get__(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_10field_name___get__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->field_name);
  __pyx_r = __pyx_v_self->field_name;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":437
 * cdef class DiscriminateTypedDict(SerializationMethod):
 *     cdef readonly str field_name
 *     cdef readonly dict mapping             # <<<<<<<<<<<<<<
 *     cdef readonly Fallback fallback
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_7mapping_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_7mapping_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_7mapping___get__(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_7mapping___get__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->mapping);
  __pyx_r = __pyx_v_self->mapping;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":438
 *     cdef readonly str field_name
 *     cdef readonly dict mapping
 *     cdef readonly Fallback fallback             # <<<<<<<<<<<<<<
 * 
 *     cpdef serialize(self, object obj, object path = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_8fallback_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_8fallback_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_8fallback___get__(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_8fallback___get__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->fallback));
  __pyx_r = ((PyObject *)__pyx_v_self->fallback);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_4__reduce_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_4__reduce_cython__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._dispatch, self.fallback, self.field_name, self.mapping)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base._dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->fallback));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->fallback));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->fallback));
  __Pyx_INCREF(__pyx_v_self->field_name);
  __Pyx_GIVEREF(__pyx_v_self->field_name);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->field_name);
  __Pyx_INCREF(__pyx_v_self->mapping);
  __Pyx_GIVEREF(__pyx_v_self->mapping);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_self->mapping);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._dispatch, self.fallback, self.field_name, self.mapping)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._dispatch, self.fallback, self.field_name, self.mapping)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.fallback is not None or self.field_name is not None or self.mapping is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._dispatch, self.fallback, self.field_name, self.mapping)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.fallback is not None or self.field_name is not None or self.mapping is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DiscriminateTypedDict, (type(self), 0xddc0fd7, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->fallback) != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->field_name != ((PyObject*)Py_None));
    __pyx_t_3 = (__pyx_t_5 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_4 = __pyx_t_3;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = (__pyx_v_self->mapping != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_3 != 0);
    __pyx_t_4 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.fallback is not None or self.field_name is not None or self.mapping is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DiscriminateTypedDict, (type(self), 0xddc0fd7, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.fallback is not None or self.field_name is not None or self.mapping is not None
 *     if use_setstate:
 *         return __pyx_unpickle_DiscriminateTypedDict, (type(self), 0xddc0fd7, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DiscriminateTypedDict, (type(self), 0xddc0fd7, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_DiscriminateTyped); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_232525783);
    __Pyx_GIVEREF(__pyx_int_232525783);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_232525783);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.fallback is not None or self.field_name is not None or self.mapping is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DiscriminateTypedDict, (type(self), 0xddc0fd7, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DiscriminateTypedDict, (type(self), 0xddc0fd7, None), state
 *     else:
 *         return __pyx_unpickle_DiscriminateTypedDict, (type(self), 0xddc0fd7, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DiscriminateTypedDict__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DiscriminateTyped); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_232525783);
    __Pyx_GIVEREF(__pyx_int_232525783);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_232525783);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.DiscriminateTypedDict.__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_DiscriminateTypedDict, (type(self), 0xddc0fd7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DiscriminateTypedDict__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_6__setstate_cython__(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_21DiscriminateTypedDict_6__setstate_cython__(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_DiscriminateTypedDict, (type(self), 0xddc0fd7, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DiscriminateTypedDict__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_DiscriminateTypedDict__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DiscriminateTypedDict, (type(self), 0xddc0fd7, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DiscriminateTypedDict__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("apischema.serialization.methods.DiscriminateTypedDict.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":449
 *         self._dispatch = 32
 * 
 * cpdef inline serialize_field(IdentityField field, object obj, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *     if typed_dict:
 *         return field.required or field.name in obj
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_1serialize_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_serialize_field(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_field, PyObject *__pyx_v_obj, int __pyx_v_typed_dict, int __pyx_v_exclude_unset, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize_field", 0);

  /* "apischema/serialization/methods.pyx":450
 * 
 * cpdef inline serialize_field(IdentityField field, object obj, bint typed_dict, bint exclude_unset):
 *     if typed_dict:             # <<<<<<<<<<<<<<
 *         return field.required or field.name in obj
 *     else:
 */
  __pyx_t_1 = (__pyx_v_typed_dict != 0);
  if (__pyx_t_1) {

    /* "apischema/serialization/methods.pyx":451
 * cpdef inline serialize_field(IdentityField field, object obj, bint typed_dict, bint exclude_unset):
 *     if typed_dict:
 *         return field.required or field.name in obj             # <<<<<<<<<<<<<<
 *     else:
 *         return not exclude_unset or field.name in getattr(obj, FIELDS_SET_ATTR)
 */
    __Pyx_XDECREF(__pyx_r);
    if (!__pyx_v_field->required) {
    } else {
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_field->required); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 451, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_field->name, __pyx_v_obj, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 451, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_L4_bool_binop_done:;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":450
 * 
 * cpdef inline serialize_field(IdentityField field, object obj, bint typed_dict, bint exclude_unset):
 *     if typed_dict:             # <<<<<<<<<<<<<<
 *         return field.required or field.name in obj
 *     else:
 */
  }

  /* "apischema/serialization/methods.pyx":453
 *         return field.required or field.name in obj
 *     else:
 *         return not exclude_unset or field.name in getattr(obj, FIELDS_SET_ATTR)             # <<<<<<<<<<<<<<
 * 
 * cpdef inline get_field_value(IdentityField field, object obj, bint typed_dict):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = (!(__pyx_v_exclude_unset != 0));
    if (!__pyx_t_1) {
    } else {
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L6_bool_binop_done;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FIELDS_SET_ATTR); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetAttr(__pyx_v_obj, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_field->name, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 453, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_L6_bool_binop_done:;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "apischema/serialization/methods.pyx":449
 *         self._dispatch = 32
 * 
 * cpdef inline serialize_field(IdentityField field, object obj, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *     if typed_dict:
 *         return field.required or field.name in obj
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apischema.serialization.methods.serialize_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_1serialize_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_1serialize_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_field = 0;
  PyObject *__pyx_v_obj = 0;
  int __pyx_v_typed_dict;
  int __pyx_v_exclude_unset;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialize_field (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_field,&__pyx_n_s_obj,&__pyx_n_s_typed_dict,&__pyx_n_s_exclude_unset,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_field)) != 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_obj)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("serialize_field", 1, 4, 4, 1); __PYX_ERR(0, 449, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_typed_dict)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("serialize_field", 1, 4, 4, 2); __PYX_ERR(0, 449, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exclude_unset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("serialize_field", 1, 4, 4, 3); __PYX_ERR(0, 449, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serialize_field") < 0)) __PYX_ERR(0, 449, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_field = ((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)values[0]);
    __pyx_v_obj = values[1];
    __pyx_v_typed_dict = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_typed_dict == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 449, __pyx_L3_error)
    __pyx_v_exclude_unset = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_exclude_unset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 449, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialize_field", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 449, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.serialize_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_field), __pyx_ptype_9apischema_13serialization_7methods_IdentityField, 1, "field", 0))) __PYX_ERR(0, 449, __pyx_L1_error)
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_serialize_field(__pyx_self, __pyx_v_field, __pyx_v_obj, __pyx_v_typed_dict, __pyx_v_exclude_unset);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_serialize_field(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_field, PyObject *__pyx_v_obj, int __pyx_v_typed_dict, int __pyx_v_exclude_unset) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serialize_field", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_serialize_field(__pyx_v_field, __pyx_v_obj, __pyx_v_typed_dict, __pyx_v_exclude_unset, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.serialize_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":455
 *         return not exclude_unset or field.name in getattr(obj, FIELDS_SET_ATTR)
 * 
 * cpdef inline get_field_value(IdentityField field, object obj, bint typed_dict):             # <<<<<<<<<<<<<<
 *     return obj[field.name] if typed_dict else getattr(obj, field.name)
 * 
 */

static PyObject *__pyx_pw_9apischema_13serialization_7methods_3get_field_value(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_get_field_value(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_field, PyObject *__pyx_v_obj, int __pyx_v_typed_dict, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_field_value", 0);

  /* "apischema/serialization/methods.pyx":456
 * 
 * cpdef inline get_field_value(IdentityField field, object obj, bint typed_dict):
 *     return obj[field.name] if typed_dict else getattr(obj, field.name)             # <<<<<<<<<<<<<<
 * 
 * cdef inline IdentityMethod_serialize(IdentityMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  if ((__pyx_v_typed_dict != 0)) {
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_v_field->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __pyx_t_2 = __pyx_v_field->name;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetAttr(__pyx_v_obj, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":455
 *         return not exclude_unset or field.name in getattr(obj, FIELDS_SET_ATTR)
 * 
 * cpdef inline get_field_value(IdentityField field, object obj, bint typed_dict):             # <<<<<<<<<<<<<<
 *     return obj[field.name] if typed_dict else getattr(obj, field.name)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apischema.serialization.methods.get_field_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_3get_field_value(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9apischema_13serialization_7methods_3get_field_value(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_field = 0;
  PyObject *__pyx_v_obj = 0;
  int __pyx_v_typed_dict;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_field_value (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_field,&__pyx_n_s_obj,&__pyx_n_s_typed_dict,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_field)) != 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_obj)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_field_value", 1, 3, 3, 1); __PYX_ERR(0, 455, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_typed_dict)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_field_value", 1, 3, 3, 2); __PYX_ERR(0, 455, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_field_value") < 0)) __PYX_ERR(0, 455, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_field = ((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)values[0]);
    __pyx_v_obj = values[1];
    __pyx_v_typed_dict = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_typed_dict == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 455, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_field_value", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 455, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.get_field_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_field), __pyx_ptype_9apischema_13serialization_7methods_IdentityField, 1, "field", 0))) __PYX_ERR(0, 455, __pyx_L1_error)
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_2get_field_value(__pyx_self, __pyx_v_field, __pyx_v_obj, __pyx_v_typed_dict);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9apischema_13serialization_7methods_2get_field_value(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_field, PyObject *__pyx_v_obj, int __pyx_v_typed_dict) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_field_value", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_get_field_value(__pyx_v_field, __pyx_v_obj, __pyx_v_typed_dict, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.get_field_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":458
 *     return obj[field.name] if typed_dict else getattr(obj, field.name)
 * 
 * cdef inline IdentityMethod_serialize(IdentityMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_IdentityMethod_serialize(CYTHON_UNUSED struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_IdentityMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IdentityMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":459
 * 
 * cdef inline IdentityMethod_serialize(IdentityMethod self, object obj, object path = None):
 *         return obj             # <<<<<<<<<<<<<<
 * 
 * cdef inline ListMethod_serialize(ListMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":458
 *     return obj[field.name] if typed_dict else getattr(obj, field.name)
 * 
 * cdef inline IdentityMethod_serialize(IdentityMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":461
 *         return obj
 * 
 * cdef inline ListMethod_serialize(ListMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return list(obj)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_ListMethod_serialize(CYTHON_UNUSED struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_ListMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ListMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":462
 * 
 * cdef inline ListMethod_serialize(ListMethod self, object obj, object path = None):
 *         return list(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline DictMethod_serialize(DictMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(__pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":461
 *         return obj
 * 
 * cdef inline ListMethod_serialize(ListMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return list(obj)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ListMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":464
 *         return list(obj)
 * 
 * cdef inline DictMethod_serialize(DictMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return dict(obj)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_DictMethod_serialize(CYTHON_UNUSED struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_DictMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("DictMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":465
 * 
 * cdef inline DictMethod_serialize(DictMethod self, object obj, object path = None):
 *         return dict(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline StrMethod_serialize(StrMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":464
 *         return list(obj)
 * 
 * cdef inline DictMethod_serialize(DictMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return dict(obj)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.DictMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":467
 *         return dict(obj)
 * 
 * cdef inline StrMethod_serialize(StrMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return str(obj)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_StrMethod_serialize(CYTHON_UNUSED struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_StrMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("StrMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":468
 * 
 * cdef inline StrMethod_serialize(StrMethod self, object obj, object path = None):
 *         return str(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline IntMethod_serialize(IntMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":467
 *         return dict(obj)
 * 
 * cdef inline StrMethod_serialize(StrMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return str(obj)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.StrMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":470
 *         return str(obj)
 * 
 * cdef inline IntMethod_serialize(IntMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return int(obj)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_IntMethod_serialize(CYTHON_UNUSED struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_IntMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("IntMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":471
 * 
 * cdef inline IntMethod_serialize(IntMethod self, object obj, object path = None):
 *         return int(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline BoolMethod_serialize(BoolMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":470
 *         return str(obj)
 * 
 * cdef inline IntMethod_serialize(IntMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return int(obj)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.IntMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":473
 *         return int(obj)
 * 
 * cdef inline BoolMethod_serialize(BoolMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return bool(obj)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_BoolMethod_serialize(CYTHON_UNUSED struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_BoolMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("BoolMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":474
 * 
 * cdef inline BoolMethod_serialize(BoolMethod self, object obj, object path = None):
 *         return bool(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline FloatMethod_serialize(FloatMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 474, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":473
 *         return int(obj)
 * 
 * cdef inline BoolMethod_serialize(BoolMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return bool(obj)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apischema.serialization.methods.BoolMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":476
 *         return bool(obj)
 * 
 * cdef inline FloatMethod_serialize(FloatMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return float(obj)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_FloatMethod_serialize(CYTHON_UNUSED struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_FloatMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("FloatMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":477
 * 
 * cdef inline FloatMethod_serialize(FloatMethod self, object obj, object path = None):
 *         return float(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline NoneMethod_serialize(NoneMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":476
 *         return bool(obj)
 * 
 * cdef inline FloatMethod_serialize(FloatMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return float(obj)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.FloatMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":479
 *         return float(obj)
 * 
 * cdef inline NoneMethod_serialize(NoneMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return None
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_NoneMethod_serialize(CYTHON_UNUSED struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_NoneMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("NoneMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":480
 * 
 * cdef inline NoneMethod_serialize(NoneMethod self, object obj, object path = None):
 *         return None             # <<<<<<<<<<<<<<
 * 
 * cdef inline RecMethod_serialize(RecMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":479
 *         return float(obj)
 * 
 * cdef inline NoneMethod_serialize(NoneMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return None
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":482
 *         return None
 * 
 * cdef inline RecMethod_serialize(RecMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         if self.method is None:
 *             self.method = self.lazy()
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_RecMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_RecMethod_serialize *__pyx_optional_args) {
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("RecMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":483
 * 
 * cdef inline RecMethod_serialize(RecMethod self, object obj, object path = None):
 *         if self.method is None:             # <<<<<<<<<<<<<<
 *             self.method = self.lazy()
 *         return SerializationMethod_serialize(self.method, obj)
 */
  __pyx_t_1 = (__pyx_v_self->method == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "apischema/serialization/methods.pyx":484
 * cdef inline RecMethod_serialize(RecMethod self, object obj, object path = None):
 *         if self.method is None:
 *             self.method = self.lazy()             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.method, obj)
 * 
 */
    __Pyx_INCREF(__pyx_v_self->lazy);
    __pyx_t_4 = __pyx_v_self->lazy; __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, 484, __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_self->method);
    __Pyx_DECREF(__pyx_v_self->method);
    __pyx_v_self->method = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "apischema/serialization/methods.pyx":483
 * 
 * cdef inline RecMethod_serialize(RecMethod self, object obj, object path = None):
 *         if self.method is None:             # <<<<<<<<<<<<<<
 *             self.method = self.lazy()
 *         return SerializationMethod_serialize(self.method, obj)
 */
  }

  /* "apischema/serialization/methods.pyx":485
 *         if self.method is None:
 *             self.method = self.lazy()
 *         return SerializationMethod_serialize(self.method, obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline AnyMethod_serialize(AnyMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(((__pyx_v_self->method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 485, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_self->method;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_3), __pyx_v_obj, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":482
 *         return None
 * 
 * cdef inline RecMethod_serialize(RecMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         if self.method is None:
 *             self.method = self.lazy()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.RecMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":487
 *         return SerializationMethod_serialize(self.method, obj)
 * 
 * cdef inline AnyMethod_serialize(AnyMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         method = self.factory(obj.__class__)  # tmp  variable for substitution
 *         return SerializationMethod_serialize(method, obj, path)
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_AnyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_AnyMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_v_method = 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;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("AnyMethod_serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }

  /* "apischema/serialization/methods.pyx":488
 * 
 * cdef inline AnyMethod_serialize(AnyMethod self, object obj, object path = None):
 *         method = self.factory(obj.__class__)  # tmp  variable for substitution             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(method, obj, path)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->factory);
  __pyx_t_3 = __pyx_v_self->factory; __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_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_method = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":489
 * cdef inline AnyMethod_serialize(AnyMethod self, object obj, object path = None):
 *         method = self.factory(obj.__class__)  # tmp  variable for substitution
 *         return SerializationMethod_serialize(method, obj, path)             # <<<<<<<<<<<<<<
 * 
 * cdef inline TypeCheckIdentityMethod_serialize(TypeCheckIdentityMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(((__pyx_v_method) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_method, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 489, __pyx_L1_error)
  __pyx_t_5.__pyx_n = 1;
  __pyx_t_5.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_v_method), __pyx_v_obj, &__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":487
 *         return SerializationMethod_serialize(self.method, obj)
 * 
 * cdef inline AnyMethod_serialize(AnyMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         method = self.factory(obj.__class__)  # tmp  variable for substitution
 *         return SerializationMethod_serialize(method, obj, path)
 */

  /* function exit code */
  __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("apischema.serialization.methods.AnyMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_method);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":491
 *         return SerializationMethod_serialize(method, obj, path)
 * 
 * cdef inline TypeCheckIdentityMethod_serialize(TypeCheckIdentityMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return (
 *             obj
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_TypeCheckIdentityMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_TypeCheckIdentityMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("TypeCheckIdentityMethod_serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }

  /* "apischema/serialization/methods.pyx":492
 * 
 * cdef inline TypeCheckIdentityMethod_serialize(TypeCheckIdentityMethod self, object obj, object path = None):
 *         return (             # <<<<<<<<<<<<<<
 *             obj
 *             if isinstance(obj, self.expected)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "apischema/serialization/methods.pyx":494
 *         return (
 *             obj
 *             if isinstance(obj, self.expected)             # <<<<<<<<<<<<<<
 *             else Fallback_fall_back(self.fallback, obj, path)
 *         )
 */
  __pyx_t_2 = __pyx_v_self->expected;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((__pyx_t_3 != 0)) {

    /* "apischema/serialization/methods.pyx":493
 * cdef inline TypeCheckIdentityMethod_serialize(TypeCheckIdentityMethod self, object obj, object path = None):
 *         return (
 *             obj             # <<<<<<<<<<<<<<
 *             if isinstance(obj, self.expected)
 *             else Fallback_fall_back(self.fallback, obj, path)
 */
    __Pyx_INCREF(__pyx_v_obj);
    __pyx_t_1 = __pyx_v_obj;
  } else {

    /* "apischema/serialization/methods.pyx":495
 *             obj
 *             if isinstance(obj, self.expected)
 *             else Fallback_fall_back(self.fallback, obj, path)             # <<<<<<<<<<<<<<
 *         )
 * 
 */
    __pyx_t_2 = ((PyObject *)__pyx_v_self->fallback);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_4 = __pyx_f_9apischema_13serialization_7methods_Fallback_fall_back(((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)__pyx_t_2), __pyx_v_obj, __pyx_v_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":491
 *         return SerializationMethod_serialize(method, obj, path)
 * 
 * cdef inline TypeCheckIdentityMethod_serialize(TypeCheckIdentityMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return (
 *             obj
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apischema.serialization.methods.TypeCheckIdentityMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":498
 *         )
 * 
 * cdef inline TypeCheckMethod_serialize(TypeCheckMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         if isinstance(obj, self.expected):
 *             try:
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_TypeCheckMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_TypeCheckMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("TypeCheckMethod_serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }

  /* "apischema/serialization/methods.pyx":499
 * 
 * cdef inline TypeCheckMethod_serialize(TypeCheckMethod self, object obj, object path = None):
 *         if isinstance(obj, self.expected):             # <<<<<<<<<<<<<<
 *             try:
 *                 return SerializationMethod_serialize(self.method, obj)
 */
  __pyx_t_1 = __pyx_v_self->expected;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "apischema/serialization/methods.pyx":500
 * cdef inline TypeCheckMethod_serialize(TypeCheckMethod self, object obj, object path = None):
 *         if isinstance(obj, self.expected):
 *             try:             # <<<<<<<<<<<<<<
 *                 return SerializationMethod_serialize(self.method, obj)
 *             except TypeCheckError as err:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      /*try:*/ {

        /* "apischema/serialization/methods.pyx":501
 *         if isinstance(obj, self.expected):
 *             try:
 *                 return SerializationMethod_serialize(self.method, obj)             # <<<<<<<<<<<<<<
 *             except TypeCheckError as err:
 *                 if path is None:
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = ((PyObject *)__pyx_v_self->method);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_7 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1), __pyx_v_obj, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_r = __pyx_t_7;
        __pyx_t_7 = 0;
        goto __pyx_L8_try_return;

        /* "apischema/serialization/methods.pyx":500
 * cdef inline TypeCheckMethod_serialize(TypeCheckMethod self, object obj, object path = None):
 *         if isinstance(obj, self.expected):
 *             try:             # <<<<<<<<<<<<<<
 *                 return SerializationMethod_serialize(self.method, obj)
 *             except TypeCheckError as err:
 */
      }
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "apischema/serialization/methods.pyx":502
 *             try:
 *                 return SerializationMethod_serialize(self.method, obj)
 *             except TypeCheckError as err:             # <<<<<<<<<<<<<<
 *                 if path is None:
 *                     raise
 */
      __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_1, &__pyx_t_8);
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_TypeCheckError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 502, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_ErrRestore(__pyx_t_7, __pyx_t_1, __pyx_t_8);
      __pyx_t_7 = 0; __pyx_t_1 = 0; __pyx_t_8 = 0;
      if (__pyx_t_10) {
        __Pyx_AddTraceback("apischema.serialization.methods.TypeCheckMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 502, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_v_err = __pyx_t_1;
        /*try:*/ {

          /* "apischema/serialization/methods.pyx":503
 *                 return SerializationMethod_serialize(self.method, obj)
 *             except TypeCheckError as err:
 *                 if path is None:             # <<<<<<<<<<<<<<
 *                     raise
 *                 raise TypeCheckError(err.msg, [path, *err.loc])
 */
          __pyx_t_3 = (__pyx_v_path == Py_None);
          __pyx_t_2 = (__pyx_t_3 != 0);
          if (unlikely(__pyx_t_2)) {

            /* "apischema/serialization/methods.pyx":504
 *             except TypeCheckError as err:
 *                 if path is None:
 *                     raise             # <<<<<<<<<<<<<<
 *                 raise TypeCheckError(err.msg, [path, *err.loc])
 *         else:
 */
            __Pyx_GIVEREF(__pyx_t_8);
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ErrRestoreWithState(__pyx_t_8, __pyx_t_1, __pyx_t_7);
            __pyx_t_8 = 0; __pyx_t_1 = 0; __pyx_t_7 = 0; 
            __PYX_ERR(0, 504, __pyx_L15_error)

            /* "apischema/serialization/methods.pyx":503
 *                 return SerializationMethod_serialize(self.method, obj)
 *             except TypeCheckError as err:
 *                 if path is None:             # <<<<<<<<<<<<<<
 *                     raise
 *                 raise TypeCheckError(err.msg, [path, *err.loc])
 */
          }

          /* "apischema/serialization/methods.pyx":505
 *                 if path is None:
 *                     raise
 *                 raise TypeCheckError(err.msg, [path, *err.loc])             # <<<<<<<<<<<<<<
 *         else:
 *             return Fallback_fall_back(self.fallback, obj, path)
 */
          __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_TypeCheckError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 505, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_err, __pyx_n_s_msg); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 505, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_14 = PyList_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 505, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyList_SET_ITEM(__pyx_t_14, 0, __pyx_v_path);
          __pyx_t_13 = __pyx_t_14;
          __pyx_t_14 = 0;
          __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_err, __pyx_n_s_loc); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 505, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_14);
          if (__Pyx_PyList_Extend(__pyx_t_13, __pyx_t_14) < 0) __PYX_ERR(0, 505, __pyx_L15_error)
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_14 = NULL;
          __pyx_t_10 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
            __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_11);
            if (likely(__pyx_t_14)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
              __Pyx_INCREF(__pyx_t_14);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_11, function);
              __pyx_t_10 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_12, __pyx_t_13};
            __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 505, __pyx_L15_error)
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_12, __pyx_t_13};
            __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 505, __pyx_L15_error)
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          } else
          #endif
          {
            __pyx_t_15 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 505, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_15);
            if (__pyx_t_14) {
              __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_12);
            PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_10, __pyx_t_12);
            __Pyx_GIVEREF(__pyx_t_13);
            PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_10, __pyx_t_13);
            __pyx_t_12 = 0;
            __pyx_t_13 = 0;
            __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_15, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 505, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          }
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_Raise(__pyx_t_9, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __PYX_ERR(0, 505, __pyx_L15_error)
        }

        /* "apischema/serialization/methods.pyx":502
 *             try:
 *                 return SerializationMethod_serialize(self.method, obj)
 *             except TypeCheckError as err:             # <<<<<<<<<<<<<<
 *                 if path is None:
 *                     raise
 */
        /*finally:*/ {
          __pyx_L15_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
            if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_23);
            __pyx_t_10 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err);
              __pyx_v_err = NULL;
            }
            if (PY_MAJOR_VERSION >= 3) {
              __Pyx_XGIVEREF(__pyx_t_21);
              __Pyx_XGIVEREF(__pyx_t_22);
              __Pyx_XGIVEREF(__pyx_t_23);
              __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
            }
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
            __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
            __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
            goto __pyx_L6_except_error;
          }
        }
      }
      goto __pyx_L6_except_error;
      __pyx_L6_except_error:;

      /* "apischema/serialization/methods.pyx":500
 * cdef inline TypeCheckMethod_serialize(TypeCheckMethod self, object obj, object path = None):
 *         if isinstance(obj, self.expected):
 *             try:             # <<<<<<<<<<<<<<
 *                 return SerializationMethod_serialize(self.method, obj)
 *             except TypeCheckError as err:
 */
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      goto __pyx_L1_error;
      __pyx_L8_try_return:;
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      goto __pyx_L0;
    }

    /* "apischema/serialization/methods.pyx":499
 * 
 * cdef inline TypeCheckMethod_serialize(TypeCheckMethod self, object obj, object path = None):
 *         if isinstance(obj, self.expected):             # <<<<<<<<<<<<<<
 *             try:
 *                 return SerializationMethod_serialize(self.method, obj)
 */
  }

  /* "apischema/serialization/methods.pyx":507
 *                 raise TypeCheckError(err.msg, [path, *err.loc])
 *         else:
 *             return Fallback_fall_back(self.fallback, obj, path)             # <<<<<<<<<<<<<<
 * 
 * cdef inline CollectionCheckOnlyMethod_serialize(CollectionCheckOnlyMethod self, object obj, object path = None):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = ((PyObject *)__pyx_v_self->fallback);
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_Fallback_fall_back(((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)__pyx_t_7), __pyx_v_obj, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "apischema/serialization/methods.pyx":498
 *         )
 * 
 * cdef inline TypeCheckMethod_serialize(TypeCheckMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         if isinstance(obj, self.expected):
 *             try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("apischema.serialization.methods.TypeCheckMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":509
 *             return Fallback_fall_back(self.fallback, obj, path)
 * 
 * cdef inline CollectionCheckOnlyMethod_serialize(CollectionCheckOnlyMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         for i, elt in enumerate(obj):
 *             SerializationMethod_serialize(self.value_method, elt, i)
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_CollectionCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_CollectionCheckOnlyMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_elt = 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)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("CollectionCheckOnlyMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":510
 * 
 * cdef inline CollectionCheckOnlyMethod_serialize(CollectionCheckOnlyMethod self, object obj, object path = None):
 *         for i, elt in enumerate(obj):             # <<<<<<<<<<<<<<
 *             SerializationMethod_serialize(self.value_method, elt, i)
 *         return obj
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_1 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) {
    __pyx_t_2 = __pyx_v_obj; __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_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __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, 510, __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, 510, __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, 510, __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, 510, __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, 510, __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, 510, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_elt, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "apischema/serialization/methods.pyx":511
 * cdef inline CollectionCheckOnlyMethod_serialize(CollectionCheckOnlyMethod self, object obj, object path = None):
 *         for i, elt in enumerate(obj):
 *             SerializationMethod_serialize(self.value_method, elt, i)             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */
    __pyx_t_5 = ((PyObject *)__pyx_v_self->value_method);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_7.__pyx_n = 1;
    __pyx_t_7.path = __pyx_v_i;
    __pyx_t_6 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_5), __pyx_v_elt, &__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apischema/serialization/methods.pyx":510
 * 
 * cdef inline CollectionCheckOnlyMethod_serialize(CollectionCheckOnlyMethod self, object obj, object path = None):
 *         for i, elt in enumerate(obj):             # <<<<<<<<<<<<<<
 *             SerializationMethod_serialize(self.value_method, elt, i)
 *         return obj
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":512
 *         for i, elt in enumerate(obj):
 *             SerializationMethod_serialize(self.value_method, elt, i)
 *         return obj             # <<<<<<<<<<<<<<
 * 
 * cdef inline CollectionMethod_serialize(CollectionMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":509
 *             return Fallback_fall_back(self.fallback, obj, path)
 * 
 * cdef inline CollectionCheckOnlyMethod_serialize(CollectionCheckOnlyMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         for i, elt in enumerate(obj):
 *             SerializationMethod_serialize(self.value_method, elt, i)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.CollectionCheckOnlyMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_elt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":514
 *         return obj
 * 
 * cdef inline CollectionMethod_serialize(CollectionMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return [SerializationMethod_serialize(self.value_method, elt, i) for i, elt in enumerate(obj)]
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_CollectionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_CollectionMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_7genexpr__pyx_v_i = NULL;
  PyObject *__pyx_7genexpr__pyx_v_elt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("CollectionMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":515
 * 
 * cdef inline CollectionMethod_serialize(CollectionMethod self, object obj, object path = None):
 *         return [SerializationMethod_serialize(self.value_method, elt, i) for i, elt in enumerate(obj)]             # <<<<<<<<<<<<<<
 * 
 * cdef inline ValueMethod_serialize(ValueMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_2 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) {
      __pyx_t_3 = __pyx_v_obj; __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_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 515, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 515, __pyx_L5_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, 515, __pyx_L5_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 515, __pyx_L5_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, 515, __pyx_L5_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 515, __pyx_L5_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, 515, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_elt, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_i, __pyx_t_2);
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 515, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2);
      __pyx_t_2 = __pyx_t_6;
      __pyx_t_6 = 0;
      __pyx_t_6 = ((PyObject *)__pyx_v_self->value_method);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_8.__pyx_n = 1;
      __pyx_t_8.path = __pyx_7genexpr__pyx_v_i;
      __pyx_t_7 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_6), __pyx_7genexpr__pyx_v_elt, &__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 515, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 515, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_elt); __pyx_7genexpr__pyx_v_elt = 0;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_i); __pyx_7genexpr__pyx_v_i = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_elt); __pyx_7genexpr__pyx_v_elt = 0;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_i); __pyx_7genexpr__pyx_v_i = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":514
 *         return obj
 * 
 * cdef inline CollectionMethod_serialize(CollectionMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return [SerializationMethod_serialize(self.value_method, elt, i) for i, elt in enumerate(obj)]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apischema.serialization.methods.CollectionMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_i);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_elt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":517
 *         return [SerializationMethod_serialize(self.value_method, elt, i) for i, elt in enumerate(obj)]
 * 
 * cdef inline ValueMethod_serialize(ValueMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return obj.value
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_ValueMethod_serialize(CYTHON_UNUSED struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_ValueMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ValueMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":518
 * 
 * cdef inline ValueMethod_serialize(ValueMethod self, object obj, object path = None):
 *         return obj.value             # <<<<<<<<<<<<<<
 * 
 * cdef inline EnumMethod_serialize(EnumMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":517
 *         return [SerializationMethod_serialize(self.value_method, elt, i) for i, elt in enumerate(obj)]
 * 
 * cdef inline ValueMethod_serialize(ValueMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return obj.value
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ValueMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":520
 *         return obj.value
 * 
 * cdef inline EnumMethod_serialize(EnumMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.any_method, obj.value)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_EnumMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_EnumMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("EnumMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":521
 * 
 * cdef inline EnumMethod_serialize(EnumMethod self, object obj, object path = None):
 *         return SerializationMethod_serialize(self.any_method, obj.value)             # <<<<<<<<<<<<<<
 * 
 * cdef inline MappingCheckOnlyMethod_serialize(MappingCheckOnlyMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_self->any_method);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __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;

  /* "apischema/serialization/methods.pyx":520
 *         return obj.value
 * 
 * cdef inline EnumMethod_serialize(EnumMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.any_method, obj.value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apischema.serialization.methods.EnumMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":523
 *         return SerializationMethod_serialize(self.any_method, obj.value)
 * 
 * cdef inline MappingCheckOnlyMethod_serialize(MappingCheckOnlyMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         for key, value in obj.items():
 *             SerializationMethod_serialize(self.key_method, key, key)
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_MappingCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_MappingCheckOnlyMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("MappingCheckOnlyMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":524
 * 
 * cdef inline MappingCheckOnlyMethod_serialize(MappingCheckOnlyMethod self, object obj, object path = None):
 *         for key, value in obj.items():             # <<<<<<<<<<<<<<
 *             SerializationMethod_serialize(self.key_method, key, key)
 *             SerializationMethod_serialize(self.value_method, value, key)
 */
  __pyx_t_2 = 0;
  if (unlikely(__pyx_v_obj == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 524, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_obj, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_7 == 0)) break;
    if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "apischema/serialization/methods.pyx":525
 * cdef inline MappingCheckOnlyMethod_serialize(MappingCheckOnlyMethod self, object obj, object path = None):
 *         for key, value in obj.items():
 *             SerializationMethod_serialize(self.key_method, key, key)             # <<<<<<<<<<<<<<
 *             SerializationMethod_serialize(self.value_method, value, key)
 *         return obj
 */
    __pyx_t_6 = ((PyObject *)__pyx_v_self->key_method);
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.path = __pyx_v_key;
    __pyx_t_5 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_6), __pyx_v_key, &__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "apischema/serialization/methods.pyx":526
 *         for key, value in obj.items():
 *             SerializationMethod_serialize(self.key_method, key, key)
 *             SerializationMethod_serialize(self.value_method, value, key)             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */
    __pyx_t_5 = ((PyObject *)__pyx_v_self->value_method);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.path = __pyx_v_key;
    __pyx_t_6 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_5), __pyx_v_value, &__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":527
 *             SerializationMethod_serialize(self.key_method, key, key)
 *             SerializationMethod_serialize(self.value_method, value, key)
 *         return obj             # <<<<<<<<<<<<<<
 * 
 * cdef inline MappingMethod_serialize(MappingMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":523
 *         return SerializationMethod_serialize(self.any_method, obj.value)
 * 
 * cdef inline MappingCheckOnlyMethod_serialize(MappingCheckOnlyMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         for key, value in obj.items():
 *             SerializationMethod_serialize(self.key_method, key, key)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.MappingCheckOnlyMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":529
 *         return obj
 * 
 * cdef inline MappingMethod_serialize(MappingMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return {
 *             SerializationMethod_serialize(self.key_method, key, key): SerializationMethod_serialize(self.value_method, value, key)
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_MappingMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_MappingMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_8genexpr1__pyx_v_key = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("MappingMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":530
 * 
 * cdef inline MappingMethod_serialize(MappingMethod self, object obj, object path = None):
 *         return {             # <<<<<<<<<<<<<<
 *             SerializationMethod_serialize(self.key_method, key, key): SerializationMethod_serialize(self.value_method, value, key)
 *             for key, value in obj.items()
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "apischema/serialization/methods.pyx":532
 *         return {
 *             SerializationMethod_serialize(self.key_method, key, key): SerializationMethod_serialize(self.value_method, value, key)
 *             for key, value in obj.items()             # <<<<<<<<<<<<<<
 *         }
 * 
 */
    __pyx_t_3 = 0;
    if (unlikely(__pyx_v_obj == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
      __PYX_ERR(0, 532, __pyx_L5_error)
    }
    __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_obj, 0, __pyx_n_s_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 532, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2);
    __pyx_t_2 = __pyx_t_6;
    __pyx_t_6 = 0;
    while (1) {
      __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5);
      if (unlikely(__pyx_t_8 == 0)) break;
      if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 532, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_key, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "apischema/serialization/methods.pyx":531
 * cdef inline MappingMethod_serialize(MappingMethod self, object obj, object path = None):
 *         return {
 *             SerializationMethod_serialize(self.key_method, key, key): SerializationMethod_serialize(self.value_method, value, key)             # <<<<<<<<<<<<<<
 *             for key, value in obj.items()
 *         }
 */
      __pyx_t_7 = ((PyObject *)__pyx_v_self->key_method);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.path = __pyx_8genexpr1__pyx_v_key;
      __pyx_t_6 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_7), __pyx_8genexpr1__pyx_v_key, &__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 531, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = ((PyObject *)__pyx_v_self->value_method);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.path = __pyx_8genexpr1__pyx_v_key;
      __pyx_t_10 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_7), __pyx_8genexpr1__pyx_v_value, &__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 531, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_6, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 531, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_key); __pyx_8genexpr1__pyx_v_key = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_value); __pyx_8genexpr1__pyx_v_value = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_key); __pyx_8genexpr1__pyx_v_key = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_value); __pyx_8genexpr1__pyx_v_value = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":529
 *         return obj
 * 
 * cdef inline MappingMethod_serialize(MappingMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return {
 *             SerializationMethod_serialize(self.key_method, key, key): SerializationMethod_serialize(self.value_method, value, key)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("apischema.serialization.methods.MappingMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_key);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":535
 *         }
 * 
 * cdef inline ClassMethod_serialize(ClassMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         result: dict = {}
 *         for i in range(len(self.fields)):
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_ClassMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_ClassMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_i;
  struct __pyx_obj_9apischema_13serialization_7methods_BaseField *__pyx_v_field = 0;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ClassMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":536
 * 
 * cdef inline ClassMethod_serialize(ClassMethod self, object obj, object path = None):
 *         result: dict = {}             # <<<<<<<<<<<<<<
 *         for i in range(len(self.fields)):
 *             field: BaseField = self.fields[i]
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":537
 * cdef inline ClassMethod_serialize(ClassMethod self, object obj, object path = None):
 *         result: dict = {}
 *         for i in range(len(self.fields)):             # <<<<<<<<<<<<<<
 *             field: BaseField = self.fields[i]
 *             BaseField_update_result(field, obj, result, False, False)
 */
  __pyx_t_1 = __pyx_v_self->__pyx_base.fields;
  __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, 537, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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;

    /* "apischema/serialization/methods.pyx":538
 *         result: dict = {}
 *         for i in range(len(self.fields)):
 *             field: BaseField = self.fields[i]             # <<<<<<<<<<<<<<
 *             BaseField_update_result(field, obj, result, False, False)
 *         return result
 */
    if (unlikely(__pyx_v_self->__pyx_base.fields == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 538, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx_base.fields, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_BaseField))))) __PYX_ERR(0, 538, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_field, ((struct __pyx_obj_9apischema_13serialization_7methods_BaseField *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "apischema/serialization/methods.pyx":539
 *         for i in range(len(self.fields)):
 *             field: BaseField = self.fields[i]
 *             BaseField_update_result(field, obj, result, False, False)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_BaseField_update_result(__pyx_v_field, __pyx_v_obj, __pyx_v_result, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apischema/serialization/methods.pyx":540
 *             field: BaseField = self.fields[i]
 *             BaseField_update_result(field, obj, result, False, False)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * cdef inline ClassWithFieldsSetMethod_serialize(ClassWithFieldsSetMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":535
 *         }
 * 
 * cdef inline ClassMethod_serialize(ClassMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         result: dict = {}
 *         for i in range(len(self.fields)):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ClassMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":542
 *         return result
 * 
 * cdef inline ClassWithFieldsSetMethod_serialize(ClassWithFieldsSetMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         result: dict = {}
 *         for i in range(len(self.fields)):
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_ClassWithFieldsSetMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_ClassWithFieldsSetMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_i;
  struct __pyx_obj_9apischema_13serialization_7methods_BaseField *__pyx_v_field = 0;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ClassWithFieldsSetMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":543
 * 
 * cdef inline ClassWithFieldsSetMethod_serialize(ClassWithFieldsSetMethod self, object obj, object path = None):
 *         result: dict = {}             # <<<<<<<<<<<<<<
 *         for i in range(len(self.fields)):
 *             field: BaseField = self.fields[i]
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":544
 * cdef inline ClassWithFieldsSetMethod_serialize(ClassWithFieldsSetMethod self, object obj, object path = None):
 *         result: dict = {}
 *         for i in range(len(self.fields)):             # <<<<<<<<<<<<<<
 *             field: BaseField = self.fields[i]
 *             BaseField_update_result(field, obj, result, False, True)
 */
  __pyx_t_1 = __pyx_v_self->__pyx_base.fields;
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 544, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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;

    /* "apischema/serialization/methods.pyx":545
 *         result: dict = {}
 *         for i in range(len(self.fields)):
 *             field: BaseField = self.fields[i]             # <<<<<<<<<<<<<<
 *             BaseField_update_result(field, obj, result, False, True)
 *         return result
 */
    if (unlikely(__pyx_v_self->__pyx_base.fields == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 545, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx_base.fields, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_BaseField))))) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_field, ((struct __pyx_obj_9apischema_13serialization_7methods_BaseField *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "apischema/serialization/methods.pyx":546
 *         for i in range(len(self.fields)):
 *             field: BaseField = self.fields[i]
 *             BaseField_update_result(field, obj, result, False, True)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_BaseField_update_result(__pyx_v_field, __pyx_v_obj, __pyx_v_result, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apischema/serialization/methods.pyx":547
 *             field: BaseField = self.fields[i]
 *             BaseField_update_result(field, obj, result, False, True)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * cdef inline TypedDictMethod_serialize(TypedDictMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":542
 *         return result
 * 
 * cdef inline ClassWithFieldsSetMethod_serialize(ClassWithFieldsSetMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         result: dict = {}
 *         for i in range(len(self.fields)):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.ClassWithFieldsSetMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":549
 *         return result
 * 
 * cdef inline TypedDictMethod_serialize(TypedDictMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         result: dict = {}
 *         for i in range(len(self.fields)):
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_TypedDictMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_TypedDictMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_i;
  struct __pyx_obj_9apischema_13serialization_7methods_BaseField *__pyx_v_field = 0;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("TypedDictMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":550
 * 
 * cdef inline TypedDictMethod_serialize(TypedDictMethod self, object obj, object path = None):
 *         result: dict = {}             # <<<<<<<<<<<<<<
 *         for i in range(len(self.fields)):
 *             field: BaseField = self.fields[i]
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":551
 * cdef inline TypedDictMethod_serialize(TypedDictMethod self, object obj, object path = None):
 *         result: dict = {}
 *         for i in range(len(self.fields)):             # <<<<<<<<<<<<<<
 *             field: BaseField = self.fields[i]
 *             BaseField_update_result(field, obj, result, True, False)
 */
  __pyx_t_1 = __pyx_v_self->__pyx_base.fields;
  __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, 551, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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;

    /* "apischema/serialization/methods.pyx":552
 *         result: dict = {}
 *         for i in range(len(self.fields)):
 *             field: BaseField = self.fields[i]             # <<<<<<<<<<<<<<
 *             BaseField_update_result(field, obj, result, True, False)
 *         return result
 */
    if (unlikely(__pyx_v_self->__pyx_base.fields == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 552, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx_base.fields, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_BaseField))))) __PYX_ERR(0, 552, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_field, ((struct __pyx_obj_9apischema_13serialization_7methods_BaseField *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "apischema/serialization/methods.pyx":553
 *         for i in range(len(self.fields)):
 *             field: BaseField = self.fields[i]
 *             BaseField_update_result(field, obj, result, True, False)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_BaseField_update_result(__pyx_v_field, __pyx_v_obj, __pyx_v_result, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apischema/serialization/methods.pyx":554
 *             field: BaseField = self.fields[i]
 *             BaseField_update_result(field, obj, result, True, False)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * cdef inline TypedDictWithAdditionalMethod_serialize(TypedDictWithAdditionalMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":549
 *         return result
 * 
 * cdef inline TypedDictMethod_serialize(TypedDictMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         result: dict = {}
 *         for i in range(len(self.fields)):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.TypedDictMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":556
 *         return result
 * 
 * cdef inline TypedDictWithAdditionalMethod_serialize(TypedDictWithAdditionalMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         result: dict = TypedDictMethod_serialize(<TypedDictMethod>self, obj)
 *         for key, value in obj.items():
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("TypedDictWithAdditionalMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":557
 * 
 * cdef inline TypedDictWithAdditionalMethod_serialize(TypedDictWithAdditionalMethod self, object obj, object path = None):
 *         result: dict = TypedDictMethod_serialize(<TypedDictMethod>self, obj)             # <<<<<<<<<<<<<<
 *         for key, value in obj.items():
 *             if key not in self.field_names and isinstance(key, str):
 */
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_TypedDictMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *)__pyx_v_self), __pyx_v_obj, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 557, __pyx_L1_error)
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":558
 * cdef inline TypedDictWithAdditionalMethod_serialize(TypedDictWithAdditionalMethod self, object obj, object path = None):
 *         result: dict = TypedDictMethod_serialize(<TypedDictMethod>self, obj)
 *         for key, value in obj.items():             # <<<<<<<<<<<<<<
 *             if key not in self.field_names and isinstance(key, str):
 *                 result[str(key)] = SerializationMethod_serialize(self.any_method, value, key)
 */
  __pyx_t_2 = 0;
  if (unlikely(__pyx_v_obj == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 558, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_obj, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_7 == 0)) break;
    if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "apischema/serialization/methods.pyx":559
 *         result: dict = TypedDictMethod_serialize(<TypedDictMethod>self, obj)
 *         for key, value in obj.items():
 *             if key not in self.field_names and isinstance(key, str):             # <<<<<<<<<<<<<<
 *                 result[str(key)] = SerializationMethod_serialize(self.any_method, value, key)
 *         return result
 */
    if (unlikely(__pyx_v_self->field_names == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 559, __pyx_L1_error)
    }
    __pyx_t_9 = (__Pyx_PySet_ContainsTF(__pyx_v_key, __pyx_v_self->field_names, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 559, __pyx_L1_error)
    __pyx_t_10 = (__pyx_t_9 != 0);
    if (__pyx_t_10) {
    } else {
      __pyx_t_8 = __pyx_t_10;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_10 = PyUnicode_Check(__pyx_v_key); 
    __pyx_t_9 = (__pyx_t_10 != 0);
    __pyx_t_8 = __pyx_t_9;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_8) {

      /* "apischema/serialization/methods.pyx":560
 *         for key, value in obj.items():
 *             if key not in self.field_names and isinstance(key, str):
 *                 result[str(key)] = SerializationMethod_serialize(self.any_method, value, key)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
      __pyx_t_6 = ((PyObject *)__pyx_v_self->any_method);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_11.__pyx_n = 1;
      __pyx_t_11.path = __pyx_v_key;
      __pyx_t_5 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_6), __pyx_v_value, &__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(__pyx_v_result == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 560, __pyx_L1_error)
      }
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_t_6, __pyx_t_5) < 0)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "apischema/serialization/methods.pyx":559
 *         result: dict = TypedDictMethod_serialize(<TypedDictMethod>self, obj)
 *         for key, value in obj.items():
 *             if key not in self.field_names and isinstance(key, str):             # <<<<<<<<<<<<<<
 *                 result[str(key)] = SerializationMethod_serialize(self.any_method, value, key)
 *         return result
 */
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":561
 *             if key not in self.field_names and isinstance(key, str):
 *                 result[str(key)] = SerializationMethod_serialize(self.any_method, value, key)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * cdef inline TupleCheckOnlyMethod_serialize(TupleCheckOnlyMethod self, tuple obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":556
 *         return result
 * 
 * cdef inline TypedDictWithAdditionalMethod_serialize(TypedDictWithAdditionalMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         result: dict = TypedDictMethod_serialize(<TypedDictMethod>self, obj)
 *         for key, value in obj.items():
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.TypedDictWithAdditionalMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":563
 *         return result
 * 
 * cdef inline TupleCheckOnlyMethod_serialize(TupleCheckOnlyMethod self, tuple obj, object path = None):             # <<<<<<<<<<<<<<
 *         for i in range(len(self.elt_methods)):
 *             method: SerializationMethod = self.elt_methods[i]
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_TupleCheckOnlyMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_TupleCheckOnlyMethod_serialize *__pyx_optional_args) {
  Py_ssize_t __pyx_v_i;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *__pyx_v_method = 0;
  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;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("TupleCheckOnlyMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":564
 * 
 * cdef inline TupleCheckOnlyMethod_serialize(TupleCheckOnlyMethod self, tuple obj, object path = None):
 *         for i in range(len(self.elt_methods)):             # <<<<<<<<<<<<<<
 *             method: SerializationMethod = self.elt_methods[i]
 *             SerializationMethod_serialize(method, obj[i], i)
 */
  __pyx_t_1 = __pyx_v_self->elt_methods;
  __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, 564, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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;

    /* "apischema/serialization/methods.pyx":565
 * cdef inline TupleCheckOnlyMethod_serialize(TupleCheckOnlyMethod self, tuple obj, object path = None):
 *         for i in range(len(self.elt_methods)):
 *             method: SerializationMethod = self.elt_methods[i]             # <<<<<<<<<<<<<<
 *             SerializationMethod_serialize(method, obj[i], i)
 *         return obj
 */
    if (unlikely(__pyx_v_self->elt_methods == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 565, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->elt_methods, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_method, ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "apischema/serialization/methods.pyx":566
 *         for i in range(len(self.elt_methods)):
 *             method: SerializationMethod = self.elt_methods[i]
 *             SerializationMethod_serialize(method, obj[i], i)             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */
    if (unlikely(__pyx_v_obj == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 566, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_obj, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7.__pyx_n = 1;
    __pyx_t_7.path = __pyx_t_5;
    __pyx_t_6 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(__pyx_v_method, __pyx_t_1, &__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }

  /* "apischema/serialization/methods.pyx":567
 *             method: SerializationMethod = self.elt_methods[i]
 *             SerializationMethod_serialize(method, obj[i], i)
 *         return obj             # <<<<<<<<<<<<<<
 * 
 * cdef inline TupleMethod_serialize(TupleMethod self, tuple obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":563
 *         return result
 * 
 * cdef inline TupleCheckOnlyMethod_serialize(TupleCheckOnlyMethod self, tuple obj, object path = None):             # <<<<<<<<<<<<<<
 *         for i in range(len(self.elt_methods)):
 *             method: SerializationMethod = self.elt_methods[i]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.TupleCheckOnlyMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_method);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":569
 *         return obj
 * 
 * cdef inline TupleMethod_serialize(TupleMethod self, tuple obj, object path = None):             # <<<<<<<<<<<<<<
 *         elts: list = [None] * len(self.elt_methods)
 *         for i in range(len(self.elt_methods)):
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_TupleMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_TupleMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_elts = 0;
  Py_ssize_t __pyx_v_i;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *__pyx_v_method = 0;
  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;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("TupleMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":570
 * 
 * cdef inline TupleMethod_serialize(TupleMethod self, tuple obj, object path = None):
 *         elts: list = [None] * len(self.elt_methods)             # <<<<<<<<<<<<<<
 *         for i in range(len(self.elt_methods)):
 *             method: SerializationMethod = self.elt_methods[i]
 */
  __pyx_t_1 = __pyx_v_self->elt_methods;
  __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, 570, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(1 * ((__pyx_t_2<0) ? 0:__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_t_2; __pyx_temp++) {
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None);
    }
  }
  __pyx_v_elts = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":571
 * cdef inline TupleMethod_serialize(TupleMethod self, tuple obj, object path = None):
 *         elts: list = [None] * len(self.elt_methods)
 *         for i in range(len(self.elt_methods)):             # <<<<<<<<<<<<<<
 *             method: SerializationMethod = self.elt_methods[i]
 *             elts[i] = SerializationMethod_serialize(method, obj[i], i)
 */
  __pyx_t_1 = __pyx_v_self->elt_methods;
  __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, 571, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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;

    /* "apischema/serialization/methods.pyx":572
 *         elts: list = [None] * len(self.elt_methods)
 *         for i in range(len(self.elt_methods)):
 *             method: SerializationMethod = self.elt_methods[i]             # <<<<<<<<<<<<<<
 *             elts[i] = SerializationMethod_serialize(method, obj[i], i)
 *         return elts
 */
    if (unlikely(__pyx_v_self->elt_methods == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 572, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->elt_methods, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_method, ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "apischema/serialization/methods.pyx":573
 *         for i in range(len(self.elt_methods)):
 *             method: SerializationMethod = self.elt_methods[i]
 *             elts[i] = SerializationMethod_serialize(method, obj[i], i)             # <<<<<<<<<<<<<<
 *         return elts
 * 
 */
    if (unlikely(__pyx_v_obj == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 573, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_obj, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7.__pyx_n = 1;
    __pyx_t_7.path = __pyx_t_5;
    __pyx_t_6 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(__pyx_v_method, __pyx_t_1, &__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_SetItemInt(__pyx_v_elts, __pyx_v_i, __pyx_t_6, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) __PYX_ERR(0, 573, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }

  /* "apischema/serialization/methods.pyx":574
 *             method: SerializationMethod = self.elt_methods[i]
 *             elts[i] = SerializationMethod_serialize(method, obj[i], i)
 *         return elts             # <<<<<<<<<<<<<<
 * 
 * cdef inline CheckedTupleMethod_serialize(CheckedTupleMethod self, tuple obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_elts);
  __pyx_r = __pyx_v_elts;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":569
 *         return obj
 * 
 * cdef inline TupleMethod_serialize(TupleMethod self, tuple obj, object path = None):             # <<<<<<<<<<<<<<
 *         elts: list = [None] * len(self.elt_methods)
 *         for i in range(len(self.elt_methods)):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apischema.serialization.methods.TupleMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_elts);
  __Pyx_XDECREF((PyObject *)__pyx_v_method);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":576
 *         return elts
 * 
 * cdef inline CheckedTupleMethod_serialize(CheckedTupleMethod self, tuple obj, object path = None):             # <<<<<<<<<<<<<<
 *         if not len(obj) == self.nb_elts:
 *             raise TypeError(f"Expected {self.nb_elts}-tuple, found {len(obj)}-tuple")
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_CheckedTupleMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_CheckedTupleMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_UCS4 __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("CheckedTupleMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":577
 * 
 * cdef inline CheckedTupleMethod_serialize(CheckedTupleMethod self, tuple obj, object path = None):
 *         if not len(obj) == self.nb_elts:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"Expected {self.nb_elts}-tuple, found {len(obj)}-tuple")
 *         return SerializationMethod_serialize(self.method, obj)
 */
  if (unlikely(__pyx_v_obj == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 577, __pyx_L1_error)
  }
  __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_obj); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 577, __pyx_L1_error)
  __pyx_t_2 = ((!((__pyx_t_1 == __pyx_v_self->nb_elts) != 0)) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "apischema/serialization/methods.pyx":578
 * cdef inline CheckedTupleMethod_serialize(CheckedTupleMethod self, tuple obj, object path = None):
 *         if not len(obj) == self.nb_elts:
 *             raise TypeError(f"Expected {self.nb_elts}-tuple, found {len(obj)}-tuple")             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.method, obj)
 * 
 */
    __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_4 = 127;
    __Pyx_INCREF(__pyx_kp_u_Expected);
    __pyx_t_1 += 9;
    __Pyx_GIVEREF(__pyx_kp_u_Expected);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Expected);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_self->nb_elts, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u_tuple_found);
    __pyx_t_1 += 14;
    __Pyx_GIVEREF(__pyx_kp_u_tuple_found);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_tuple_found);
    if (unlikely(__pyx_v_obj == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 578, __pyx_L1_error)
    }
    __pyx_t_6 = PyTuple_GET_SIZE(__pyx_v_obj); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 578, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_6, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u_tuple);
    __pyx_t_1 += 6;
    __Pyx_GIVEREF(__pyx_kp_u_tuple);
    PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_tuple);
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 578, __pyx_L1_error)

    /* "apischema/serialization/methods.pyx":577
 * 
 * cdef inline CheckedTupleMethod_serialize(CheckedTupleMethod self, tuple obj, object path = None):
 *         if not len(obj) == self.nb_elts:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"Expected {self.nb_elts}-tuple, found {len(obj)}-tuple")
 *         return SerializationMethod_serialize(self.method, obj)
 */
  }

  /* "apischema/serialization/methods.pyx":579
 *         if not len(obj) == self.nb_elts:
 *             raise TypeError(f"Expected {self.nb_elts}-tuple, found {len(obj)}-tuple")
 *         return SerializationMethod_serialize(self.method, obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline OptionalMethod_serialize(OptionalMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = ((PyObject *)__pyx_v_self->method);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_5 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_3), __pyx_v_obj, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":576
 *         return elts
 * 
 * cdef inline CheckedTupleMethod_serialize(CheckedTupleMethod self, tuple obj, object path = None):             # <<<<<<<<<<<<<<
 *         if not len(obj) == self.nb_elts:
 *             raise TypeError(f"Expected {self.nb_elts}-tuple, found {len(obj)}-tuple")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.CheckedTupleMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":581
 *         return SerializationMethod_serialize(self.method, obj)
 * 
 * cdef inline OptionalMethod_serialize(OptionalMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.value_method, obj, path) if obj is not None else None
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_OptionalMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_OptionalMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  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;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("OptionalMethod_serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }

  /* "apischema/serialization/methods.pyx":582
 * 
 * cdef inline OptionalMethod_serialize(OptionalMethod self, object obj, object path = None):
 *         return SerializationMethod_serialize(self.value_method, obj, path) if obj is not None else None             # <<<<<<<<<<<<<<
 * 
 * cdef inline UnionAlternative_serialize(UnionAlternative self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_obj != Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = ((PyObject *)__pyx_v_self->value_method);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.path = __pyx_v_path;
    __pyx_t_4 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_3), __pyx_v_obj, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":581
 *         return SerializationMethod_serialize(self.method, obj)
 * 
 * cdef inline OptionalMethod_serialize(OptionalMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.value_method, obj, path) if obj is not None else None
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apischema.serialization.methods.OptionalMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":584
 *         return SerializationMethod_serialize(self.value_method, obj, path) if obj is not None else None
 * 
 * cdef inline UnionAlternative_serialize(UnionAlternative self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.method, obj, path)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_UnionAlternative_serialize(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_UnionAlternative_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("UnionAlternative_serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }

  /* "apischema/serialization/methods.pyx":585
 * 
 * cdef inline UnionAlternative_serialize(UnionAlternative self, object obj, object path = None):
 *         return SerializationMethod_serialize(self.method, obj, path)             # <<<<<<<<<<<<<<
 * 
 * cdef inline DiscriminatedAlternative_serialize(DiscriminatedAlternative self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_self->method);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.path = __pyx_v_path;
  __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1), __pyx_v_obj, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 585, __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;

  /* "apischema/serialization/methods.pyx":584
 *         return SerializationMethod_serialize(self.value_method, obj, path) if obj is not None else None
 * 
 * cdef inline UnionAlternative_serialize(UnionAlternative self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.method, obj, path)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apischema.serialization.methods.UnionAlternative_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":587
 *         return SerializationMethod_serialize(self.method, obj, path)
 * 
 * cdef inline DiscriminatedAlternative_serialize(DiscriminatedAlternative self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         res = UnionAlternative_serialize(<UnionAlternative>self, obj, path)
 *         if isinstance(res, dict) and self.alias not in res:
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_DiscriminatedAlternative_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_DiscriminatedAlternative_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_UnionAlternative_serialize __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("DiscriminatedAlternative_serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }

  /* "apischema/serialization/methods.pyx":588
 * 
 * cdef inline DiscriminatedAlternative_serialize(DiscriminatedAlternative self, object obj, object path = None):
 *         res = UnionAlternative_serialize(<UnionAlternative>self, obj, path)             # <<<<<<<<<<<<<<
 *         if isinstance(res, dict) and self.alias not in res:
 *             res[self.alias] = self.key
 */
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_UnionAlternative_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *)__pyx_v_self), __pyx_v_obj, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":589
 * cdef inline DiscriminatedAlternative_serialize(DiscriminatedAlternative self, object obj, object path = None):
 *         res = UnionAlternative_serialize(<UnionAlternative>self, obj, path)
 *         if isinstance(res, dict) and self.alias not in res:             # <<<<<<<<<<<<<<
 *             res[self.alias] = self.key
 *         return res
 */
  __pyx_t_4 = PyDict_Check(__pyx_v_res); 
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_self->alias, __pyx_v_res, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 589, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "apischema/serialization/methods.pyx":590
 *         res = UnionAlternative_serialize(<UnionAlternative>self, obj, path)
 *         if isinstance(res, dict) and self.alias not in res:
 *             res[self.alias] = self.key             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    __pyx_t_1 = __pyx_v_self->key;
    __Pyx_INCREF(__pyx_t_1);
    if (unlikely(PyObject_SetItem(__pyx_v_res, __pyx_v_self->alias, __pyx_t_1) < 0)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apischema/serialization/methods.pyx":589
 * cdef inline DiscriminatedAlternative_serialize(DiscriminatedAlternative self, object obj, object path = None):
 *         res = UnionAlternative_serialize(<UnionAlternative>self, obj, path)
 *         if isinstance(res, dict) and self.alias not in res:             # <<<<<<<<<<<<<<
 *             res[self.alias] = self.key
 *         return res
 */
  }

  /* "apischema/serialization/methods.pyx":591
 *         if isinstance(res, dict) and self.alias not in res:
 *             res[self.alias] = self.key
 *         return res             # <<<<<<<<<<<<<<
 * 
 * cdef inline UnionMethod_serialize(UnionMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":587
 *         return SerializationMethod_serialize(self.method, obj, path)
 * 
 * cdef inline DiscriminatedAlternative_serialize(DiscriminatedAlternative self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         res = UnionAlternative_serialize(<UnionAlternative>self, obj, path)
 *         if isinstance(res, dict) and self.alias not in res:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.DiscriminatedAlternative_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":593
 *         return res
 * 
 * cdef inline UnionMethod_serialize(UnionMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         for i in range(len(self.alternatives)):
 *             alternative: UnionAlternative = self.alternatives[i]
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_UnionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_UnionMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  Py_ssize_t __pyx_v_i;
  struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *__pyx_v_alternative = 0;
  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;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("UnionMethod_serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }

  /* "apischema/serialization/methods.pyx":594
 * 
 * cdef inline UnionMethod_serialize(UnionMethod self, object obj, object path = None):
 *         for i in range(len(self.alternatives)):             # <<<<<<<<<<<<<<
 *             alternative: UnionAlternative = self.alternatives[i]
 *             if isinstance(obj, alternative.cls):
 */
  __pyx_t_1 = __pyx_v_self->alternatives;
  __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, 594, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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;

    /* "apischema/serialization/methods.pyx":595
 * cdef inline UnionMethod_serialize(UnionMethod self, object obj, object path = None):
 *         for i in range(len(self.alternatives)):
 *             alternative: UnionAlternative = self.alternatives[i]             # <<<<<<<<<<<<<<
 *             if isinstance(obj, alternative.cls):
 *                 try:
 */
    if (unlikely(__pyx_v_self->alternatives == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 595, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->alternatives, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_UnionAlternative))))) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_alternative, ((struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "apischema/serialization/methods.pyx":596
 *         for i in range(len(self.alternatives)):
 *             alternative: UnionAlternative = self.alternatives[i]
 *             if isinstance(obj, alternative.cls):             # <<<<<<<<<<<<<<
 *                 try:
 *                     return SerializationMethod_serialize(alternative, obj, path)
 */
    __pyx_t_1 = __pyx_v_alternative->cls;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "apischema/serialization/methods.pyx":597
 *             alternative: UnionAlternative = self.alternatives[i]
 *             if isinstance(obj, alternative.cls):
 *                 try:             # <<<<<<<<<<<<<<
 *                     return SerializationMethod_serialize(alternative, obj, path)
 *                 except Exception:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        /*try:*/ {

          /* "apischema/serialization/methods.pyx":598
 *             if isinstance(obj, alternative.cls):
 *                 try:
 *                     return SerializationMethod_serialize(alternative, obj, path)             # <<<<<<<<<<<<<<
 *                 except Exception:
 *                     pass
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_10.__pyx_n = 1;
          __pyx_t_10.path = __pyx_v_path;
          __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_v_alternative), __pyx_v_obj, &__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          goto __pyx_L10_try_return;

          /* "apischema/serialization/methods.pyx":597
 *             alternative: UnionAlternative = self.alternatives[i]
 *             if isinstance(obj, alternative.cls):
 *                 try:             # <<<<<<<<<<<<<<
 *                     return SerializationMethod_serialize(alternative, obj, path)
 *                 except Exception:
 */
        }
        __pyx_L6_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "apischema/serialization/methods.pyx":599
 *                 try:
 *                     return SerializationMethod_serialize(alternative, obj, path)
 *                 except Exception:             # <<<<<<<<<<<<<<
 *                     pass
 *         return Fallback_fall_back(self.fallback, obj, path)
 */
        __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
        if (__pyx_t_11) {
          __Pyx_ErrRestore(0,0,0);
          goto __pyx_L7_exception_handled;
        }
        goto __pyx_L8_except_error;
        __pyx_L8_except_error:;

        /* "apischema/serialization/methods.pyx":597
 *             alternative: UnionAlternative = self.alternatives[i]
 *             if isinstance(obj, alternative.cls):
 *                 try:             # <<<<<<<<<<<<<<
 *                     return SerializationMethod_serialize(alternative, obj, path)
 *                 except Exception:
 */
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L1_error;
        __pyx_L10_try_return:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L0;
        __pyx_L7_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }

      /* "apischema/serialization/methods.pyx":596
 *         for i in range(len(self.alternatives)):
 *             alternative: UnionAlternative = self.alternatives[i]
 *             if isinstance(obj, alternative.cls):             # <<<<<<<<<<<<<<
 *                 try:
 *                     return SerializationMethod_serialize(alternative, obj, path)
 */
    }
  }

  /* "apischema/serialization/methods.pyx":601
 *                 except Exception:
 *                     pass
 *         return Fallback_fall_back(self.fallback, obj, path)             # <<<<<<<<<<<<<<
 * 
 * cdef inline WrapperMethod_serialize(WrapperMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_self->fallback);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_12 = __pyx_f_9apischema_13serialization_7methods_Fallback_fall_back(((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)__pyx_t_1), __pyx_v_obj, __pyx_v_path); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_12;
  __pyx_t_12 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":593
 *         return res
 * 
 * cdef inline UnionMethod_serialize(UnionMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         for i in range(len(self.alternatives)):
 *             alternative: UnionAlternative = self.alternatives[i]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("apischema.serialization.methods.UnionMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_alternative);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":603
 *         return Fallback_fall_back(self.fallback, obj, path)
 * 
 * cdef inline WrapperMethod_serialize(WrapperMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return self.wrapped(obj)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_WrapperMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_WrapperMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("WrapperMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":604
 * 
 * cdef inline WrapperMethod_serialize(WrapperMethod self, object obj, object path = None):
 *         return self.wrapped(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline ConversionMethod_serialize(ConversionMethod self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->wrapped);
  __pyx_t_2 = __pyx_v_self->wrapped; __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_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_obj);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 604, __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;

  /* "apischema/serialization/methods.pyx":603
 *         return Fallback_fall_back(self.fallback, obj, path)
 * 
 * cdef inline WrapperMethod_serialize(WrapperMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return self.wrapped(obj)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apischema.serialization.methods.WrapperMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":606
 *         return self.wrapped(obj)
 * 
 * cdef inline ConversionMethod_serialize(ConversionMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.method, self.converter(obj))
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_ConversionMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_ConversionMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ConversionMethod_serialize", 0);
  if (__pyx_optional_args) {
  }

  /* "apischema/serialization/methods.pyx":607
 * 
 * cdef inline ConversionMethod_serialize(ConversionMethod self, object obj, object path = None):
 *         return SerializationMethod_serialize(self.method, self.converter(obj))             # <<<<<<<<<<<<<<
 * 
 * cdef inline DiscriminateTypedDict_serialize(DiscriminateTypedDict self, object obj, object path = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_self->method);
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->converter);
  __pyx_t_3 = __pyx_v_self->converter; __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_obj);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 607, __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;

  /* "apischema/serialization/methods.pyx":606
 *         return self.wrapped(obj)
 * 
 * cdef inline ConversionMethod_serialize(ConversionMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.method, self.converter(obj))
 * 
 */

  /* function exit code */
  __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("apischema.serialization.methods.ConversionMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":609
 *         return SerializationMethod_serialize(self.method, self.converter(obj))
 * 
 * cdef inline DiscriminateTypedDict_serialize(DiscriminateTypedDict self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         try:
 *             method: SerializationMethod = self.mapping[obj[self.field_name]]
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_DiscriminateTypedDict_serialize(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_DiscriminateTypedDict_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *__pyx_v_method = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("DiscriminateTypedDict_serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }

  /* "apischema/serialization/methods.pyx":610
 * 
 * cdef inline DiscriminateTypedDict_serialize(DiscriminateTypedDict self, object obj, object path = None):
 *         try:             # <<<<<<<<<<<<<<
 *             method: SerializationMethod = self.mapping[obj[self.field_name]]
 *         except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "apischema/serialization/methods.pyx":611
 * cdef inline DiscriminateTypedDict_serialize(DiscriminateTypedDict self, object obj, object path = None):
 *         try:
 *             method: SerializationMethod = self.mapping[obj[self.field_name]]             # <<<<<<<<<<<<<<
 *         except Exception:
 *             return Fallback_fall_back(self.fallback, obj, path)
 */
      if (unlikely(__pyx_v_self->mapping == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 611, __pyx_L3_error)
      }
      __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_v_self->field_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 611, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_self->mapping, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 611, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(0, 611, __pyx_L3_error)
      __pyx_v_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "apischema/serialization/methods.pyx":610
 * 
 * cdef inline DiscriminateTypedDict_serialize(DiscriminateTypedDict self, object obj, object path = None):
 *         try:             # <<<<<<<<<<<<<<
 *             method: SerializationMethod = self.mapping[obj[self.field_name]]
 *         except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "apischema/serialization/methods.pyx":612
 *         try:
 *             method: SerializationMethod = self.mapping[obj[self.field_name]]
 *         except Exception:             # <<<<<<<<<<<<<<
 *             return Fallback_fall_back(self.fallback, obj, path)
 *         return SerializationMethod_serialize(method, obj, path)
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_6) {
      __Pyx_AddTraceback("apischema.serialization.methods.DiscriminateTypedDict_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 612, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "apischema/serialization/methods.pyx":613
 *             method: SerializationMethod = self.mapping[obj[self.field_name]]
 *         except Exception:
 *             return Fallback_fall_back(self.fallback, obj, path)             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(method, obj, path)
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = ((PyObject *)__pyx_v_self->fallback);
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_9 = __pyx_f_9apischema_13serialization_7methods_Fallback_fall_back(((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)__pyx_t_8), __pyx_v_obj, __pyx_v_path); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 613, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_r = __pyx_t_9;
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "apischema/serialization/methods.pyx":610
 * 
 * cdef inline DiscriminateTypedDict_serialize(DiscriminateTypedDict self, object obj, object path = None):
 *         try:             # <<<<<<<<<<<<<<
 *             method: SerializationMethod = self.mapping[obj[self.field_name]]
 *         except Exception:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "apischema/serialization/methods.pyx":614
 *         except Exception:
 *             return Fallback_fall_back(self.fallback, obj, path)
 *         return SerializationMethod_serialize(method, obj, path)             # <<<<<<<<<<<<<<
 * 
 * cdef inline NoFallback_fall_back(NoFallback self, object obj, object path):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_10.__pyx_n = 1;
  __pyx_t_10.path = __pyx_v_path;
  __pyx_t_7 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(__pyx_v_method, __pyx_v_obj, &__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "apischema/serialization/methods.pyx":609
 *         return SerializationMethod_serialize(self.method, self.converter(obj))
 * 
 * cdef inline DiscriminateTypedDict_serialize(DiscriminateTypedDict self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *         try:
 *             method: SerializationMethod = self.mapping[obj[self.field_name]]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.DiscriminateTypedDict_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_method);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":616
 *         return SerializationMethod_serialize(method, obj, path)
 * 
 * cdef inline NoFallback_fall_back(NoFallback self, object obj, object path):             # <<<<<<<<<<<<<<
 *         raise TypeCheckError(
 *             f"Expected {self.tp}, found {obj.__class__}",
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_NoFallback_fall_back(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("NoFallback_fall_back", 0);

  /* "apischema/serialization/methods.pyx":617
 * 
 * cdef inline NoFallback_fall_back(NoFallback self, object obj, object path):
 *         raise TypeCheckError(             # <<<<<<<<<<<<<<
 *             f"Expected {self.tp}, found {obj.__class__}",
 *             [path] if path is not None else [],
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_TypeCheckError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apischema/serialization/methods.pyx":618
 * cdef inline NoFallback_fall_back(NoFallback self, object obj, object path):
 *         raise TypeCheckError(
 *             f"Expected {self.tp}, found {obj.__class__}",             # <<<<<<<<<<<<<<
 *             [path] if path is not None else [],
 *         )
 */
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  __pyx_t_5 = 127;
  __Pyx_INCREF(__pyx_kp_u_Expected);
  __pyx_t_4 += 9;
  __Pyx_GIVEREF(__pyx_kp_u_Expected);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Expected);
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_self->tp, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_INCREF(__pyx_kp_u_found);
  __pyx_t_4 += 8;
  __Pyx_GIVEREF(__pyx_kp_u_found);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_found);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5;
  __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apischema/serialization/methods.pyx":619
 *         raise TypeCheckError(
 *             f"Expected {self.tp}, found {obj.__class__}",
 *             [path] if path is not None else [],             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __pyx_t_8 = (__pyx_v_path != Py_None);
  if ((__pyx_t_8 != 0)) {
    __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_path);
    __Pyx_GIVEREF(__pyx_v_path);
    PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v_path);
    __pyx_t_3 = __pyx_t_6;
    __pyx_t_6 = 0;
  } else {
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_t_6 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_3);
    __pyx_t_7 = 0;
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 617, __pyx_L1_error)

  /* "apischema/serialization/methods.pyx":616
 *         return SerializationMethod_serialize(method, obj, path)
 * 
 * cdef inline NoFallback_fall_back(NoFallback self, object obj, object path):             # <<<<<<<<<<<<<<
 *         raise TypeCheckError(
 *             f"Expected {self.tp}, found {obj.__class__}",
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("apischema.serialization.methods.NoFallback_fall_back", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":622
 *         )
 * 
 * cdef inline AnyFallback_fall_back(AnyFallback self, object obj, object key):             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.any_method, obj, key)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_AnyFallback_fall_back(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("AnyFallback_fall_back", 0);

  /* "apischema/serialization/methods.pyx":623
 * 
 * cdef inline AnyFallback_fall_back(AnyFallback self, object obj, object key):
 *         return SerializationMethod_serialize(self.any_method, obj, key)             # <<<<<<<<<<<<<<
 * 
 * cdef inline IdentityField_update_result(IdentityField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_self->any_method);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.path = __pyx_v_key;
  __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1), __pyx_v_obj, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __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;

  /* "apischema/serialization/methods.pyx":622
 *         )
 * 
 * cdef inline AnyFallback_fall_back(AnyFallback self, object obj, object key):             # <<<<<<<<<<<<<<
 *         return SerializationMethod_serialize(self.any_method, obj, key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apischema.serialization.methods.AnyFallback_fall_back", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":625
 *         return SerializationMethod_serialize(self.any_method, obj, key)
 * 
 * cdef inline IdentityField_update_result(IdentityField self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         if serialize_field(self, obj, typed_dict, exclude_unset):
 *             result[self.alias] = get_field_value(self, obj, typed_dict)
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_IdentityField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("IdentityField_update_result", 0);

  /* "apischema/serialization/methods.pyx":626
 * 
 * cdef inline IdentityField_update_result(IdentityField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         if serialize_field(self, obj, typed_dict, exclude_unset):             # <<<<<<<<<<<<<<
 *             result[self.alias] = get_field_value(self, obj, typed_dict)
 * 
 */
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_serialize_field(__pyx_v_self, __pyx_v_obj, __pyx_v_typed_dict, __pyx_v_exclude_unset, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "apischema/serialization/methods.pyx":627
 * cdef inline IdentityField_update_result(IdentityField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         if serialize_field(self, obj, typed_dict, exclude_unset):
 *             result[self.alias] = get_field_value(self, obj, typed_dict)             # <<<<<<<<<<<<<<
 * 
 * cdef inline SimpleField_update_result(SimpleField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 */
    __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_get_field_value(__pyx_v_self, __pyx_v_obj, __pyx_v_typed_dict, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__pyx_v_result == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 627, __pyx_L1_error)
    }
    if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_self->alias, __pyx_t_1) < 0)) __PYX_ERR(0, 627, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apischema/serialization/methods.pyx":626
 * 
 * cdef inline IdentityField_update_result(IdentityField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         if serialize_field(self, obj, typed_dict, exclude_unset):             # <<<<<<<<<<<<<<
 *             result[self.alias] = get_field_value(self, obj, typed_dict)
 * 
 */
  }

  /* "apischema/serialization/methods.pyx":625
 *         return SerializationMethod_serialize(self.any_method, obj, key)
 * 
 * cdef inline IdentityField_update_result(IdentityField self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         if serialize_field(self, obj, typed_dict, exclude_unset):
 *             result[self.alias] = get_field_value(self, obj, typed_dict)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apischema.serialization.methods.IdentityField_update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":629
 *             result[self.alias] = get_field_value(self, obj, typed_dict)
 * 
 * cdef inline SimpleField_update_result(SimpleField self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         if serialize_field(self, obj, typed_dict, exclude_unset):
 *             result[self.alias] = SerializationMethod_serialize(self.method,
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_SimpleField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset) {
  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;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("SimpleField_update_result", 0);

  /* "apischema/serialization/methods.pyx":630
 * 
 * cdef inline SimpleField_update_result(SimpleField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         if serialize_field(self, obj, typed_dict, exclude_unset):             # <<<<<<<<<<<<<<
 *             result[self.alias] = SerializationMethod_serialize(self.method,
 *                 get_field_value(self, obj, typed_dict), self.alias
 */
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_serialize_field(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)__pyx_v_self), __pyx_v_obj, __pyx_v_typed_dict, __pyx_v_exclude_unset, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "apischema/serialization/methods.pyx":631
 * cdef inline SimpleField_update_result(SimpleField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         if serialize_field(self, obj, typed_dict, exclude_unset):
 *             result[self.alias] = SerializationMethod_serialize(self.method,             # <<<<<<<<<<<<<<
 *                 get_field_value(self, obj, typed_dict), self.alias
 *             )
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->method);
    __Pyx_INCREF(__pyx_t_1);

    /* "apischema/serialization/methods.pyx":632
 *         if serialize_field(self, obj, typed_dict, exclude_unset):
 *             result[self.alias] = SerializationMethod_serialize(self.method,
 *                 get_field_value(self, obj, typed_dict), self.alias             # <<<<<<<<<<<<<<
 *             )
 * 
 */
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods_get_field_value(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)__pyx_v_self), __pyx_v_obj, __pyx_v_typed_dict, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __pyx_v_self->__pyx_base.alias;
    __Pyx_INCREF(__pyx_t_4);

    /* "apischema/serialization/methods.pyx":631
 * cdef inline SimpleField_update_result(SimpleField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         if serialize_field(self, obj, typed_dict, exclude_unset):
 *             result[self.alias] = SerializationMethod_serialize(self.method,             # <<<<<<<<<<<<<<
 *                 get_field_value(self, obj, typed_dict), self.alias
 *             )
 */
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.path = __pyx_t_4;
    __pyx_t_5 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1), __pyx_t_3, &__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__pyx_v_result == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 631, __pyx_L1_error)
    }
    if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_self->__pyx_base.alias, __pyx_t_5) < 0)) __PYX_ERR(0, 631, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "apischema/serialization/methods.pyx":630
 * 
 * cdef inline SimpleField_update_result(SimpleField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         if serialize_field(self, obj, typed_dict, exclude_unset):             # <<<<<<<<<<<<<<
 *             result[self.alias] = SerializationMethod_serialize(self.method,
 *                 get_field_value(self, obj, typed_dict), self.alias
 */
  }

  /* "apischema/serialization/methods.pyx":629
 *             result[self.alias] = get_field_value(self, obj, typed_dict)
 * 
 * cdef inline SimpleField_update_result(SimpleField self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         if serialize_field(self, obj, typed_dict, exclude_unset):
 *             result[self.alias] = SerializationMethod_serialize(self.method,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apischema.serialization.methods.SimpleField_update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":635
 *             )
 * 
 * cdef inline ComplexField_update_result(ComplexField self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         if serialize_field(self, obj, typed_dict, exclude_unset):
 *             value: object = get_field_value(self, obj, typed_dict)
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_ComplexField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset) {
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ComplexField_update_result", 0);

  /* "apischema/serialization/methods.pyx":636
 * 
 * cdef inline ComplexField_update_result(ComplexField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         if serialize_field(self, obj, typed_dict, exclude_unset):             # <<<<<<<<<<<<<<
 *             value: object = get_field_value(self, obj, typed_dict)
 *             if not self.skippable or not (
 */
  __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_serialize_field(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)__pyx_v_self), __pyx_v_obj, __pyx_v_typed_dict, __pyx_v_exclude_unset, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 636, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "apischema/serialization/methods.pyx":637
 * cdef inline ComplexField_update_result(ComplexField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         if serialize_field(self, obj, typed_dict, exclude_unset):
 *             value: object = get_field_value(self, obj, typed_dict)             # <<<<<<<<<<<<<<
 *             if not self.skippable or not (
 *                 (self.skip_if is not None and self.skip_if(value))
 */
    __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_get_field_value(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)__pyx_v_self), __pyx_v_obj, __pyx_v_typed_dict, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_value = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apischema/serialization/methods.pyx":638
 *         if serialize_field(self, obj, typed_dict, exclude_unset):
 *             value: object = get_field_value(self, obj, typed_dict)
 *             if not self.skippable or not (             # <<<<<<<<<<<<<<
 *                 (self.skip_if is not None and self.skip_if(value))
 *                 or (self.undefined and value is Undefined)
 */
    __pyx_t_3 = ((!(__pyx_v_self->skippable != 0)) != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_2 = __pyx_t_3;
      goto __pyx_L5_bool_binop_done;
    }

    /* "apischema/serialization/methods.pyx":639
 *             value: object = get_field_value(self, obj, typed_dict)
 *             if not self.skippable or not (
 *                 (self.skip_if is not None and self.skip_if(value))             # <<<<<<<<<<<<<<
 *                 or (self.undefined and value is Undefined)
 *                 or (self.skip_none and value is None)
 */
    __pyx_t_4 = (__pyx_v_self->skip_if != Py_None);
    __pyx_t_5 = (__pyx_t_4 != 0);
    if (!__pyx_t_5) {
      goto __pyx_L8_next_or;
    } else {
    }
    __Pyx_INCREF(__pyx_v_self->skip_if);
    __pyx_t_6 = __pyx_v_self->skip_if; __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_value);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 639, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_L8_next_or:;

    /* "apischema/serialization/methods.pyx":640
 *             if not self.skippable or not (
 *                 (self.skip_if is not None and self.skip_if(value))
 *                 or (self.undefined and value is Undefined)             # <<<<<<<<<<<<<<
 *                 or (self.skip_none and value is None)
 *                 or (self.skip_default and value == self.default_value)
 */
    __pyx_t_5 = (__pyx_v_self->undefined != 0);
    if (!__pyx_t_5) {
      goto __pyx_L10_next_or;
    } else {
    }
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Undefined); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = (__pyx_v_value == __pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = (__pyx_t_5 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_3 = __pyx_t_4;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_L10_next_or:;

    /* "apischema/serialization/methods.pyx":641
 *                 (self.skip_if is not None and self.skip_if(value))
 *                 or (self.undefined and value is Undefined)
 *                 or (self.skip_none and value is None)             # <<<<<<<<<<<<<<
 *                 or (self.skip_default and value == self.default_value)
 *             ):
 */
    __pyx_t_4 = (__pyx_v_self->skip_none != 0);
    if (!__pyx_t_4) {
      goto __pyx_L12_next_or;
    } else {
    }
    __pyx_t_4 = (__pyx_v_value == Py_None);
    __pyx_t_5 = (__pyx_t_4 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_L12_next_or:;

    /* "apischema/serialization/methods.pyx":642
 *                 or (self.undefined and value is Undefined)
 *                 or (self.skip_none and value is None)
 *                 or (self.skip_default and value == self.default_value)             # <<<<<<<<<<<<<<
 *             ):
 *                 if self.alias is not None:
 */
    __pyx_t_5 = (__pyx_v_self->skip_default != 0);
    if (__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, __pyx_v_self->default_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __pyx_t_5;
    __pyx_L7_bool_binop_done:;

    /* "apischema/serialization/methods.pyx":638
 *         if serialize_field(self, obj, typed_dict, exclude_unset):
 *             value: object = get_field_value(self, obj, typed_dict)
 *             if not self.skippable or not (             # <<<<<<<<<<<<<<
 *                 (self.skip_if is not None and self.skip_if(value))
 *                 or (self.undefined and value is Undefined)
 */
    __pyx_t_5 = ((!__pyx_t_3) != 0);
    __pyx_t_2 = __pyx_t_5;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_2) {

      /* "apischema/serialization/methods.pyx":644
 *                 or (self.skip_default and value == self.default_value)
 *             ):
 *                 if self.alias is not None:             # <<<<<<<<<<<<<<
 *                     result[self.alias] = SerializationMethod_serialize(self.method, value, self.alias)
 *                 else:
 */
      __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.alias != ((PyObject*)Py_None));
      __pyx_t_5 = (__pyx_t_2 != 0);
      if (__pyx_t_5) {

        /* "apischema/serialization/methods.pyx":645
 *             ):
 *                 if self.alias is not None:
 *                     result[self.alias] = SerializationMethod_serialize(self.method, value, self.alias)             # <<<<<<<<<<<<<<
 *                 else:
 *                     result.update(SerializationMethod_serialize(self.method, value, self.alias))
 */
        __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.method);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_6 = __pyx_v_self->__pyx_base.__pyx_base.alias;
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_8.__pyx_n = 1;
        __pyx_t_8.path = __pyx_t_6;
        __pyx_t_7 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1), __pyx_v_value, &__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 645, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(__pyx_v_result == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 645, __pyx_L1_error)
        }
        if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_self->__pyx_base.__pyx_base.alias, __pyx_t_7) < 0)) __PYX_ERR(0, 645, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "apischema/serialization/methods.pyx":644
 *                 or (self.skip_default and value == self.default_value)
 *             ):
 *                 if self.alias is not None:             # <<<<<<<<<<<<<<
 *                     result[self.alias] = SerializationMethod_serialize(self.method, value, self.alias)
 *                 else:
 */
        goto __pyx_L15;
      }

      /* "apischema/serialization/methods.pyx":647
 *                     result[self.alias] = SerializationMethod_serialize(self.method, value, self.alias)
 *                 else:
 *                     result.update(SerializationMethod_serialize(self.method, value, self.alias))             # <<<<<<<<<<<<<<
 * 
 * cdef inline SerializedField_update_result(SerializedField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 */
      /*else*/ {
        __pyx_t_7 = ((PyObject *)__pyx_v_self->__pyx_base.method);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_6 = __pyx_v_self->__pyx_base.__pyx_base.alias;
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_8.__pyx_n = 1;
        __pyx_t_8.path = __pyx_t_6;
        __pyx_t_1 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_7), __pyx_v_value, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_L15:;

      /* "apischema/serialization/methods.pyx":638
 *         if serialize_field(self, obj, typed_dict, exclude_unset):
 *             value: object = get_field_value(self, obj, typed_dict)
 *             if not self.skippable or not (             # <<<<<<<<<<<<<<
 *                 (self.skip_if is not None and self.skip_if(value))
 *                 or (self.undefined and value is Undefined)
 */
    }

    /* "apischema/serialization/methods.pyx":636
 * 
 * cdef inline ComplexField_update_result(ComplexField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         if serialize_field(self, obj, typed_dict, exclude_unset):             # <<<<<<<<<<<<<<
 *             value: object = get_field_value(self, obj, typed_dict)
 *             if not self.skippable or not (
 */
  }

  /* "apischema/serialization/methods.pyx":635
 *             )
 * 
 * cdef inline ComplexField_update_result(ComplexField self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         if serialize_field(self, obj, typed_dict, exclude_unset):
 *             value: object = get_field_value(self, obj, typed_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_AddTraceback("apischema.serialization.methods.ComplexField_update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":649
 *                     result.update(SerializationMethod_serialize(self.method, value, self.alias))
 * 
 * cdef inline SerializedField_update_result(SerializedField self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         value = self.func(obj)
 *         if not (self.undefined and value is Undefined) and not (
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_SerializedField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, CYTHON_UNUSED int __pyx_v_typed_dict, CYTHON_UNUSED int __pyx_v_exclude_unset) {
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("SerializedField_update_result", 0);

  /* "apischema/serialization/methods.pyx":650
 * 
 * cdef inline SerializedField_update_result(SerializedField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         value = self.func(obj)             # <<<<<<<<<<<<<<
 *         if not (self.undefined and value is Undefined) and not (
 *             self.skip_none and value is None
 */
  __Pyx_INCREF(__pyx_v_self->func);
  __pyx_t_2 = __pyx_v_self->func; __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_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_obj);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":651
 * cdef inline SerializedField_update_result(SerializedField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         value = self.func(obj)
 *         if not (self.undefined and value is Undefined) and not (             # <<<<<<<<<<<<<<
 *             self.skip_none and value is None
 *         ):
 */
  __pyx_t_6 = (__pyx_v_self->undefined != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L6_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Undefined); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__pyx_v_value == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L6_bool_binop_done:;
  __pyx_t_7 = ((!__pyx_t_5) != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }

  /* "apischema/serialization/methods.pyx":652
 *         value = self.func(obj)
 *         if not (self.undefined and value is Undefined) and not (
 *             self.skip_none and value is None             # <<<<<<<<<<<<<<
 *         ):
 *             result[self.alias] = SerializationMethod_serialize(self.method, value, self.alias)
 */
  __pyx_t_5 = (__pyx_v_self->skip_none != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_7 = __pyx_t_5;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_value == Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_7 = __pyx_t_6;
  __pyx_L8_bool_binop_done:;

  /* "apischema/serialization/methods.pyx":651
 * cdef inline SerializedField_update_result(SerializedField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         value = self.func(obj)
 *         if not (self.undefined and value is Undefined) and not (             # <<<<<<<<<<<<<<
 *             self.skip_none and value is None
 *         ):
 */
  __pyx_t_6 = ((!__pyx_t_7) != 0);
  __pyx_t_4 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "apischema/serialization/methods.pyx":654
 *             self.skip_none and value is None
 *         ):
 *             result[self.alias] = SerializationMethod_serialize(self.method, value, self.alias)             # <<<<<<<<<<<<<<
 * 
 * cdef inline SerializationMethod_serialize(SerializationMethod self, object obj, object path = None):
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->method);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __pyx_v_self->alias;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.path = __pyx_t_2;
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1), __pyx_v_value, &__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 654, __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;
    if (unlikely(__pyx_v_result == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 654, __pyx_L1_error)
    }
    if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_self->alias, __pyx_t_3) < 0)) __PYX_ERR(0, 654, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apischema/serialization/methods.pyx":651
 * cdef inline SerializedField_update_result(SerializedField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *         value = self.func(obj)
 *         if not (self.undefined and value is Undefined) and not (             # <<<<<<<<<<<<<<
 *             self.skip_none and value is None
 *         ):
 */
  }

  /* "apischema/serialization/methods.pyx":649
 *                     result.update(SerializationMethod_serialize(self.method, value, self.alias))
 * 
 * cdef inline SerializedField_update_result(SerializedField self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *         value = self.func(obj)
 *         if not (self.undefined and value is Undefined) and not (
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apischema.serialization.methods.SerializedField_update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":656
 *             result[self.alias] = SerializationMethod_serialize(self.method, value, self.alias)
 * 
 * cdef inline SerializationMethod_serialize(SerializationMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_SerializationMethod_serialize(struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_opt_args_9apischema_13serialization_7methods_SerializationMethod_serialize *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  int __pyx_v__dispatch;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_9apischema_13serialization_7methods_IdentityMethod_serialize __pyx_t_3;
  struct __pyx_opt_args_9apischema_13serialization_7methods_ListMethod_serialize __pyx_t_4;
  struct __pyx_opt_args_9apischema_13serialization_7methods_DictMethod_serialize __pyx_t_5;
  struct __pyx_opt_args_9apischema_13serialization_7methods_StrMethod_serialize __pyx_t_6;
  struct __pyx_opt_args_9apischema_13serialization_7methods_IntMethod_serialize __pyx_t_7;
  struct __pyx_opt_args_9apischema_13serialization_7methods_BoolMethod_serialize __pyx_t_8;
  struct __pyx_opt_args_9apischema_13serialization_7methods_FloatMethod_serialize __pyx_t_9;
  struct __pyx_opt_args_9apischema_13serialization_7methods_NoneMethod_serialize __pyx_t_10;
  struct __pyx_opt_args_9apischema_13serialization_7methods_RecMethod_serialize __pyx_t_11;
  struct __pyx_opt_args_9apischema_13serialization_7methods_AnyMethod_serialize __pyx_t_12;
  struct __pyx_opt_args_9apischema_13serialization_7methods_TypeCheckIdentityMethod_serialize __pyx_t_13;
  struct __pyx_opt_args_9apischema_13serialization_7methods_TypeCheckMethod_serialize __pyx_t_14;
  struct __pyx_opt_args_9apischema_13serialization_7methods_CollectionCheckOnlyMethod_serialize __pyx_t_15;
  struct __pyx_opt_args_9apischema_13serialization_7methods_CollectionMethod_serialize __pyx_t_16;
  struct __pyx_opt_args_9apischema_13serialization_7methods_ValueMethod_serialize __pyx_t_17;
  struct __pyx_opt_args_9apischema_13serialization_7methods_EnumMethod_serialize __pyx_t_18;
  struct __pyx_opt_args_9apischema_13serialization_7methods_MappingCheckOnlyMethod_serialize __pyx_t_19;
  struct __pyx_opt_args_9apischema_13serialization_7methods_MappingMethod_serialize __pyx_t_20;
  struct __pyx_opt_args_9apischema_13serialization_7methods_ClassMethod_serialize __pyx_t_21;
  struct __pyx_opt_args_9apischema_13serialization_7methods_ClassWithFieldsSetMethod_serialize __pyx_t_22;
  struct __pyx_opt_args_9apischema_13serialization_7methods_TypedDictMethod_serialize __pyx_t_23;
  struct __pyx_opt_args_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod_serialize __pyx_t_24;
  struct __pyx_opt_args_9apischema_13serialization_7methods_TupleCheckOnlyMethod_serialize __pyx_t_25;
  struct __pyx_opt_args_9apischema_13serialization_7methods_TupleMethod_serialize __pyx_t_26;
  struct __pyx_opt_args_9apischema_13serialization_7methods_CheckedTupleMethod_serialize __pyx_t_27;
  struct __pyx_opt_args_9apischema_13serialization_7methods_OptionalMethod_serialize __pyx_t_28;
  struct __pyx_opt_args_9apischema_13serialization_7methods_UnionAlternative_serialize __pyx_t_29;
  struct __pyx_opt_args_9apischema_13serialization_7methods_DiscriminatedAlternative_serialize __pyx_t_30;
  struct __pyx_opt_args_9apischema_13serialization_7methods_UnionMethod_serialize __pyx_t_31;
  struct __pyx_opt_args_9apischema_13serialization_7methods_WrapperMethod_serialize __pyx_t_32;
  struct __pyx_opt_args_9apischema_13serialization_7methods_ConversionMethod_serialize __pyx_t_33;
  struct __pyx_opt_args_9apischema_13serialization_7methods_DiscriminateTypedDict_serialize __pyx_t_34;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("SerializationMethod_serialize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
    }
  }

  /* "apischema/serialization/methods.pyx":657
 * 
 * cdef inline SerializationMethod_serialize(SerializationMethod self, object obj, object path = None):
 *     cdef int _dispatch = self._dispatch             # <<<<<<<<<<<<<<
 *     if _dispatch == 0:
 *         return IdentityMethod_serialize(<IdentityMethod>self, obj, path)
 */
  __pyx_t_1 = __pyx_v_self->_dispatch;
  __pyx_v__dispatch = __pyx_t_1;

  /* "apischema/serialization/methods.pyx":658
 * cdef inline SerializationMethod_serialize(SerializationMethod self, object obj, object path = None):
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:             # <<<<<<<<<<<<<<
 *         return IdentityMethod_serialize(<IdentityMethod>self, obj, path)
 *     elif _dispatch == 1:
 */
  switch (__pyx_v__dispatch) {
    case 0:

    /* "apischema/serialization/methods.pyx":659
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:
 *         return IdentityMethod_serialize(<IdentityMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 1:
 *         return ListMethod_serialize(<ListMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_IdentityMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":658
 * cdef inline SerializationMethod_serialize(SerializationMethod self, object obj, object path = None):
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:             # <<<<<<<<<<<<<<
 *         return IdentityMethod_serialize(<IdentityMethod>self, obj, path)
 *     elif _dispatch == 1:
 */
    break;
    case 1:

    /* "apischema/serialization/methods.pyx":661
 *         return IdentityMethod_serialize(<IdentityMethod>self, obj, path)
 *     elif _dispatch == 1:
 *         return ListMethod_serialize(<ListMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 2:
 *         return DictMethod_serialize(<DictMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_ListMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":660
 *     if _dispatch == 0:
 *         return IdentityMethod_serialize(<IdentityMethod>self, obj, path)
 *     elif _dispatch == 1:             # <<<<<<<<<<<<<<
 *         return ListMethod_serialize(<ListMethod>self, obj, path)
 *     elif _dispatch == 2:
 */
    break;
    case 2:

    /* "apischema/serialization/methods.pyx":663
 *         return ListMethod_serialize(<ListMethod>self, obj, path)
 *     elif _dispatch == 2:
 *         return DictMethod_serialize(<DictMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 3:
 *         return StrMethod_serialize(<StrMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_DictMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":662
 *     elif _dispatch == 1:
 *         return ListMethod_serialize(<ListMethod>self, obj, path)
 *     elif _dispatch == 2:             # <<<<<<<<<<<<<<
 *         return DictMethod_serialize(<DictMethod>self, obj, path)
 *     elif _dispatch == 3:
 */
    break;
    case 3:

    /* "apischema/serialization/methods.pyx":665
 *         return DictMethod_serialize(<DictMethod>self, obj, path)
 *     elif _dispatch == 3:
 *         return StrMethod_serialize(<StrMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 4:
 *         return IntMethod_serialize(<IntMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_StrMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":664
 *     elif _dispatch == 2:
 *         return DictMethod_serialize(<DictMethod>self, obj, path)
 *     elif _dispatch == 3:             # <<<<<<<<<<<<<<
 *         return StrMethod_serialize(<StrMethod>self, obj, path)
 *     elif _dispatch == 4:
 */
    break;
    case 4:

    /* "apischema/serialization/methods.pyx":667
 *         return StrMethod_serialize(<StrMethod>self, obj, path)
 *     elif _dispatch == 4:
 *         return IntMethod_serialize(<IntMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 5:
 *         return BoolMethod_serialize(<BoolMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7.__pyx_n = 1;
    __pyx_t_7.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_IntMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":666
 *     elif _dispatch == 3:
 *         return StrMethod_serialize(<StrMethod>self, obj, path)
 *     elif _dispatch == 4:             # <<<<<<<<<<<<<<
 *         return IntMethod_serialize(<IntMethod>self, obj, path)
 *     elif _dispatch == 5:
 */
    break;
    case 5:

    /* "apischema/serialization/methods.pyx":669
 *         return IntMethod_serialize(<IntMethod>self, obj, path)
 *     elif _dispatch == 5:
 *         return BoolMethod_serialize(<BoolMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 6:
 *         return FloatMethod_serialize(<FloatMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_BoolMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":668
 *     elif _dispatch == 4:
 *         return IntMethod_serialize(<IntMethod>self, obj, path)
 *     elif _dispatch == 5:             # <<<<<<<<<<<<<<
 *         return BoolMethod_serialize(<BoolMethod>self, obj, path)
 *     elif _dispatch == 6:
 */
    break;
    case 6:

    /* "apischema/serialization/methods.pyx":671
 *         return BoolMethod_serialize(<BoolMethod>self, obj, path)
 *     elif _dispatch == 6:
 *         return FloatMethod_serialize(<FloatMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 7:
 *         return NoneMethod_serialize(<NoneMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_FloatMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":670
 *     elif _dispatch == 5:
 *         return BoolMethod_serialize(<BoolMethod>self, obj, path)
 *     elif _dispatch == 6:             # <<<<<<<<<<<<<<
 *         return FloatMethod_serialize(<FloatMethod>self, obj, path)
 *     elif _dispatch == 7:
 */
    break;
    case 7:

    /* "apischema/serialization/methods.pyx":673
 *         return FloatMethod_serialize(<FloatMethod>self, obj, path)
 *     elif _dispatch == 7:
 *         return NoneMethod_serialize(<NoneMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 8:
 *         return RecMethod_serialize(<RecMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10.__pyx_n = 1;
    __pyx_t_10.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_NoneMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":672
 *     elif _dispatch == 6:
 *         return FloatMethod_serialize(<FloatMethod>self, obj, path)
 *     elif _dispatch == 7:             # <<<<<<<<<<<<<<
 *         return NoneMethod_serialize(<NoneMethod>self, obj, path)
 *     elif _dispatch == 8:
 */
    break;
    case 8:

    /* "apischema/serialization/methods.pyx":675
 *         return NoneMethod_serialize(<NoneMethod>self, obj, path)
 *     elif _dispatch == 8:
 *         return RecMethod_serialize(<RecMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 9:
 *         return AnyMethod_serialize(<AnyMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_RecMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":674
 *     elif _dispatch == 7:
 *         return NoneMethod_serialize(<NoneMethod>self, obj, path)
 *     elif _dispatch == 8:             # <<<<<<<<<<<<<<
 *         return RecMethod_serialize(<RecMethod>self, obj, path)
 *     elif _dispatch == 9:
 */
    break;
    case 9:

    /* "apischema/serialization/methods.pyx":677
 *         return RecMethod_serialize(<RecMethod>self, obj, path)
 *     elif _dispatch == 9:
 *         return AnyMethod_serialize(<AnyMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 10:
 *         return TypeCheckIdentityMethod_serialize(<TypeCheckIdentityMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_AnyMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":676
 *     elif _dispatch == 8:
 *         return RecMethod_serialize(<RecMethod>self, obj, path)
 *     elif _dispatch == 9:             # <<<<<<<<<<<<<<
 *         return AnyMethod_serialize(<AnyMethod>self, obj, path)
 *     elif _dispatch == 10:
 */
    break;
    case 10:

    /* "apischema/serialization/methods.pyx":679
 *         return AnyMethod_serialize(<AnyMethod>self, obj, path)
 *     elif _dispatch == 10:
 *         return TypeCheckIdentityMethod_serialize(<TypeCheckIdentityMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 11:
 *         return TypeCheckMethod_serialize(<TypeCheckMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_TypeCheckIdentityMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":678
 *     elif _dispatch == 9:
 *         return AnyMethod_serialize(<AnyMethod>self, obj, path)
 *     elif _dispatch == 10:             # <<<<<<<<<<<<<<
 *         return TypeCheckIdentityMethod_serialize(<TypeCheckIdentityMethod>self, obj, path)
 *     elif _dispatch == 11:
 */
    break;
    case 11:

    /* "apischema/serialization/methods.pyx":681
 *         return TypeCheckIdentityMethod_serialize(<TypeCheckIdentityMethod>self, obj, path)
 *     elif _dispatch == 11:
 *         return TypeCheckMethod_serialize(<TypeCheckMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 12:
 *         return CollectionCheckOnlyMethod_serialize(<CollectionCheckOnlyMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_14.__pyx_n = 1;
    __pyx_t_14.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_TypeCheckMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":680
 *     elif _dispatch == 10:
 *         return TypeCheckIdentityMethod_serialize(<TypeCheckIdentityMethod>self, obj, path)
 *     elif _dispatch == 11:             # <<<<<<<<<<<<<<
 *         return TypeCheckMethod_serialize(<TypeCheckMethod>self, obj, path)
 *     elif _dispatch == 12:
 */
    break;
    case 12:

    /* "apischema/serialization/methods.pyx":683
 *         return TypeCheckMethod_serialize(<TypeCheckMethod>self, obj, path)
 *     elif _dispatch == 12:
 *         return CollectionCheckOnlyMethod_serialize(<CollectionCheckOnlyMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 13:
 *         return CollectionMethod_serialize(<CollectionMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_15.__pyx_n = 1;
    __pyx_t_15.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_CollectionCheckOnlyMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":682
 *     elif _dispatch == 11:
 *         return TypeCheckMethod_serialize(<TypeCheckMethod>self, obj, path)
 *     elif _dispatch == 12:             # <<<<<<<<<<<<<<
 *         return CollectionCheckOnlyMethod_serialize(<CollectionCheckOnlyMethod>self, obj, path)
 *     elif _dispatch == 13:
 */
    break;
    case 13:

    /* "apischema/serialization/methods.pyx":685
 *         return CollectionCheckOnlyMethod_serialize(<CollectionCheckOnlyMethod>self, obj, path)
 *     elif _dispatch == 13:
 *         return CollectionMethod_serialize(<CollectionMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 14:
 *         return ValueMethod_serialize(<ValueMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_16.__pyx_n = 1;
    __pyx_t_16.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_CollectionMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 685, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":684
 *     elif _dispatch == 12:
 *         return CollectionCheckOnlyMethod_serialize(<CollectionCheckOnlyMethod>self, obj, path)
 *     elif _dispatch == 13:             # <<<<<<<<<<<<<<
 *         return CollectionMethod_serialize(<CollectionMethod>self, obj, path)
 *     elif _dispatch == 14:
 */
    break;
    case 14:

    /* "apischema/serialization/methods.pyx":687
 *         return CollectionMethod_serialize(<CollectionMethod>self, obj, path)
 *     elif _dispatch == 14:
 *         return ValueMethod_serialize(<ValueMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 15:
 *         return EnumMethod_serialize(<EnumMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_17.__pyx_n = 1;
    __pyx_t_17.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_ValueMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_17); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":686
 *     elif _dispatch == 13:
 *         return CollectionMethod_serialize(<CollectionMethod>self, obj, path)
 *     elif _dispatch == 14:             # <<<<<<<<<<<<<<
 *         return ValueMethod_serialize(<ValueMethod>self, obj, path)
 *     elif _dispatch == 15:
 */
    break;
    case 15:

    /* "apischema/serialization/methods.pyx":689
 *         return ValueMethod_serialize(<ValueMethod>self, obj, path)
 *     elif _dispatch == 15:
 *         return EnumMethod_serialize(<EnumMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 16:
 *         return MappingCheckOnlyMethod_serialize(<MappingCheckOnlyMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_18.__pyx_n = 1;
    __pyx_t_18.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_EnumMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_18); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":688
 *     elif _dispatch == 14:
 *         return ValueMethod_serialize(<ValueMethod>self, obj, path)
 *     elif _dispatch == 15:             # <<<<<<<<<<<<<<
 *         return EnumMethod_serialize(<EnumMethod>self, obj, path)
 *     elif _dispatch == 16:
 */
    break;
    case 16:

    /* "apischema/serialization/methods.pyx":691
 *         return EnumMethod_serialize(<EnumMethod>self, obj, path)
 *     elif _dispatch == 16:
 *         return MappingCheckOnlyMethod_serialize(<MappingCheckOnlyMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 17:
 *         return MappingMethod_serialize(<MappingMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_19.__pyx_n = 1;
    __pyx_t_19.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_MappingCheckOnlyMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":690
 *     elif _dispatch == 15:
 *         return EnumMethod_serialize(<EnumMethod>self, obj, path)
 *     elif _dispatch == 16:             # <<<<<<<<<<<<<<
 *         return MappingCheckOnlyMethod_serialize(<MappingCheckOnlyMethod>self, obj, path)
 *     elif _dispatch == 17:
 */
    break;
    case 17:

    /* "apischema/serialization/methods.pyx":693
 *         return MappingCheckOnlyMethod_serialize(<MappingCheckOnlyMethod>self, obj, path)
 *     elif _dispatch == 17:
 *         return MappingMethod_serialize(<MappingMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 19:
 *         return ClassMethod_serialize(<ClassMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_20.__pyx_n = 1;
    __pyx_t_20.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_MappingMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_20); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":692
 *     elif _dispatch == 16:
 *         return MappingCheckOnlyMethod_serialize(<MappingCheckOnlyMethod>self, obj, path)
 *     elif _dispatch == 17:             # <<<<<<<<<<<<<<
 *         return MappingMethod_serialize(<MappingMethod>self, obj, path)
 *     elif _dispatch == 19:
 */
    break;
    case 19:

    /* "apischema/serialization/methods.pyx":695
 *         return MappingMethod_serialize(<MappingMethod>self, obj, path)
 *     elif _dispatch == 19:
 *         return ClassMethod_serialize(<ClassMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 20:
 *         return ClassWithFieldsSetMethod_serialize(<ClassWithFieldsSetMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_21.__pyx_n = 1;
    __pyx_t_21.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_ClassMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_21); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":694
 *     elif _dispatch == 17:
 *         return MappingMethod_serialize(<MappingMethod>self, obj, path)
 *     elif _dispatch == 19:             # <<<<<<<<<<<<<<
 *         return ClassMethod_serialize(<ClassMethod>self, obj, path)
 *     elif _dispatch == 20:
 */
    break;
    case 20:

    /* "apischema/serialization/methods.pyx":697
 *         return ClassMethod_serialize(<ClassMethod>self, obj, path)
 *     elif _dispatch == 20:
 *         return ClassWithFieldsSetMethod_serialize(<ClassWithFieldsSetMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 21:
 *         return TypedDictMethod_serialize(<TypedDictMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_22.__pyx_n = 1;
    __pyx_t_22.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_ClassWithFieldsSetMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_22); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":696
 *     elif _dispatch == 19:
 *         return ClassMethod_serialize(<ClassMethod>self, obj, path)
 *     elif _dispatch == 20:             # <<<<<<<<<<<<<<
 *         return ClassWithFieldsSetMethod_serialize(<ClassWithFieldsSetMethod>self, obj, path)
 *     elif _dispatch == 21:
 */
    break;
    case 21:

    /* "apischema/serialization/methods.pyx":699
 *         return ClassWithFieldsSetMethod_serialize(<ClassWithFieldsSetMethod>self, obj, path)
 *     elif _dispatch == 21:
 *         return TypedDictMethod_serialize(<TypedDictMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 22:
 *         return TypedDictWithAdditionalMethod_serialize(<TypedDictWithAdditionalMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_23.__pyx_n = 1;
    __pyx_t_23.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_TypedDictMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_23); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":698
 *     elif _dispatch == 20:
 *         return ClassWithFieldsSetMethod_serialize(<ClassWithFieldsSetMethod>self, obj, path)
 *     elif _dispatch == 21:             # <<<<<<<<<<<<<<
 *         return TypedDictMethod_serialize(<TypedDictMethod>self, obj, path)
 *     elif _dispatch == 22:
 */
    break;
    case 22:

    /* "apischema/serialization/methods.pyx":701
 *         return TypedDictMethod_serialize(<TypedDictMethod>self, obj, path)
 *     elif _dispatch == 22:
 *         return TypedDictWithAdditionalMethod_serialize(<TypedDictWithAdditionalMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 23:
 *         return TupleCheckOnlyMethod_serialize(<TupleCheckOnlyMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_24.__pyx_n = 1;
    __pyx_t_24.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_24); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":700
 *     elif _dispatch == 21:
 *         return TypedDictMethod_serialize(<TypedDictMethod>self, obj, path)
 *     elif _dispatch == 22:             # <<<<<<<<<<<<<<
 *         return TypedDictWithAdditionalMethod_serialize(<TypedDictWithAdditionalMethod>self, obj, path)
 *     elif _dispatch == 23:
 */
    break;
    case 23:

    /* "apischema/serialization/methods.pyx":703
 *         return TypedDictWithAdditionalMethod_serialize(<TypedDictWithAdditionalMethod>self, obj, path)
 *     elif _dispatch == 23:
 *         return TupleCheckOnlyMethod_serialize(<TupleCheckOnlyMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 24:
 *         return TupleMethod_serialize(<TupleMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    if (!(likely(PyTuple_CheckExact(__pyx_v_obj))||((__pyx_v_obj) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_obj)->tp_name), 0))) __PYX_ERR(0, 703, __pyx_L1_error)
    __pyx_t_25.__pyx_n = 1;
    __pyx_t_25.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_TupleCheckOnlyMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *)__pyx_v_self), ((PyObject*)__pyx_v_obj), &__pyx_t_25); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":702
 *     elif _dispatch == 22:
 *         return TypedDictWithAdditionalMethod_serialize(<TypedDictWithAdditionalMethod>self, obj, path)
 *     elif _dispatch == 23:             # <<<<<<<<<<<<<<
 *         return TupleCheckOnlyMethod_serialize(<TupleCheckOnlyMethod>self, obj, path)
 *     elif _dispatch == 24:
 */
    break;
    case 24:

    /* "apischema/serialization/methods.pyx":705
 *         return TupleCheckOnlyMethod_serialize(<TupleCheckOnlyMethod>self, obj, path)
 *     elif _dispatch == 24:
 *         return TupleMethod_serialize(<TupleMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 25:
 *         return CheckedTupleMethod_serialize(<CheckedTupleMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    if (!(likely(PyTuple_CheckExact(__pyx_v_obj))||((__pyx_v_obj) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_obj)->tp_name), 0))) __PYX_ERR(0, 705, __pyx_L1_error)
    __pyx_t_26.__pyx_n = 1;
    __pyx_t_26.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_TupleMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *)__pyx_v_self), ((PyObject*)__pyx_v_obj), &__pyx_t_26); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":704
 *     elif _dispatch == 23:
 *         return TupleCheckOnlyMethod_serialize(<TupleCheckOnlyMethod>self, obj, path)
 *     elif _dispatch == 24:             # <<<<<<<<<<<<<<
 *         return TupleMethod_serialize(<TupleMethod>self, obj, path)
 *     elif _dispatch == 25:
 */
    break;
    case 25:

    /* "apischema/serialization/methods.pyx":707
 *         return TupleMethod_serialize(<TupleMethod>self, obj, path)
 *     elif _dispatch == 25:
 *         return CheckedTupleMethod_serialize(<CheckedTupleMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 26:
 *         return OptionalMethod_serialize(<OptionalMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    if (!(likely(PyTuple_CheckExact(__pyx_v_obj))||((__pyx_v_obj) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_obj)->tp_name), 0))) __PYX_ERR(0, 707, __pyx_L1_error)
    __pyx_t_27.__pyx_n = 1;
    __pyx_t_27.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_CheckedTupleMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *)__pyx_v_self), ((PyObject*)__pyx_v_obj), &__pyx_t_27); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":706
 *     elif _dispatch == 24:
 *         return TupleMethod_serialize(<TupleMethod>self, obj, path)
 *     elif _dispatch == 25:             # <<<<<<<<<<<<<<
 *         return CheckedTupleMethod_serialize(<CheckedTupleMethod>self, obj, path)
 *     elif _dispatch == 26:
 */
    break;
    case 26:

    /* "apischema/serialization/methods.pyx":709
 *         return CheckedTupleMethod_serialize(<CheckedTupleMethod>self, obj, path)
 *     elif _dispatch == 26:
 *         return OptionalMethod_serialize(<OptionalMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 27:
 *         return UnionAlternative_serialize(<UnionAlternative>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_28.__pyx_n = 1;
    __pyx_t_28.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_OptionalMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_28); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":708
 *     elif _dispatch == 25:
 *         return CheckedTupleMethod_serialize(<CheckedTupleMethod>self, obj, path)
 *     elif _dispatch == 26:             # <<<<<<<<<<<<<<
 *         return OptionalMethod_serialize(<OptionalMethod>self, obj, path)
 *     elif _dispatch == 27:
 */
    break;
    case 27:

    /* "apischema/serialization/methods.pyx":711
 *         return OptionalMethod_serialize(<OptionalMethod>self, obj, path)
 *     elif _dispatch == 27:
 *         return UnionAlternative_serialize(<UnionAlternative>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 28:
 *         return DiscriminatedAlternative_serialize(<DiscriminatedAlternative>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_29.__pyx_n = 1;
    __pyx_t_29.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_UnionAlternative_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *)__pyx_v_self), __pyx_v_obj, &__pyx_t_29); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":710
 *     elif _dispatch == 26:
 *         return OptionalMethod_serialize(<OptionalMethod>self, obj, path)
 *     elif _dispatch == 27:             # <<<<<<<<<<<<<<
 *         return UnionAlternative_serialize(<UnionAlternative>self, obj, path)
 *     elif _dispatch == 28:
 */
    break;
    case 28:

    /* "apischema/serialization/methods.pyx":713
 *         return UnionAlternative_serialize(<UnionAlternative>self, obj, path)
 *     elif _dispatch == 28:
 *         return DiscriminatedAlternative_serialize(<DiscriminatedAlternative>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 29:
 *         return UnionMethod_serialize(<UnionMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_30.__pyx_n = 1;
    __pyx_t_30.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_DiscriminatedAlternative_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *)__pyx_v_self), __pyx_v_obj, &__pyx_t_30); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":712
 *     elif _dispatch == 27:
 *         return UnionAlternative_serialize(<UnionAlternative>self, obj, path)
 *     elif _dispatch == 28:             # <<<<<<<<<<<<<<
 *         return DiscriminatedAlternative_serialize(<DiscriminatedAlternative>self, obj, path)
 *     elif _dispatch == 29:
 */
    break;
    case 29:

    /* "apischema/serialization/methods.pyx":715
 *         return DiscriminatedAlternative_serialize(<DiscriminatedAlternative>self, obj, path)
 *     elif _dispatch == 29:
 *         return UnionMethod_serialize(<UnionMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 30:
 *         return WrapperMethod_serialize(<WrapperMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_31.__pyx_n = 1;
    __pyx_t_31.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_UnionMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_31); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":714
 *     elif _dispatch == 28:
 *         return DiscriminatedAlternative_serialize(<DiscriminatedAlternative>self, obj, path)
 *     elif _dispatch == 29:             # <<<<<<<<<<<<<<
 *         return UnionMethod_serialize(<UnionMethod>self, obj, path)
 *     elif _dispatch == 30:
 */
    break;
    case 30:

    /* "apischema/serialization/methods.pyx":717
 *         return UnionMethod_serialize(<UnionMethod>self, obj, path)
 *     elif _dispatch == 30:
 *         return WrapperMethod_serialize(<WrapperMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 31:
 *         return ConversionMethod_serialize(<ConversionMethod>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_32.__pyx_n = 1;
    __pyx_t_32.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_WrapperMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":716
 *     elif _dispatch == 29:
 *         return UnionMethod_serialize(<UnionMethod>self, obj, path)
 *     elif _dispatch == 30:             # <<<<<<<<<<<<<<
 *         return WrapperMethod_serialize(<WrapperMethod>self, obj, path)
 *     elif _dispatch == 31:
 */
    break;
    case 31:

    /* "apischema/serialization/methods.pyx":719
 *         return WrapperMethod_serialize(<WrapperMethod>self, obj, path)
 *     elif _dispatch == 31:
 *         return ConversionMethod_serialize(<ConversionMethod>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 32:
 *         return DiscriminateTypedDict_serialize(<DiscriminateTypedDict>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_33.__pyx_n = 1;
    __pyx_t_33.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_ConversionMethod_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *)__pyx_v_self), __pyx_v_obj, &__pyx_t_33); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":718
 *     elif _dispatch == 30:
 *         return WrapperMethod_serialize(<WrapperMethod>self, obj, path)
 *     elif _dispatch == 31:             # <<<<<<<<<<<<<<
 *         return ConversionMethod_serialize(<ConversionMethod>self, obj, path)
 *     elif _dispatch == 32:
 */
    break;
    case 32:

    /* "apischema/serialization/methods.pyx":721
 *         return ConversionMethod_serialize(<ConversionMethod>self, obj, path)
 *     elif _dispatch == 32:
 *         return DiscriminateTypedDict_serialize(<DiscriminateTypedDict>self, obj, path)             # <<<<<<<<<<<<<<
 * 
 * cdef inline Fallback_fall_back(Fallback self, object obj, object path):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_34.__pyx_n = 1;
    __pyx_t_34.path = __pyx_v_path;
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_DiscriminateTypedDict_serialize(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *)__pyx_v_self), __pyx_v_obj, &__pyx_t_34); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":720
 *     elif _dispatch == 31:
 *         return ConversionMethod_serialize(<ConversionMethod>self, obj, path)
 *     elif _dispatch == 32:             # <<<<<<<<<<<<<<
 *         return DiscriminateTypedDict_serialize(<DiscriminateTypedDict>self, obj, path)
 * 
 */
    break;
    default: break;
  }

  /* "apischema/serialization/methods.pyx":656
 *             result[self.alias] = SerializationMethod_serialize(self.method, value, self.alias)
 * 
 * cdef inline SerializationMethod_serialize(SerializationMethod self, object obj, object path = None):             # <<<<<<<<<<<<<<
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apischema.serialization.methods.SerializationMethod_serialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":723
 *         return DiscriminateTypedDict_serialize(<DiscriminateTypedDict>self, obj, path)
 * 
 * cdef inline Fallback_fall_back(Fallback self, object obj, object path):             # <<<<<<<<<<<<<<
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_Fallback_fall_back(struct __pyx_obj_9apischema_13serialization_7methods_Fallback *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_path) {
  int __pyx_v__dispatch;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Fallback_fall_back", 0);

  /* "apischema/serialization/methods.pyx":724
 * 
 * cdef inline Fallback_fall_back(Fallback self, object obj, object path):
 *     cdef int _dispatch = self._dispatch             # <<<<<<<<<<<<<<
 *     if _dispatch == 0:
 *         return NoFallback_fall_back(<NoFallback>self, obj, path)
 */
  __pyx_t_1 = __pyx_v_self->_dispatch;
  __pyx_v__dispatch = __pyx_t_1;

  /* "apischema/serialization/methods.pyx":725
 * cdef inline Fallback_fall_back(Fallback self, object obj, object path):
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:             # <<<<<<<<<<<<<<
 *         return NoFallback_fall_back(<NoFallback>self, obj, path)
 *     elif _dispatch == 1:
 */
  switch (__pyx_v__dispatch) {
    case 0:

    /* "apischema/serialization/methods.pyx":726
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:
 *         return NoFallback_fall_back(<NoFallback>self, obj, path)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 1:
 *         return AnyFallback_fall_back(<AnyFallback>self, obj, path)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_NoFallback_fall_back(((struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *)__pyx_v_self), __pyx_v_obj, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":725
 * cdef inline Fallback_fall_back(Fallback self, object obj, object path):
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:             # <<<<<<<<<<<<<<
 *         return NoFallback_fall_back(<NoFallback>self, obj, path)
 *     elif _dispatch == 1:
 */
    break;
    case 1:

    /* "apischema/serialization/methods.pyx":728
 *         return NoFallback_fall_back(<NoFallback>self, obj, path)
 *     elif _dispatch == 1:
 *         return AnyFallback_fall_back(<AnyFallback>self, obj, path)             # <<<<<<<<<<<<<<
 * 
 * cdef inline BaseField_update_result(BaseField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_AnyFallback_fall_back(((struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *)__pyx_v_self), __pyx_v_obj, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":727
 *     if _dispatch == 0:
 *         return NoFallback_fall_back(<NoFallback>self, obj, path)
 *     elif _dispatch == 1:             # <<<<<<<<<<<<<<
 *         return AnyFallback_fall_back(<AnyFallback>self, obj, path)
 * 
 */
    break;
    default: break;
  }

  /* "apischema/serialization/methods.pyx":723
 *         return DiscriminateTypedDict_serialize(<DiscriminateTypedDict>self, obj, path)
 * 
 * cdef inline Fallback_fall_back(Fallback self, object obj, object path):             # <<<<<<<<<<<<<<
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apischema.serialization.methods.Fallback_fall_back", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apischema/serialization/methods.pyx":730
 *         return AnyFallback_fall_back(<AnyFallback>self, obj, path)
 * 
 * cdef inline BaseField_update_result(BaseField self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:
 */

static CYTHON_INLINE PyObject *__pyx_f_9apischema_13serialization_7methods_BaseField_update_result(struct __pyx_obj_9apischema_13serialization_7methods_BaseField *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_result, int __pyx_v_typed_dict, int __pyx_v_exclude_unset) {
  int __pyx_v__dispatch;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("BaseField_update_result", 0);

  /* "apischema/serialization/methods.pyx":731
 * 
 * cdef inline BaseField_update_result(BaseField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *     cdef int _dispatch = self._dispatch             # <<<<<<<<<<<<<<
 *     if _dispatch == 0:
 *         return IdentityField_update_result(<IdentityField>self, obj, result, typed_dict, exclude_unset)
 */
  __pyx_t_1 = __pyx_v_self->_dispatch;
  __pyx_v__dispatch = __pyx_t_1;

  /* "apischema/serialization/methods.pyx":732
 * cdef inline BaseField_update_result(BaseField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:             # <<<<<<<<<<<<<<
 *         return IdentityField_update_result(<IdentityField>self, obj, result, typed_dict, exclude_unset)
 *     elif _dispatch == 1:
 */
  switch (__pyx_v__dispatch) {
    case 0:

    /* "apischema/serialization/methods.pyx":733
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:
 *         return IdentityField_update_result(<IdentityField>self, obj, result, typed_dict, exclude_unset)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 1:
 *         return SimpleField_update_result(<SimpleField>self, obj, result, typed_dict, exclude_unset)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_IdentityField_update_result(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)__pyx_v_self), __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":732
 * cdef inline BaseField_update_result(BaseField self, object obj, dict result, bint typed_dict, bint exclude_unset):
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:             # <<<<<<<<<<<<<<
 *         return IdentityField_update_result(<IdentityField>self, obj, result, typed_dict, exclude_unset)
 *     elif _dispatch == 1:
 */
    break;
    case 1:

    /* "apischema/serialization/methods.pyx":735
 *         return IdentityField_update_result(<IdentityField>self, obj, result, typed_dict, exclude_unset)
 *     elif _dispatch == 1:
 *         return SimpleField_update_result(<SimpleField>self, obj, result, typed_dict, exclude_unset)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 2:
 *         return ComplexField_update_result(<ComplexField>self, obj, result, typed_dict, exclude_unset)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_SimpleField_update_result(((struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *)__pyx_v_self), __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":734
 *     if _dispatch == 0:
 *         return IdentityField_update_result(<IdentityField>self, obj, result, typed_dict, exclude_unset)
 *     elif _dispatch == 1:             # <<<<<<<<<<<<<<
 *         return SimpleField_update_result(<SimpleField>self, obj, result, typed_dict, exclude_unset)
 *     elif _dispatch == 2:
 */
    break;
    case 2:

    /* "apischema/serialization/methods.pyx":737
 *         return SimpleField_update_result(<SimpleField>self, obj, result, typed_dict, exclude_unset)
 *     elif _dispatch == 2:
 *         return ComplexField_update_result(<ComplexField>self, obj, result, typed_dict, exclude_unset)             # <<<<<<<<<<<<<<
 *     elif _dispatch == 3:
 *         return SerializedField_update_result(<SerializedField>self, obj, result, typed_dict, exclude_unset)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_ComplexField_update_result(((struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)__pyx_v_self), __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":736
 *     elif _dispatch == 1:
 *         return SimpleField_update_result(<SimpleField>self, obj, result, typed_dict, exclude_unset)
 *     elif _dispatch == 2:             # <<<<<<<<<<<<<<
 *         return ComplexField_update_result(<ComplexField>self, obj, result, typed_dict, exclude_unset)
 *     elif _dispatch == 3:
 */
    break;
    case 3:

    /* "apischema/serialization/methods.pyx":739
 *         return ComplexField_update_result(<ComplexField>self, obj, result, typed_dict, exclude_unset)
 *     elif _dispatch == 3:
 *         return SerializedField_update_result(<SerializedField>self, obj, result, typed_dict, exclude_unset)             # <<<<<<<<<<<<<<
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_9apischema_13serialization_7methods_SerializedField_update_result(((struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *)__pyx_v_self), __pyx_v_obj, __pyx_v_result, __pyx_v_typed_dict, __pyx_v_exclude_unset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apischema/serialization/methods.pyx":738
 *     elif _dispatch == 2:
 *         return ComplexField_update_result(<ComplexField>self, obj, result, typed_dict, exclude_unset)
 *     elif _dispatch == 3:             # <<<<<<<<<<<<<<
 *         return SerializedField_update_result(<SerializedField>self, obj, result, typed_dict, exclude_unset)
 * 
 */
    break;
    default: break;
  }

  /* "apischema/serialization/methods.pyx":730
 *         return AnyFallback_fall_back(<AnyFallback>self, obj, path)
 * 
 * cdef inline BaseField_update_result(BaseField self, object obj, dict result, bint typed_dict, bint exclude_unset):             # <<<<<<<<<<<<<<
 *     cdef int _dispatch = self._dispatch
 *     if _dispatch == 0:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apischema.serialization.methods.BaseField_update_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_SerializationMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_5__pyx_unpickle_SerializationMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_5__pyx_unpickle_SerializationMethod = {"__pyx_unpickle_SerializationMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_5__pyx_unpickle_SerializationMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_5__pyx_unpickle_SerializationMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_SerializationMethod (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_SerializationMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SerializationMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SerializationMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SerializationMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_SerializationMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_4__pyx_unpickle_SerializationMethod(__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_9apischema_13serialization_7methods_4__pyx_unpickle_SerializationMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SerializationMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x05289b3) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = SerializationMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = SerializationMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = SerializationMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SerializationMethod__set_state(<SerializationMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = SerializationMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SerializationMethod__set_state(<SerializationMethod> __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 = SerializationMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SerializationMethod__set_state(<SerializationMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_SerializationMethod__set_state(SerializationMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_SerializationMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = SerializationMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SerializationMethod__set_state(<SerializationMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SerializationMethod__set_state(<SerializationMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_SerializationMethod__set_state(SerializationMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_SerializationMethod(__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("apischema.serialization.methods.__pyx_unpickle_SerializationMethod", __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_SerializationMethod__set_state(<SerializationMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SerializationMethod__set_state(SerializationMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_SerializationMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SerializationMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_SerializationMethod__set_state(SerializationMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_dispatch = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_SerializationMethod__set_state(SerializationMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 1) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_SerializationMethod__set_state(SerializationMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_SerializationMethod__set_state(<SerializationMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SerializationMethod__set_state(SerializationMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_SerializationMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_IdentityMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_7__pyx_unpickle_IdentityMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_7__pyx_unpickle_IdentityMethod = {"__pyx_unpickle_IdentityMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_7__pyx_unpickle_IdentityMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_7__pyx_unpickle_IdentityMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_IdentityMethod (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_IdentityMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IdentityMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_IdentityMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IdentityMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_IdentityMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_6__pyx_unpickle_IdentityMethod(__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_9apischema_13serialization_7methods_6__pyx_unpickle_IdentityMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IdentityMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x05289b3) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = IdentityMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = IdentityMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = IdentityMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IdentityMethod__set_state(<IdentityMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_IdentityMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = IdentityMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IdentityMethod__set_state(<IdentityMethod> __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 = IdentityMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IdentityMethod__set_state(<IdentityMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_IdentityMethod__set_state(IdentityMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_IdentityMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = IdentityMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IdentityMethod__set_state(<IdentityMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IdentityMethod__set_state(<IdentityMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_IdentityMethod__set_state(IdentityMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_IdentityMethod(__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("apischema.serialization.methods.__pyx_unpickle_IdentityMethod", __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_IdentityMethod__set_state(<IdentityMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IdentityMethod__set_state(IdentityMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_IdentityMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IdentityMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_IdentityMethod__set_state(IdentityMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_IdentityMethod__set_state(IdentityMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 1) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_IdentityMethod__set_state(IdentityMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_IdentityMethod__set_state(<IdentityMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IdentityMethod__set_state(IdentityMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_IdentityMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_ListMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9__pyx_unpickle_ListMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_9__pyx_unpickle_ListMethod = {"__pyx_unpickle_ListMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_9__pyx_unpickle_ListMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_9__pyx_unpickle_ListMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_ListMethod (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_ListMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ListMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ListMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ListMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_ListMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_8__pyx_unpickle_ListMethod(__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_9apischema_13serialization_7methods_8__pyx_unpickle_ListMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ListMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x05289b3) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = ListMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = ListMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = ListMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ListMethod__set_state(<ListMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_ListMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = ListMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ListMethod__set_state(<ListMethod> __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 = ListMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ListMethod__set_state(<ListMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_ListMethod__set_state(ListMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ListMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = ListMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ListMethod__set_state(<ListMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ListMethod__set_state(<ListMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_ListMethod__set_state(ListMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_ListMethod(__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("apischema.serialization.methods.__pyx_unpickle_ListMethod", __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_ListMethod__set_state(<ListMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ListMethod__set_state(ListMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ListMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ListMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_ListMethod__set_state(ListMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_ListMethod__set_state(ListMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 1) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_ListMethod__set_state(ListMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_ListMethod__set_state(<ListMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ListMethod__set_state(ListMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_ListMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DictMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11__pyx_unpickle_DictMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_11__pyx_unpickle_DictMethod = {"__pyx_unpickle_DictMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_11__pyx_unpickle_DictMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_11__pyx_unpickle_DictMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_DictMethod (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_DictMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DictMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DictMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DictMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_DictMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_10__pyx_unpickle_DictMethod(__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_9apischema_13serialization_7methods_10__pyx_unpickle_DictMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DictMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x05289b3) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = DictMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = DictMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = DictMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DictMethod__set_state(<DictMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_DictMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = DictMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DictMethod__set_state(<DictMethod> __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 = DictMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DictMethod__set_state(<DictMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DictMethod__set_state(DictMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_DictMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = DictMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DictMethod__set_state(<DictMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DictMethod__set_state(<DictMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DictMethod__set_state(DictMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_DictMethod(__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("apischema.serialization.methods.__pyx_unpickle_DictMethod", __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_DictMethod__set_state(<DictMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DictMethod__set_state(DictMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_DictMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DictMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DictMethod__set_state(DictMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_DictMethod__set_state(DictMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 1) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DictMethod__set_state(DictMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_DictMethod__set_state(<DictMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DictMethod__set_state(DictMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_DictMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_StrMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13__pyx_unpickle_StrMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_13__pyx_unpickle_StrMethod = {"__pyx_unpickle_StrMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_13__pyx_unpickle_StrMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_13__pyx_unpickle_StrMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_StrMethod (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_StrMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_StrMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_StrMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_StrMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_StrMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_12__pyx_unpickle_StrMethod(__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_9apischema_13serialization_7methods_12__pyx_unpickle_StrMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_StrMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x05289b3) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = StrMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = StrMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = StrMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_StrMethod__set_state(<StrMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_StrMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = StrMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_StrMethod__set_state(<StrMethod> __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 = StrMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_StrMethod__set_state(<StrMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_StrMethod__set_state(StrMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_StrMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = StrMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_StrMethod__set_state(<StrMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_StrMethod__set_state(<StrMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_StrMethod__set_state(StrMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_StrMethod(__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("apischema.serialization.methods.__pyx_unpickle_StrMethod", __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_StrMethod__set_state(<StrMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_StrMethod__set_state(StrMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_StrMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_StrMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_StrMethod__set_state(StrMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_StrMethod__set_state(StrMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 1) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_StrMethod__set_state(StrMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_StrMethod__set_state(<StrMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_StrMethod__set_state(StrMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_StrMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_IntMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15__pyx_unpickle_IntMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_15__pyx_unpickle_IntMethod = {"__pyx_unpickle_IntMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_15__pyx_unpickle_IntMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_15__pyx_unpickle_IntMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntMethod (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_IntMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_IntMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_IntMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_14__pyx_unpickle_IntMethod(__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_9apischema_13serialization_7methods_14__pyx_unpickle_IntMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x05289b3) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = IntMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = IntMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = IntMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntMethod__set_state(<IntMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_IntMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = IntMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntMethod__set_state(<IntMethod> __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 = IntMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntMethod__set_state(<IntMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_IntMethod__set_state(IntMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_IntMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = IntMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntMethod__set_state(<IntMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntMethod__set_state(<IntMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_IntMethod__set_state(IntMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_IntMethod(__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("apischema.serialization.methods.__pyx_unpickle_IntMethod", __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_IntMethod__set_state(<IntMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntMethod__set_state(IntMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_IntMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_IntMethod__set_state(IntMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntMethod__set_state(IntMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 1) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntMethod__set_state(IntMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_IntMethod__set_state(<IntMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntMethod__set_state(IntMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_IntMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_BoolMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_17__pyx_unpickle_BoolMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_17__pyx_unpickle_BoolMethod = {"__pyx_unpickle_BoolMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_17__pyx_unpickle_BoolMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_17__pyx_unpickle_BoolMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_BoolMethod (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_BoolMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_BoolMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BoolMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_BoolMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_16__pyx_unpickle_BoolMethod(__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_9apischema_13serialization_7methods_16__pyx_unpickle_BoolMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BoolMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x05289b3) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = BoolMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = BoolMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = BoolMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BoolMethod__set_state(<BoolMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_BoolMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = BoolMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BoolMethod__set_state(<BoolMethod> __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 = BoolMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BoolMethod__set_state(<BoolMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolMethod__set_state(BoolMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_BoolMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = BoolMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BoolMethod__set_state(<BoolMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BoolMethod__set_state(<BoolMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_BoolMethod__set_state(BoolMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_BoolMethod(__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("apischema.serialization.methods.__pyx_unpickle_BoolMethod", __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_BoolMethod__set_state(<BoolMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolMethod__set_state(BoolMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_BoolMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BoolMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolMethod__set_state(BoolMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_BoolMethod__set_state(BoolMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 1) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_BoolMethod__set_state(BoolMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_BoolMethod__set_state(<BoolMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolMethod__set_state(BoolMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_BoolMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_FloatMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_19__pyx_unpickle_FloatMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_19__pyx_unpickle_FloatMethod = {"__pyx_unpickle_FloatMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_19__pyx_unpickle_FloatMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_19__pyx_unpickle_FloatMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatMethod (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_FloatMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FloatMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_FloatMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FloatMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_FloatMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_18__pyx_unpickle_FloatMethod(__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_9apischema_13serialization_7methods_18__pyx_unpickle_FloatMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x05289b3) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = FloatMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = FloatMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = FloatMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FloatMethod__set_state(<FloatMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_FloatMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = FloatMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FloatMethod__set_state(<FloatMethod> __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 = FloatMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FloatMethod__set_state(<FloatMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatMethod__set_state(FloatMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_FloatMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = FloatMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FloatMethod__set_state(<FloatMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FloatMethod__set_state(<FloatMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_FloatMethod__set_state(FloatMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_FloatMethod(__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("apischema.serialization.methods.__pyx_unpickle_FloatMethod", __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_FloatMethod__set_state(<FloatMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatMethod__set_state(FloatMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_FloatMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatMethod__set_state(FloatMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_FloatMethod__set_state(FloatMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 1) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_FloatMethod__set_state(FloatMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_FloatMethod__set_state(<FloatMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatMethod__set_state(FloatMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_FloatMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_NoneMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_21__pyx_unpickle_NoneMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_21__pyx_unpickle_NoneMethod = {"__pyx_unpickle_NoneMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_21__pyx_unpickle_NoneMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_21__pyx_unpickle_NoneMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_NoneMethod (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_NoneMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NoneMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_NoneMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NoneMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_NoneMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_20__pyx_unpickle_NoneMethod(__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_9apischema_13serialization_7methods_20__pyx_unpickle_NoneMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_NoneMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x05289b3) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = NoneMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = NoneMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = NoneMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NoneMethod__set_state(<NoneMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_NoneMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = NoneMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_NoneMethod__set_state(<NoneMethod> __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 = NoneMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NoneMethod__set_state(<NoneMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_NoneMethod__set_state(NoneMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_NoneMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = NoneMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_NoneMethod__set_state(<NoneMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NoneMethod__set_state(<NoneMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_NoneMethod__set_state(NoneMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_NoneMethod(__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("apischema.serialization.methods.__pyx_unpickle_NoneMethod", __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_NoneMethod__set_state(<NoneMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NoneMethod__set_state(NoneMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_NoneMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_NoneMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_NoneMethod__set_state(NoneMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_NoneMethod__set_state(NoneMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 1) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_NoneMethod__set_state(NoneMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_NoneMethod__set_state(<NoneMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NoneMethod__set_state(NoneMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_NoneMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_RecMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_23__pyx_unpickle_RecMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_23__pyx_unpickle_RecMethod = {"__pyx_unpickle_RecMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_23__pyx_unpickle_RecMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_23__pyx_unpickle_RecMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_RecMethod (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_RecMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RecMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_RecMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RecMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_RecMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_22__pyx_unpickle_RecMethod(__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_9apischema_13serialization_7methods_22__pyx_unpickle_RecMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_RecMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x64c25a2:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x64c25a2 = (_dispatch, lazy, method))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x64c25a2) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x64c25a2:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x64c25a2 = (_dispatch, lazy, method))" % __pyx_checksum)
 *     __pyx_result = RecMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x64c25a2:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x64c25a2 = (_dispatch, lazy, method))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = RecMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x64, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x64c25a2:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x64c25a2 = (_dispatch, lazy, method))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x64c25a2 = (_dispatch, lazy, method))" % __pyx_checksum)
 *     __pyx_result = RecMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RecMethod__set_state(<RecMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_RecMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x64c25a2 = (_dispatch, lazy, method))" % __pyx_checksum)
 *     __pyx_result = RecMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_RecMethod__set_state(<RecMethod> __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 = RecMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RecMethod__set_state(<RecMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_RecMethod__set_state(RecMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_RecMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x64c25a2 = (_dispatch, lazy, method))" % __pyx_checksum)
 *     __pyx_result = RecMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_RecMethod__set_state(<RecMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RecMethod__set_state(<RecMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_RecMethod__set_state(RecMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.lazy = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_RecMethod(__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("apischema.serialization.methods.__pyx_unpickle_RecMethod", __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_RecMethod__set_state(<RecMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_RecMethod__set_state(RecMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.lazy = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_RecMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_RecMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_RecMethod__set_state(RecMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.lazy = __pyx_state[1]; __pyx_result.method = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->lazy);
  __Pyx_DECREF(__pyx_v___pyx_result->lazy);
  __pyx_v___pyx_result->lazy = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->method);
  __Pyx_DECREF(__pyx_v___pyx_result->method);
  __pyx_v___pyx_result->method = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_RecMethod__set_state(RecMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.lazy = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 3) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.lazy = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_RecMethod__set_state(RecMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.lazy = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_RecMethod__set_state(<RecMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_RecMethod__set_state(RecMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.lazy = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_RecMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_AnyMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_25__pyx_unpickle_AnyMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_25__pyx_unpickle_AnyMethod = {"__pyx_unpickle_AnyMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_25__pyx_unpickle_AnyMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_25__pyx_unpickle_AnyMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_AnyMethod (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_AnyMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AnyMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_AnyMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AnyMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_AnyMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_24__pyx_unpickle_AnyMethod(__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_9apischema_13serialization_7methods_24__pyx_unpickle_AnyMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_AnyMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdedeae4:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdedeae4 = (_dispatch, factory))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xdedeae4) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdedeae4:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdedeae4 = (_dispatch, factory))" % __pyx_checksum)
 *     __pyx_result = AnyMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xdedeae4:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdedeae4 = (_dispatch, factory))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = AnyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xde, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdedeae4:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdedeae4 = (_dispatch, factory))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdedeae4 = (_dispatch, factory))" % __pyx_checksum)
 *     __pyx_result = AnyMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_AnyMethod__set_state(<AnyMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_AnyMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xdedeae4 = (_dispatch, factory))" % __pyx_checksum)
 *     __pyx_result = AnyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_AnyMethod__set_state(<AnyMethod> __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 = AnyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_AnyMethod__set_state(<AnyMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_AnyMethod__set_state(AnyMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_AnyMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xdedeae4 = (_dispatch, factory))" % __pyx_checksum)
 *     __pyx_result = AnyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_AnyMethod__set_state(<AnyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_AnyMethod__set_state(<AnyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_AnyMethod__set_state(AnyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.factory = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_AnyMethod(__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("apischema.serialization.methods.__pyx_unpickle_AnyMethod", __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_AnyMethod__set_state(<AnyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_AnyMethod__set_state(AnyMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.factory = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_AnyMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_AnyMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_AnyMethod__set_state(AnyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.factory = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->factory);
  __Pyx_DECREF(__pyx_v___pyx_result->factory);
  __pyx_v___pyx_result->factory = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_AnyMethod__set_state(AnyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.factory = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.factory = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_AnyMethod__set_state(AnyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.factory = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_AnyMethod__set_state(<AnyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_AnyMethod__set_state(AnyMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.factory = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_AnyMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Fallback(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_27__pyx_unpickle_Fallback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_27__pyx_unpickle_Fallback = {"__pyx_unpickle_Fallback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_27__pyx_unpickle_Fallback, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_27__pyx_unpickle_Fallback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Fallback (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_Fallback", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Fallback", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Fallback") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Fallback", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_Fallback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_26__pyx_unpickle_Fallback(__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_9apischema_13serialization_7methods_26__pyx_unpickle_Fallback(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Fallback", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x05289b3) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = Fallback.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = Fallback.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = Fallback.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Fallback__set_state(<Fallback> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_Fallback), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = Fallback.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Fallback__set_state(<Fallback> __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 = Fallback.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Fallback__set_state(<Fallback> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Fallback__set_state(Fallback __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_Fallback__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = Fallback.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Fallback__set_state(<Fallback> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Fallback__set_state(<Fallback> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Fallback__set_state(Fallback __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_Fallback(__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("apischema.serialization.methods.__pyx_unpickle_Fallback", __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_Fallback__set_state(<Fallback> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Fallback__set_state(Fallback __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_Fallback__set_state(struct __pyx_obj_9apischema_13serialization_7methods_Fallback *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Fallback__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Fallback__set_state(Fallback __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_dispatch = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Fallback__set_state(Fallback __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 1) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Fallback__set_state(Fallback __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_Fallback__set_state(<Fallback> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Fallback__set_state(Fallback __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_Fallback__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_NoFallback(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_29__pyx_unpickle_NoFallback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_29__pyx_unpickle_NoFallback = {"__pyx_unpickle_NoFallback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_29__pyx_unpickle_NoFallback, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_29__pyx_unpickle_NoFallback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_NoFallback (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_NoFallback", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NoFallback", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_NoFallback") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NoFallback", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_NoFallback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_28__pyx_unpickle_NoFallback(__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_9apischema_13serialization_7methods_28__pyx_unpickle_NoFallback(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_NoFallback", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x9526c11:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x9526c11 = (_dispatch, tp))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x9526c11) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x9526c11:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x9526c11 = (_dispatch, tp))" % __pyx_checksum)
 *     __pyx_result = NoFallback.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x9526c11:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x9526c11 = (_dispatch, tp))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = NoFallback.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x95, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x9526c11:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x9526c11 = (_dispatch, tp))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x9526c11 = (_dispatch, tp))" % __pyx_checksum)
 *     __pyx_result = NoFallback.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NoFallback__set_state(<NoFallback> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_NoFallback), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x9526c11 = (_dispatch, tp))" % __pyx_checksum)
 *     __pyx_result = NoFallback.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_NoFallback__set_state(<NoFallback> __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 = NoFallback.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NoFallback__set_state(<NoFallback> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_NoFallback__set_state(NoFallback __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_NoFallback__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x9526c11 = (_dispatch, tp))" % __pyx_checksum)
 *     __pyx_result = NoFallback.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_NoFallback__set_state(<NoFallback> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_NoFallback__set_state(<NoFallback> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_NoFallback__set_state(NoFallback __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.tp = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_NoFallback(__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("apischema.serialization.methods.__pyx_unpickle_NoFallback", __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_NoFallback__set_state(<NoFallback> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NoFallback__set_state(NoFallback __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.tp = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_NoFallback__set_state(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_NoFallback__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_NoFallback__set_state(NoFallback __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.tp = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->tp);
  __Pyx_DECREF(__pyx_v___pyx_result->tp);
  __pyx_v___pyx_result->tp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_NoFallback__set_state(NoFallback __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.tp = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.tp = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_NoFallback__set_state(NoFallback __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.tp = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_NoFallback__set_state(<NoFallback> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NoFallback__set_state(NoFallback __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.tp = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_NoFallback__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_AnyFallback(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_31__pyx_unpickle_AnyFallback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_31__pyx_unpickle_AnyFallback = {"__pyx_unpickle_AnyFallback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_31__pyx_unpickle_AnyFallback, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_31__pyx_unpickle_AnyFallback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_AnyFallback (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_AnyFallback", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AnyFallback", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_AnyFallback") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AnyFallback", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_AnyFallback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_30__pyx_unpickle_AnyFallback(__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_9apischema_13serialization_7methods_30__pyx_unpickle_AnyFallback(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_AnyFallback", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb01c51d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb01c51d = (_dispatch, any_method))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb01c51d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb01c51d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb01c51d = (_dispatch, any_method))" % __pyx_checksum)
 *     __pyx_result = AnyFallback.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xb01c51d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb01c51d = (_dispatch, any_method))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = AnyFallback.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb01c51d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb01c51d = (_dispatch, any_method))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb01c51d = (_dispatch, any_method))" % __pyx_checksum)
 *     __pyx_result = AnyFallback.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_AnyFallback__set_state(<AnyFallback> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_AnyFallback), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xb01c51d = (_dispatch, any_method))" % __pyx_checksum)
 *     __pyx_result = AnyFallback.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_AnyFallback__set_state(<AnyFallback> __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 = AnyFallback.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_AnyFallback__set_state(<AnyFallback> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_AnyFallback__set_state(AnyFallback __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_AnyFallback__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xb01c51d = (_dispatch, any_method))" % __pyx_checksum)
 *     __pyx_result = AnyFallback.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_AnyFallback__set_state(<AnyFallback> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_AnyFallback__set_state(<AnyFallback> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_AnyFallback__set_state(AnyFallback __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_AnyFallback(__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("apischema.serialization.methods.__pyx_unpickle_AnyFallback", __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_AnyFallback__set_state(<AnyFallback> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_AnyFallback__set_state(AnyFallback __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_AnyFallback__set_state(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_AnyFallback__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_AnyFallback__set_state(AnyFallback __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->any_method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->any_method));
  __pyx_v___pyx_result->any_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_AnyFallback__set_state(AnyFallback __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_AnyFallback__set_state(AnyFallback __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_AnyFallback__set_state(<AnyFallback> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_AnyFallback__set_state(AnyFallback __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_AnyFallback__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TypeCheckIdentityMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_33__pyx_unpickle_TypeCheckIdentityMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_33__pyx_unpickle_TypeCheckIdentityMethod = {"__pyx_unpickle_TypeCheckIdentityMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_33__pyx_unpickle_TypeCheckIdentityMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_33__pyx_unpickle_TypeCheckIdentityMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TypeCheckIdentityMethod (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_TypeCheckIdentityMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TypeCheckIdentityMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_TypeCheckIdentityMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TypeCheckIdentityMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_TypeCheckIdentityMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_32__pyx_unpickle_TypeCheckIdentityMethod(__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_9apischema_13serialization_7methods_32__pyx_unpickle_TypeCheckIdentityMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TypeCheckIdentityMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x29257f8:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x29257f8 = (_dispatch, expected, fallback))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x29257f8) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x29257f8:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x29257f8 = (_dispatch, expected, fallback))" % __pyx_checksum)
 *     __pyx_result = TypeCheckIdentityMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x29257f8:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x29257f8 = (_dispatch, expected, fallback))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = TypeCheckIdentityMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x29, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x29257f8:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x29257f8 = (_dispatch, expected, fallback))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x29257f8 = (_dispatch, expected, fallback))" % __pyx_checksum)
 *     __pyx_result = TypeCheckIdentityMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TypeCheckIdentityMethod__set_state(<TypeCheckIdentityMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_TypeCheckIdentityMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x29257f8 = (_dispatch, expected, fallback))" % __pyx_checksum)
 *     __pyx_result = TypeCheckIdentityMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TypeCheckIdentityMethod__set_state(<TypeCheckIdentityMethod> __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 = TypeCheckIdentityMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TypeCheckIdentityMethod__set_state(<TypeCheckIdentityMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TypeCheckIdentityMethod__set_state(TypeCheckIdentityMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TypeCheckIdentityMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x29257f8 = (_dispatch, expected, fallback))" % __pyx_checksum)
 *     __pyx_result = TypeCheckIdentityMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TypeCheckIdentityMethod__set_state(<TypeCheckIdentityMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TypeCheckIdentityMethod__set_state(<TypeCheckIdentityMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TypeCheckIdentityMethod__set_state(TypeCheckIdentityMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.expected = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TypeCheckIdentityMethod(__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("apischema.serialization.methods.__pyx_unpickle_TypeCheckIdentityMethod", __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_TypeCheckIdentityMethod__set_state(<TypeCheckIdentityMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TypeCheckIdentityMethod__set_state(TypeCheckIdentityMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.expected = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TypeCheckIdentityMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TypeCheckIdentityMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TypeCheckIdentityMethod__set_state(TypeCheckIdentityMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.expected = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->expected);
  __Pyx_DECREF(__pyx_v___pyx_result->expected);
  __pyx_v___pyx_result->expected = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_Fallback))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->fallback);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->fallback));
  __pyx_v___pyx_result->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TypeCheckIdentityMethod__set_state(TypeCheckIdentityMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.expected = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 3) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.expected = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TypeCheckIdentityMethod__set_state(TypeCheckIdentityMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.expected = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TypeCheckIdentityMethod__set_state(<TypeCheckIdentityMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TypeCheckIdentityMethod__set_state(TypeCheckIdentityMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.expected = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_TypeCheckIdentityMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TypeCheckMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_35__pyx_unpickle_TypeCheckMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_35__pyx_unpickle_TypeCheckMethod = {"__pyx_unpickle_TypeCheckMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_35__pyx_unpickle_TypeCheckMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_35__pyx_unpickle_TypeCheckMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TypeCheckMethod (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_TypeCheckMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TypeCheckMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_TypeCheckMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TypeCheckMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_TypeCheckMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_34__pyx_unpickle_TypeCheckMethod(__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_9apischema_13serialization_7methods_34__pyx_unpickle_TypeCheckMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TypeCheckMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x4dbe773:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x4dbe773 = (_dispatch, expected, fallback, method))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x4dbe773) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x4dbe773:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x4dbe773 = (_dispatch, expected, fallback, method))" % __pyx_checksum)
 *     __pyx_result = TypeCheckMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x4dbe773:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x4dbe773 = (_dispatch, expected, fallback, method))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = TypeCheckMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x4d, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x4dbe773:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x4dbe773 = (_dispatch, expected, fallback, method))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x4dbe773 = (_dispatch, expected, fallback, method))" % __pyx_checksum)
 *     __pyx_result = TypeCheckMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TypeCheckMethod__set_state(<TypeCheckMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_TypeCheckMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x4dbe773 = (_dispatch, expected, fallback, method))" % __pyx_checksum)
 *     __pyx_result = TypeCheckMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TypeCheckMethod__set_state(<TypeCheckMethod> __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 = TypeCheckMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TypeCheckMethod__set_state(<TypeCheckMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TypeCheckMethod__set_state(TypeCheckMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TypeCheckMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x4dbe773 = (_dispatch, expected, fallback, method))" % __pyx_checksum)
 *     __pyx_result = TypeCheckMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TypeCheckMethod__set_state(<TypeCheckMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TypeCheckMethod__set_state(<TypeCheckMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TypeCheckMethod__set_state(TypeCheckMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.expected = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]; __pyx_result.method = __pyx_state[3]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TypeCheckMethod(__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("apischema.serialization.methods.__pyx_unpickle_TypeCheckMethod", __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_TypeCheckMethod__set_state(<TypeCheckMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TypeCheckMethod__set_state(TypeCheckMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.expected = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]; __pyx_result.method = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TypeCheckMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TypeCheckMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TypeCheckMethod__set_state(TypeCheckMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.expected = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]; __pyx_result.method = __pyx_state[3]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->expected);
  __Pyx_DECREF(__pyx_v___pyx_result->expected);
  __pyx_v___pyx_result->expected = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_Fallback))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->fallback);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->fallback));
  __pyx_v___pyx_result->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->method));
  __pyx_v___pyx_result->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TypeCheckMethod__set_state(TypeCheckMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.expected = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]; __pyx_result.method = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 4) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.expected = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]; __pyx_result.method = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TypeCheckMethod__set_state(TypeCheckMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.expected = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]; __pyx_result.method = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TypeCheckMethod__set_state(<TypeCheckMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TypeCheckMethod__set_state(TypeCheckMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.expected = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]; __pyx_result.method = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_TypeCheckMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_CollectionCheckOnlyMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_37__pyx_unpickle_CollectionCheckOnlyMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_37__pyx_unpickle_CollectionCheckOnlyMethod = {"__pyx_unpickle_CollectionCheckOnlyMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_37__pyx_unpickle_CollectionCheckOnlyMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_37__pyx_unpickle_CollectionCheckOnlyMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_CollectionCheckOnlyMethod (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_CollectionCheckOnlyMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CollectionCheckOnlyMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CollectionCheckOnlyMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CollectionCheckOnlyMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_CollectionCheckOnlyMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_36__pyx_unpickle_CollectionCheckOnlyMethod(__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_9apischema_13serialization_7methods_36__pyx_unpickle_CollectionCheckOnlyMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CollectionCheckOnlyMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x6f73d86:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x6f73d86) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x6f73d86:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 *     __pyx_result = CollectionCheckOnlyMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x6f73d86:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CollectionCheckOnlyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x6f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x6f73d86:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 *     __pyx_result = CollectionCheckOnlyMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CollectionCheckOnlyMethod__set_state(<CollectionCheckOnlyMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_CollectionCheckOnlyMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 *     __pyx_result = CollectionCheckOnlyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CollectionCheckOnlyMethod__set_state(<CollectionCheckOnlyMethod> __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 = CollectionCheckOnlyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CollectionCheckOnlyMethod__set_state(<CollectionCheckOnlyMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_CollectionCheckOnlyMethod__set_state(CollectionCheckOnlyMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_CollectionCheckOnlyMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 *     __pyx_result = CollectionCheckOnlyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CollectionCheckOnlyMethod__set_state(<CollectionCheckOnlyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CollectionCheckOnlyMethod__set_state(<CollectionCheckOnlyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_CollectionCheckOnlyMethod__set_state(CollectionCheckOnlyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CollectionCheckOnlyMethod(__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("apischema.serialization.methods.__pyx_unpickle_CollectionCheckOnlyMethod", __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_CollectionCheckOnlyMethod__set_state(<CollectionCheckOnlyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CollectionCheckOnlyMethod__set_state(CollectionCheckOnlyMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_CollectionCheckOnlyMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CollectionCheckOnlyMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_CollectionCheckOnlyMethod__set_state(CollectionCheckOnlyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->value_method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->value_method));
  __pyx_v___pyx_result->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_CollectionCheckOnlyMethod__set_state(CollectionCheckOnlyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_CollectionCheckOnlyMethod__set_state(CollectionCheckOnlyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_CollectionCheckOnlyMethod__set_state(<CollectionCheckOnlyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CollectionCheckOnlyMethod__set_state(CollectionCheckOnlyMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_CollectionCheckOnlyMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_CollectionMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_39__pyx_unpickle_CollectionMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_39__pyx_unpickle_CollectionMethod = {"__pyx_unpickle_CollectionMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_39__pyx_unpickle_CollectionMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_39__pyx_unpickle_CollectionMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_CollectionMethod (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_CollectionMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CollectionMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CollectionMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CollectionMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_CollectionMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_38__pyx_unpickle_CollectionMethod(__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_9apischema_13serialization_7methods_38__pyx_unpickle_CollectionMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CollectionMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x6f73d86:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x6f73d86) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x6f73d86:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 *     __pyx_result = CollectionMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x6f73d86:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CollectionMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x6f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x6f73d86:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 *     __pyx_result = CollectionMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CollectionMethod__set_state(<CollectionMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_CollectionMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 *     __pyx_result = CollectionMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CollectionMethod__set_state(<CollectionMethod> __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 = CollectionMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CollectionMethod__set_state(<CollectionMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_CollectionMethod__set_state(CollectionMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_CollectionMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 *     __pyx_result = CollectionMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CollectionMethod__set_state(<CollectionMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CollectionMethod__set_state(<CollectionMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_CollectionMethod__set_state(CollectionMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CollectionMethod(__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("apischema.serialization.methods.__pyx_unpickle_CollectionMethod", __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_CollectionMethod__set_state(<CollectionMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CollectionMethod__set_state(CollectionMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_CollectionMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CollectionMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_CollectionMethod__set_state(CollectionMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->value_method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->value_method));
  __pyx_v___pyx_result->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_CollectionMethod__set_state(CollectionMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_CollectionMethod__set_state(CollectionMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_CollectionMethod__set_state(<CollectionMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CollectionMethod__set_state(CollectionMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_CollectionMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_ValueMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_41__pyx_unpickle_ValueMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_41__pyx_unpickle_ValueMethod = {"__pyx_unpickle_ValueMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_41__pyx_unpickle_ValueMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_41__pyx_unpickle_ValueMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_ValueMethod (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_ValueMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ValueMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ValueMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ValueMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_ValueMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_40__pyx_unpickle_ValueMethod(__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_9apischema_13serialization_7methods_40__pyx_unpickle_ValueMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ValueMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x05289b3) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = ValueMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = ValueMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = ValueMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ValueMethod__set_state(<ValueMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_ValueMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = ValueMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ValueMethod__set_state(<ValueMethod> __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 = ValueMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ValueMethod__set_state(<ValueMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_ValueMethod__set_state(ValueMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ValueMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = ValueMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ValueMethod__set_state(<ValueMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ValueMethod__set_state(<ValueMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_ValueMethod__set_state(ValueMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_ValueMethod(__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("apischema.serialization.methods.__pyx_unpickle_ValueMethod", __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_ValueMethod__set_state(<ValueMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ValueMethod__set_state(ValueMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ValueMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ValueMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_ValueMethod__set_state(ValueMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_ValueMethod__set_state(ValueMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 1) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_ValueMethod__set_state(ValueMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_ValueMethod__set_state(<ValueMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ValueMethod__set_state(ValueMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_ValueMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_EnumMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_43__pyx_unpickle_EnumMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_43__pyx_unpickle_EnumMethod = {"__pyx_unpickle_EnumMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_43__pyx_unpickle_EnumMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_43__pyx_unpickle_EnumMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_EnumMethod (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_EnumMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EnumMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_EnumMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EnumMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_EnumMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_42__pyx_unpickle_EnumMethod(__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_9apischema_13serialization_7methods_42__pyx_unpickle_EnumMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_EnumMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb01c51d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb01c51d = (_dispatch, any_method))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb01c51d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb01c51d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb01c51d = (_dispatch, any_method))" % __pyx_checksum)
 *     __pyx_result = EnumMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xb01c51d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb01c51d = (_dispatch, any_method))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = EnumMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb01c51d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb01c51d = (_dispatch, any_method))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb01c51d = (_dispatch, any_method))" % __pyx_checksum)
 *     __pyx_result = EnumMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_EnumMethod__set_state(<EnumMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_EnumMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xb01c51d = (_dispatch, any_method))" % __pyx_checksum)
 *     __pyx_result = EnumMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_EnumMethod__set_state(<EnumMethod> __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 = EnumMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_EnumMethod__set_state(<EnumMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_EnumMethod__set_state(EnumMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_EnumMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xb01c51d = (_dispatch, any_method))" % __pyx_checksum)
 *     __pyx_result = EnumMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_EnumMethod__set_state(<EnumMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_EnumMethod__set_state(<EnumMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_EnumMethod__set_state(EnumMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_EnumMethod(__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("apischema.serialization.methods.__pyx_unpickle_EnumMethod", __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_EnumMethod__set_state(<EnumMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_EnumMethod__set_state(EnumMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_EnumMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_EnumMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_EnumMethod__set_state(EnumMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_AnyMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->any_method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->any_method));
  __pyx_v___pyx_result->any_method = ((struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_EnumMethod__set_state(EnumMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_EnumMethod__set_state(EnumMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_EnumMethod__set_state(<EnumMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_EnumMethod__set_state(EnumMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_EnumMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_MappingCheckOnlyMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_45__pyx_unpickle_MappingCheckOnlyMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_45__pyx_unpickle_MappingCheckOnlyMethod = {"__pyx_unpickle_MappingCheckOnlyMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_45__pyx_unpickle_MappingCheckOnlyMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_45__pyx_unpickle_MappingCheckOnlyMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_MappingCheckOnlyMethod (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_MappingCheckOnlyMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MappingCheckOnlyMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_MappingCheckOnlyMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MappingCheckOnlyMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_MappingCheckOnlyMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_44__pyx_unpickle_MappingCheckOnlyMethod(__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_9apischema_13serialization_7methods_44__pyx_unpickle_MappingCheckOnlyMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_MappingCheckOnlyMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xbb7bf61:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb7bf61 = (_dispatch, key_method, value_method))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xbb7bf61) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xbb7bf61:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb7bf61 = (_dispatch, key_method, value_method))" % __pyx_checksum)
 *     __pyx_result = MappingCheckOnlyMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xbb7bf61:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb7bf61 = (_dispatch, key_method, value_method))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = MappingCheckOnlyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xbb, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xbb7bf61:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb7bf61 = (_dispatch, key_method, value_method))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb7bf61 = (_dispatch, key_method, value_method))" % __pyx_checksum)
 *     __pyx_result = MappingCheckOnlyMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_MappingCheckOnlyMethod__set_state(<MappingCheckOnlyMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_MappingCheckOnlyMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xbb7bf61 = (_dispatch, key_method, value_method))" % __pyx_checksum)
 *     __pyx_result = MappingCheckOnlyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_MappingCheckOnlyMethod__set_state(<MappingCheckOnlyMethod> __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 = MappingCheckOnlyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_MappingCheckOnlyMethod__set_state(<MappingCheckOnlyMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_MappingCheckOnlyMethod__set_state(MappingCheckOnlyMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_MappingCheckOnlyMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xbb7bf61 = (_dispatch, key_method, value_method))" % __pyx_checksum)
 *     __pyx_result = MappingCheckOnlyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_MappingCheckOnlyMethod__set_state(<MappingCheckOnlyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_MappingCheckOnlyMethod__set_state(<MappingCheckOnlyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_MappingCheckOnlyMethod__set_state(MappingCheckOnlyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.key_method = __pyx_state[1]; __pyx_result.value_method = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_MappingCheckOnlyMethod(__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("apischema.serialization.methods.__pyx_unpickle_MappingCheckOnlyMethod", __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_MappingCheckOnlyMethod__set_state(<MappingCheckOnlyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_MappingCheckOnlyMethod__set_state(MappingCheckOnlyMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.key_method = __pyx_state[1]; __pyx_result.value_method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_MappingCheckOnlyMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_MappingCheckOnlyMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_MappingCheckOnlyMethod__set_state(MappingCheckOnlyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.key_method = __pyx_state[1]; __pyx_result.value_method = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->key_method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->key_method));
  __pyx_v___pyx_result->key_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->value_method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->value_method));
  __pyx_v___pyx_result->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_MappingCheckOnlyMethod__set_state(MappingCheckOnlyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.key_method = __pyx_state[1]; __pyx_result.value_method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 3) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.key_method = __pyx_state[1]; __pyx_result.value_method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_MappingCheckOnlyMethod__set_state(MappingCheckOnlyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.key_method = __pyx_state[1]; __pyx_result.value_method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_MappingCheckOnlyMethod__set_state(<MappingCheckOnlyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_MappingCheckOnlyMethod__set_state(MappingCheckOnlyMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.key_method = __pyx_state[1]; __pyx_result.value_method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_MappingCheckOnlyMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_MappingMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_47__pyx_unpickle_MappingMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_47__pyx_unpickle_MappingMethod = {"__pyx_unpickle_MappingMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_47__pyx_unpickle_MappingMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_47__pyx_unpickle_MappingMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_MappingMethod (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_MappingMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MappingMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_MappingMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MappingMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_MappingMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_46__pyx_unpickle_MappingMethod(__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_9apischema_13serialization_7methods_46__pyx_unpickle_MappingMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_MappingMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xbb7bf61:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb7bf61 = (_dispatch, key_method, value_method))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xbb7bf61) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xbb7bf61:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb7bf61 = (_dispatch, key_method, value_method))" % __pyx_checksum)
 *     __pyx_result = MappingMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xbb7bf61:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb7bf61 = (_dispatch, key_method, value_method))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = MappingMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xbb, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xbb7bf61:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb7bf61 = (_dispatch, key_method, value_method))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbb7bf61 = (_dispatch, key_method, value_method))" % __pyx_checksum)
 *     __pyx_result = MappingMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_MappingMethod__set_state(<MappingMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_MappingMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xbb7bf61 = (_dispatch, key_method, value_method))" % __pyx_checksum)
 *     __pyx_result = MappingMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_MappingMethod__set_state(<MappingMethod> __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 = MappingMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_MappingMethod__set_state(<MappingMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_MappingMethod__set_state(MappingMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_MappingMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xbb7bf61 = (_dispatch, key_method, value_method))" % __pyx_checksum)
 *     __pyx_result = MappingMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_MappingMethod__set_state(<MappingMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_MappingMethod__set_state(<MappingMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_MappingMethod__set_state(MappingMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.key_method = __pyx_state[1]; __pyx_result.value_method = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_MappingMethod(__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("apischema.serialization.methods.__pyx_unpickle_MappingMethod", __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_MappingMethod__set_state(<MappingMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_MappingMethod__set_state(MappingMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.key_method = __pyx_state[1]; __pyx_result.value_method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_MappingMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_MappingMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_MappingMethod__set_state(MappingMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.key_method = __pyx_state[1]; __pyx_result.value_method = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->key_method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->key_method));
  __pyx_v___pyx_result->key_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->value_method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->value_method));
  __pyx_v___pyx_result->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_MappingMethod__set_state(MappingMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.key_method = __pyx_state[1]; __pyx_result.value_method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 3) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.key_method = __pyx_state[1]; __pyx_result.value_method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_MappingMethod__set_state(MappingMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.key_method = __pyx_state[1]; __pyx_result.value_method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_MappingMethod__set_state(<MappingMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_MappingMethod__set_state(MappingMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.key_method = __pyx_state[1]; __pyx_result.value_method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_MappingMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_BaseField(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_49__pyx_unpickle_BaseField(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_49__pyx_unpickle_BaseField = {"__pyx_unpickle_BaseField", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_49__pyx_unpickle_BaseField, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_49__pyx_unpickle_BaseField(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_BaseField (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_BaseField", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BaseField", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_BaseField") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BaseField", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_BaseField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_48__pyx_unpickle_BaseField(__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_9apischema_13serialization_7methods_48__pyx_unpickle_BaseField(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BaseField", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x05289b3) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = BaseField.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x05289b3:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = BaseField.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x05289b3:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = BaseField.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BaseField__set_state(<BaseField> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_BaseField), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = BaseField.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BaseField__set_state(<BaseField> __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 = BaseField.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BaseField__set_state(<BaseField> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_BaseField__set_state(BaseField __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_BaseField__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_BaseField *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x05289b3 = (_dispatch))" % __pyx_checksum)
 *     __pyx_result = BaseField.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BaseField__set_state(<BaseField> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BaseField__set_state(<BaseField> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_BaseField__set_state(BaseField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_BaseField(__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("apischema.serialization.methods.__pyx_unpickle_BaseField", __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_BaseField__set_state(<BaseField> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BaseField__set_state(BaseField __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_BaseField__set_state(struct __pyx_obj_9apischema_13serialization_7methods_BaseField *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BaseField__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BaseField__set_state(BaseField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_dispatch = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_BaseField__set_state(BaseField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 1) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_BaseField__set_state(BaseField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __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_BaseField__set_state(<BaseField> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BaseField__set_state(BaseField __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_BaseField__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_IdentityField(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_51__pyx_unpickle_IdentityField(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_51__pyx_unpickle_IdentityField = {"__pyx_unpickle_IdentityField", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_51__pyx_unpickle_IdentityField, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_51__pyx_unpickle_IdentityField(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_IdentityField (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_IdentityField", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IdentityField", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_IdentityField") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IdentityField", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_IdentityField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_50__pyx_unpickle_IdentityField(__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_9apischema_13serialization_7methods_50__pyx_unpickle_IdentityField(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IdentityField", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x938bcc6:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x938bcc6 = (_dispatch, alias, name, required))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x938bcc6) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x938bcc6:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x938bcc6 = (_dispatch, alias, name, required))" % __pyx_checksum)
 *     __pyx_result = IdentityField.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x938bcc6:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x938bcc6 = (_dispatch, alias, name, required))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = IdentityField.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x93, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x938bcc6:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x938bcc6 = (_dispatch, alias, name, required))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x938bcc6 = (_dispatch, alias, name, required))" % __pyx_checksum)
 *     __pyx_result = IdentityField.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IdentityField__set_state(<IdentityField> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_IdentityField), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x938bcc6 = (_dispatch, alias, name, required))" % __pyx_checksum)
 *     __pyx_result = IdentityField.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IdentityField__set_state(<IdentityField> __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 = IdentityField.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IdentityField__set_state(<IdentityField> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_IdentityField__set_state(IdentityField __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_IdentityField__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x938bcc6 = (_dispatch, alias, name, required))" % __pyx_checksum)
 *     __pyx_result = IdentityField.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IdentityField__set_state(<IdentityField> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IdentityField__set_state(<IdentityField> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_IdentityField__set_state(IdentityField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.name = __pyx_state[2]; __pyx_result.required = __pyx_state[3]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_IdentityField(__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("apischema.serialization.methods.__pyx_unpickle_IdentityField", __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_IdentityField__set_state(<IdentityField> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IdentityField__set_state(IdentityField __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.name = __pyx_state[2]; __pyx_result.required = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_IdentityField__set_state(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IdentityField__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_IdentityField__set_state(IdentityField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.name = __pyx_state[2]; __pyx_result.required = __pyx_state[3]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->alias);
  __Pyx_DECREF(__pyx_v___pyx_result->alias);
  __pyx_v___pyx_result->alias = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->name);
  __Pyx_DECREF(__pyx_v___pyx_result->name);
  __pyx_v___pyx_result->name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->required = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_IdentityField__set_state(IdentityField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.name = __pyx_state[2]; __pyx_result.required = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 4) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.name = __pyx_state[2]; __pyx_result.required = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_IdentityField__set_state(IdentityField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.name = __pyx_state[2]; __pyx_result.required = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_IdentityField__set_state(<IdentityField> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IdentityField__set_state(IdentityField __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.name = __pyx_state[2]; __pyx_result.required = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_IdentityField__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_SimpleField(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_53__pyx_unpickle_SimpleField(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_53__pyx_unpickle_SimpleField = {"__pyx_unpickle_SimpleField", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_53__pyx_unpickle_SimpleField, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_53__pyx_unpickle_SimpleField(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_SimpleField (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_SimpleField", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SimpleField", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SimpleField") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SimpleField", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_SimpleField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_52__pyx_unpickle_SimpleField(__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_9apischema_13serialization_7methods_52__pyx_unpickle_SimpleField(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SimpleField", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xfbe2b2e:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xfbe2b2e = (_dispatch, alias, method, name, required))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xfbe2b2e) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xfbe2b2e:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xfbe2b2e = (_dispatch, alias, method, name, required))" % __pyx_checksum)
 *     __pyx_result = SimpleField.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xfbe2b2e:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xfbe2b2e = (_dispatch, alias, method, name, required))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = SimpleField.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xfb, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xfbe2b2e:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xfbe2b2e = (_dispatch, alias, method, name, required))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xfbe2b2e = (_dispatch, alias, method, name, required))" % __pyx_checksum)
 *     __pyx_result = SimpleField.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SimpleField__set_state(<SimpleField> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_SimpleField), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xfbe2b2e = (_dispatch, alias, method, name, required))" % __pyx_checksum)
 *     __pyx_result = SimpleField.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SimpleField__set_state(<SimpleField> __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 = SimpleField.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SimpleField__set_state(<SimpleField> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_SimpleField__set_state(SimpleField __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_SimpleField__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xfbe2b2e = (_dispatch, alias, method, name, required))" % __pyx_checksum)
 *     __pyx_result = SimpleField.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SimpleField__set_state(<SimpleField> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SimpleField__set_state(<SimpleField> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_SimpleField__set_state(SimpleField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.method = __pyx_state[2]; __pyx_result.name = __pyx_state[3]; __pyx_result.required = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_SimpleField(__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("apischema.serialization.methods.__pyx_unpickle_SimpleField", __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_SimpleField__set_state(<SimpleField> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SimpleField__set_state(SimpleField __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.method = __pyx_state[2]; __pyx_result.name = __pyx_state[3]; __pyx_result.required = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_SimpleField__set_state(struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SimpleField__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_SimpleField__set_state(SimpleField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.method = __pyx_state[2]; __pyx_result.name = __pyx_state[3]; __pyx_result.required = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.alias);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.alias);
  __pyx_v___pyx_result->__pyx_base.alias = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->method));
  __pyx_v___pyx_result->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.name);
  __pyx_v___pyx_result->__pyx_base.name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.required = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_SimpleField__set_state(SimpleField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.method = __pyx_state[2]; __pyx_result.name = __pyx_state[3]; __pyx_result.required = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 5) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.method = __pyx_state[2]; __pyx_result.name = __pyx_state[3]; __pyx_result.required = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_SimpleField__set_state(SimpleField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.method = __pyx_state[2]; __pyx_result.name = __pyx_state[3]; __pyx_result.required = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_SimpleField__set_state(<SimpleField> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SimpleField__set_state(SimpleField __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.method = __pyx_state[2]; __pyx_result.name = __pyx_state[3]; __pyx_result.required = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_SimpleField__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_ComplexField(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_55__pyx_unpickle_ComplexField(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_55__pyx_unpickle_ComplexField = {"__pyx_unpickle_ComplexField", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_55__pyx_unpickle_ComplexField, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_55__pyx_unpickle_ComplexField(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_ComplexField (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_ComplexField", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ComplexField", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ComplexField") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ComplexField", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_ComplexField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_54__pyx_unpickle_ComplexField(__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_9apischema_13serialization_7methods_54__pyx_unpickle_ComplexField(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ComplexField", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xd48703b:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd48703b = (_dispatch, alias, default_value, method, name, required, skip_default, skip_if, skip_none, skippable, undefined))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd48703b) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xd48703b:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd48703b = (_dispatch, alias, default_value, method, name, required, skip_default, skip_if, skip_none, skippable, undefined))" % __pyx_checksum)
 *     __pyx_result = ComplexField.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xd48703b:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd48703b = (_dispatch, alias, default_value, method, name, required, skip_default, skip_if, skip_none, skippable, undefined))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = ComplexField.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xd48703b:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd48703b = (_dispatch, alias, default_value, method, name, required, skip_default, skip_if, skip_none, skippable, undefined))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd48703b = (_dispatch, alias, default_value, method, name, required, skip_default, skip_if, skip_none, skippable, undefined))" % __pyx_checksum)
 *     __pyx_result = ComplexField.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ComplexField__set_state(<ComplexField> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_ComplexField), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xd48703b = (_dispatch, alias, default_value, method, name, required, skip_default, skip_if, skip_none, skippable, undefined))" % __pyx_checksum)
 *     __pyx_result = ComplexField.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ComplexField__set_state(<ComplexField> __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 = ComplexField.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ComplexField__set_state(<ComplexField> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_ComplexField__set_state(ComplexField __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ComplexField__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xd48703b = (_dispatch, alias, default_value, method, name, required, skip_default, skip_if, skip_none, skippable, undefined))" % __pyx_checksum)
 *     __pyx_result = ComplexField.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ComplexField__set_state(<ComplexField> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ComplexField__set_state(<ComplexField> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_ComplexField__set_state(ComplexField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.default_value = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.required = __pyx_state[5]; __pyx_result.skip_default = __pyx_state[6]; __pyx_result.skip_if = __pyx_state[7]; __pyx_result.skip_none = __pyx_state[8]; __pyx_result.skippable = __pyx_state[9]; __pyx_result.undefined = __pyx_state[10]
 */
  __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_ComplexField(__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("apischema.serialization.methods.__pyx_unpickle_ComplexField", __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_ComplexField__set_state(<ComplexField> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ComplexField__set_state(ComplexField __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.default_value = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.required = __pyx_state[5]; __pyx_result.skip_default = __pyx_state[6]; __pyx_result.skip_if = __pyx_state[7]; __pyx_result.skip_none = __pyx_state[8]; __pyx_result.skippable = __pyx_state[9]; __pyx_result.undefined = __pyx_state[10]
 *     if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ComplexField__set_state(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ComplexField__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_ComplexField__set_state(ComplexField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.default_value = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.required = __pyx_state[5]; __pyx_result.skip_default = __pyx_state[6]; __pyx_result.skip_if = __pyx_state[7]; __pyx_result.skip_none = __pyx_state[8]; __pyx_result.skippable = __pyx_state[9]; __pyx_result.undefined = __pyx_state[10]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[11])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.alias);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.alias);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.alias = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->default_value);
  __Pyx_DECREF(__pyx_v___pyx_result->default_value);
  __pyx_v___pyx_result->default_value = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.method));
  __pyx_v___pyx_result->__pyx_base.method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.name);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.name);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base.required = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->skip_default = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->skip_if);
  __Pyx_DECREF(__pyx_v___pyx_result->skip_if);
  __pyx_v___pyx_result->skip_if = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->skip_none = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->skippable = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->undefined = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_ComplexField__set_state(ComplexField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.default_value = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.required = __pyx_state[5]; __pyx_result.skip_default = __pyx_state[6]; __pyx_result.skip_if = __pyx_state[7]; __pyx_result.skip_none = __pyx_state[8]; __pyx_result.skippable = __pyx_state[9]; __pyx_result.undefined = __pyx_state[10]
 *     if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[11])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 11) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.default_value = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.required = __pyx_state[5]; __pyx_result.skip_default = __pyx_state[6]; __pyx_result.skip_if = __pyx_state[7]; __pyx_result.skip_none = __pyx_state[8]; __pyx_result.skippable = __pyx_state[9]; __pyx_result.undefined = __pyx_state[10]
 *     if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[11])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_ComplexField__set_state(ComplexField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.default_value = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.required = __pyx_state[5]; __pyx_result.skip_default = __pyx_state[6]; __pyx_result.skip_if = __pyx_state[7]; __pyx_result.skip_none = __pyx_state[8]; __pyx_result.skippable = __pyx_state[9]; __pyx_result.undefined = __pyx_state[10]
 *     if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[11])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_ComplexField__set_state(<ComplexField> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ComplexField__set_state(ComplexField __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.default_value = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.required = __pyx_state[5]; __pyx_result.skip_default = __pyx_state[6]; __pyx_result.skip_if = __pyx_state[7]; __pyx_result.skip_none = __pyx_state[8]; __pyx_result.skippable = __pyx_state[9]; __pyx_result.undefined = __pyx_state[10]
 *     if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_ComplexField__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_SerializedField(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_57__pyx_unpickle_SerializedField(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_57__pyx_unpickle_SerializedField = {"__pyx_unpickle_SerializedField", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_57__pyx_unpickle_SerializedField, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_57__pyx_unpickle_SerializedField(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_SerializedField (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_SerializedField", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SerializedField", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SerializedField") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SerializedField", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_SerializedField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_56__pyx_unpickle_SerializedField(__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_9apischema_13serialization_7methods_56__pyx_unpickle_SerializedField(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SerializedField", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xbcf5656:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbcf5656 = (_dispatch, alias, func, method, skip_none, undefined))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xbcf5656) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xbcf5656:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbcf5656 = (_dispatch, alias, func, method, skip_none, undefined))" % __pyx_checksum)
 *     __pyx_result = SerializedField.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xbcf5656:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbcf5656 = (_dispatch, alias, func, method, skip_none, undefined))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = SerializedField.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xbc, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xbcf5656:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbcf5656 = (_dispatch, alias, func, method, skip_none, undefined))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xbcf5656 = (_dispatch, alias, func, method, skip_none, undefined))" % __pyx_checksum)
 *     __pyx_result = SerializedField.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SerializedField__set_state(<SerializedField> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_SerializedField), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xbcf5656 = (_dispatch, alias, func, method, skip_none, undefined))" % __pyx_checksum)
 *     __pyx_result = SerializedField.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SerializedField__set_state(<SerializedField> __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 = SerializedField.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SerializedField__set_state(<SerializedField> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_SerializedField__set_state(SerializedField __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_SerializedField__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xbcf5656 = (_dispatch, alias, func, method, skip_none, undefined))" % __pyx_checksum)
 *     __pyx_result = SerializedField.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SerializedField__set_state(<SerializedField> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SerializedField__set_state(<SerializedField> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_SerializedField__set_state(SerializedField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.func = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.skip_none = __pyx_state[4]; __pyx_result.undefined = __pyx_state[5]
 */
  __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_SerializedField(__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("apischema.serialization.methods.__pyx_unpickle_SerializedField", __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_SerializedField__set_state(<SerializedField> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SerializedField__set_state(SerializedField __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.func = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.skip_none = __pyx_state[4]; __pyx_result.undefined = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_SerializedField__set_state(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SerializedField__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_SerializedField__set_state(SerializedField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.func = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.skip_none = __pyx_state[4]; __pyx_result.undefined = __pyx_state[5]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[6])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->alias);
  __Pyx_DECREF(__pyx_v___pyx_result->alias);
  __pyx_v___pyx_result->alias = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->func);
  __Pyx_DECREF(__pyx_v___pyx_result->func);
  __pyx_v___pyx_result->func = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->method));
  __pyx_v___pyx_result->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->skip_none = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->undefined = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_SerializedField__set_state(SerializedField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.func = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.skip_none = __pyx_state[4]; __pyx_result.undefined = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[6])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 6) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.func = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.skip_none = __pyx_state[4]; __pyx_result.undefined = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[6])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_SerializedField__set_state(SerializedField __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.func = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.skip_none = __pyx_state[4]; __pyx_result.undefined = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[6])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_SerializedField__set_state(<SerializedField> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SerializedField__set_state(SerializedField __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.func = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.skip_none = __pyx_state[4]; __pyx_result.undefined = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_SerializedField__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_ObjectMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_59__pyx_unpickle_ObjectMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_59__pyx_unpickle_ObjectMethod = {"__pyx_unpickle_ObjectMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_59__pyx_unpickle_ObjectMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_59__pyx_unpickle_ObjectMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_ObjectMethod (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_ObjectMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ObjectMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ObjectMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ObjectMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_ObjectMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_58__pyx_unpickle_ObjectMethod(__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_9apischema_13serialization_7methods_58__pyx_unpickle_ObjectMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ObjectMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdbd921c:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xdbd921c) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdbd921c:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = ObjectMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xdbd921c:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = ObjectMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xdb, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdbd921c:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = ObjectMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ObjectMethod__set_state(<ObjectMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_ObjectMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = ObjectMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ObjectMethod__set_state(<ObjectMethod> __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 = ObjectMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ObjectMethod__set_state(<ObjectMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_ObjectMethod__set_state(ObjectMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ObjectMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = ObjectMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ObjectMethod__set_state(<ObjectMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ObjectMethod__set_state(<ObjectMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_ObjectMethod__set_state(ObjectMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ObjectMethod(__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("apischema.serialization.methods.__pyx_unpickle_ObjectMethod", __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_ObjectMethod__set_state(<ObjectMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ObjectMethod__set_state(ObjectMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ObjectMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ObjectMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_ObjectMethod__set_state(ObjectMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->fields);
  __Pyx_DECREF(__pyx_v___pyx_result->fields);
  __pyx_v___pyx_result->fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_ObjectMethod__set_state(ObjectMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_ObjectMethod__set_state(ObjectMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_ObjectMethod__set_state(<ObjectMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ObjectMethod__set_state(ObjectMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_ObjectMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_ClassMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_61__pyx_unpickle_ClassMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_61__pyx_unpickle_ClassMethod = {"__pyx_unpickle_ClassMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_61__pyx_unpickle_ClassMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_61__pyx_unpickle_ClassMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_ClassMethod (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_ClassMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ClassMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ClassMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ClassMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_ClassMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_60__pyx_unpickle_ClassMethod(__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_9apischema_13serialization_7methods_60__pyx_unpickle_ClassMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ClassMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdbd921c:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xdbd921c) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdbd921c:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = ClassMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xdbd921c:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = ClassMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xdb, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdbd921c:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = ClassMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ClassMethod__set_state(<ClassMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_ClassMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = ClassMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ClassMethod__set_state(<ClassMethod> __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 = ClassMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ClassMethod__set_state(<ClassMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_ClassMethod__set_state(ClassMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ClassMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = ClassMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ClassMethod__set_state(<ClassMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ClassMethod__set_state(<ClassMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_ClassMethod__set_state(ClassMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ClassMethod(__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("apischema.serialization.methods.__pyx_unpickle_ClassMethod", __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_ClassMethod__set_state(<ClassMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ClassMethod__set_state(ClassMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ClassMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ClassMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_ClassMethod__set_state(ClassMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.fields);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.fields);
  __pyx_v___pyx_result->__pyx_base.fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_ClassMethod__set_state(ClassMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_ClassMethod__set_state(ClassMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_ClassMethod__set_state(<ClassMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ClassMethod__set_state(ClassMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_ClassMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_ClassWithFieldsSetMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_63__pyx_unpickle_ClassWithFieldsSetMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_63__pyx_unpickle_ClassWithFieldsSetMethod = {"__pyx_unpickle_ClassWithFieldsSetMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_63__pyx_unpickle_ClassWithFieldsSetMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_63__pyx_unpickle_ClassWithFieldsSetMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_ClassWithFieldsSetMethod (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_ClassWithFieldsSetMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ClassWithFieldsSetMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ClassWithFieldsSetMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ClassWithFieldsSetMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_ClassWithFieldsSetMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_62__pyx_unpickle_ClassWithFieldsSetMethod(__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_9apischema_13serialization_7methods_62__pyx_unpickle_ClassWithFieldsSetMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ClassWithFieldsSetMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdbd921c:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xdbd921c) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdbd921c:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = ClassWithFieldsSetMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xdbd921c:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = ClassWithFieldsSetMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xdb, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdbd921c:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = ClassWithFieldsSetMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ClassWithFieldsSetMethod__set_state(<ClassWithFieldsSetMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_ClassWithFieldsSetMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = ClassWithFieldsSetMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ClassWithFieldsSetMethod__set_state(<ClassWithFieldsSetMethod> __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 = ClassWithFieldsSetMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ClassWithFieldsSetMethod__set_state(<ClassWithFieldsSetMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_ClassWithFieldsSetMethod__set_state(ClassWithFieldsSetMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ClassWithFieldsSetMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = ClassWithFieldsSetMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ClassWithFieldsSetMethod__set_state(<ClassWithFieldsSetMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ClassWithFieldsSetMethod__set_state(<ClassWithFieldsSetMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_ClassWithFieldsSetMethod__set_state(ClassWithFieldsSetMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ClassWithFieldsSetMethod(__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("apischema.serialization.methods.__pyx_unpickle_ClassWithFieldsSetMethod", __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_ClassWithFieldsSetMethod__set_state(<ClassWithFieldsSetMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ClassWithFieldsSetMethod__set_state(ClassWithFieldsSetMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ClassWithFieldsSetMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ClassWithFieldsSetMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_ClassWithFieldsSetMethod__set_state(ClassWithFieldsSetMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.fields);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.fields);
  __pyx_v___pyx_result->__pyx_base.fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_ClassWithFieldsSetMethod__set_state(ClassWithFieldsSetMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_ClassWithFieldsSetMethod__set_state(ClassWithFieldsSetMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_ClassWithFieldsSetMethod__set_state(<ClassWithFieldsSetMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ClassWithFieldsSetMethod__set_state(ClassWithFieldsSetMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_ClassWithFieldsSetMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TypedDictMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_65__pyx_unpickle_TypedDictMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_65__pyx_unpickle_TypedDictMethod = {"__pyx_unpickle_TypedDictMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_65__pyx_unpickle_TypedDictMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_65__pyx_unpickle_TypedDictMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TypedDictMethod (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_TypedDictMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TypedDictMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_TypedDictMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TypedDictMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_TypedDictMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_64__pyx_unpickle_TypedDictMethod(__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_9apischema_13serialization_7methods_64__pyx_unpickle_TypedDictMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TypedDictMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdbd921c:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xdbd921c) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdbd921c:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = TypedDictMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xdbd921c:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = TypedDictMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xdb, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdbd921c:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = TypedDictMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TypedDictMethod__set_state(<TypedDictMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_TypedDictMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = TypedDictMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TypedDictMethod__set_state(<TypedDictMethod> __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 = TypedDictMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TypedDictMethod__set_state(<TypedDictMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TypedDictMethod__set_state(TypedDictMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TypedDictMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xdbd921c = (_dispatch, fields))" % __pyx_checksum)
 *     __pyx_result = TypedDictMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TypedDictMethod__set_state(<TypedDictMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TypedDictMethod__set_state(<TypedDictMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TypedDictMethod__set_state(TypedDictMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TypedDictMethod(__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("apischema.serialization.methods.__pyx_unpickle_TypedDictMethod", __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_TypedDictMethod__set_state(<TypedDictMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TypedDictMethod__set_state(TypedDictMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TypedDictMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TypedDictMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TypedDictMethod__set_state(TypedDictMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.fields);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.fields);
  __pyx_v___pyx_result->__pyx_base.fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TypedDictMethod__set_state(TypedDictMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TypedDictMethod__set_state(TypedDictMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TypedDictMethod__set_state(<TypedDictMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TypedDictMethod__set_state(TypedDictMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_TypedDictMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TypedDictWithAdditionalMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_67__pyx_unpickle_TypedDictWithAdditionalMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_67__pyx_unpickle_TypedDictWithAdditionalMethod = {"__pyx_unpickle_TypedDictWithAdditionalMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_67__pyx_unpickle_TypedDictWithAdditionalMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_67__pyx_unpickle_TypedDictWithAdditionalMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TypedDictWithAdditionalMethod (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_TypedDictWithAdditionalMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TypedDictWithAdditionalMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_TypedDictWithAdditionalMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TypedDictWithAdditionalMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_TypedDictWithAdditionalMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_66__pyx_unpickle_TypedDictWithAdditionalMethod(__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_9apischema_13serialization_7methods_66__pyx_unpickle_TypedDictWithAdditionalMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TypedDictWithAdditionalMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb99ff26:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb99ff26 = (_dispatch, any_method, field_names, fields))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb99ff26) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb99ff26:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb99ff26 = (_dispatch, any_method, field_names, fields))" % __pyx_checksum)
 *     __pyx_result = TypedDictWithAdditionalMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xb99ff26:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb99ff26 = (_dispatch, any_method, field_names, fields))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = TypedDictWithAdditionalMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb9, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb99ff26:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb99ff26 = (_dispatch, any_method, field_names, fields))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb99ff26 = (_dispatch, any_method, field_names, fields))" % __pyx_checksum)
 *     __pyx_result = TypedDictWithAdditionalMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TypedDictWithAdditionalMethod__set_state(<TypedDictWithAdditionalMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xb99ff26 = (_dispatch, any_method, field_names, fields))" % __pyx_checksum)
 *     __pyx_result = TypedDictWithAdditionalMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TypedDictWithAdditionalMethod__set_state(<TypedDictWithAdditionalMethod> __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 = TypedDictWithAdditionalMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TypedDictWithAdditionalMethod__set_state(<TypedDictWithAdditionalMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TypedDictWithAdditionalMethod__set_state(TypedDictWithAdditionalMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TypedDictWithAdditionalMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xb99ff26 = (_dispatch, any_method, field_names, fields))" % __pyx_checksum)
 *     __pyx_result = TypedDictWithAdditionalMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TypedDictWithAdditionalMethod__set_state(<TypedDictWithAdditionalMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TypedDictWithAdditionalMethod__set_state(<TypedDictWithAdditionalMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TypedDictWithAdditionalMethod__set_state(TypedDictWithAdditionalMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]; __pyx_result.field_names = __pyx_state[2]; __pyx_result.fields = __pyx_state[3]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TypedDictWithAdditionalMethod(__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("apischema.serialization.methods.__pyx_unpickle_TypedDictWithAdditionalMethod", __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_TypedDictWithAdditionalMethod__set_state(<TypedDictWithAdditionalMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TypedDictWithAdditionalMethod__set_state(TypedDictWithAdditionalMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]; __pyx_result.field_names = __pyx_state[2]; __pyx_result.fields = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TypedDictWithAdditionalMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TypedDictWithAdditionalMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TypedDictWithAdditionalMethod__set_state(TypedDictWithAdditionalMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]; __pyx_result.field_names = __pyx_state[2]; __pyx_result.fields = __pyx_state[3]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->any_method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->any_method));
  __pyx_v___pyx_result->any_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->field_names);
  __Pyx_DECREF(__pyx_v___pyx_result->field_names);
  __pyx_v___pyx_result->field_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.fields);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.fields);
  __pyx_v___pyx_result->__pyx_base.__pyx_base.fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TypedDictWithAdditionalMethod__set_state(TypedDictWithAdditionalMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]; __pyx_result.field_names = __pyx_state[2]; __pyx_result.fields = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 4) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]; __pyx_result.field_names = __pyx_state[2]; __pyx_result.fields = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TypedDictWithAdditionalMethod__set_state(TypedDictWithAdditionalMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]; __pyx_result.field_names = __pyx_state[2]; __pyx_result.fields = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TypedDictWithAdditionalMethod__set_state(<TypedDictWithAdditionalMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TypedDictWithAdditionalMethod__set_state(TypedDictWithAdditionalMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.any_method = __pyx_state[1]; __pyx_result.field_names = __pyx_state[2]; __pyx_result.fields = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_TypedDictWithAdditionalMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TupleCheckOnlyMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_69__pyx_unpickle_TupleCheckOnlyMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_69__pyx_unpickle_TupleCheckOnlyMethod = {"__pyx_unpickle_TupleCheckOnlyMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_69__pyx_unpickle_TupleCheckOnlyMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_69__pyx_unpickle_TupleCheckOnlyMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleCheckOnlyMethod (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_TupleCheckOnlyMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TupleCheckOnlyMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_TupleCheckOnlyMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TupleCheckOnlyMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_TupleCheckOnlyMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_68__pyx_unpickle_TupleCheckOnlyMethod(__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_9apischema_13serialization_7methods_68__pyx_unpickle_TupleCheckOnlyMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleCheckOnlyMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x2180c5e:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2180c5e = (_dispatch, elt_methods))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x2180c5e) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x2180c5e:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2180c5e = (_dispatch, elt_methods))" % __pyx_checksum)
 *     __pyx_result = TupleCheckOnlyMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x2180c5e:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2180c5e = (_dispatch, elt_methods))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = TupleCheckOnlyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x21, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x2180c5e:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2180c5e = (_dispatch, elt_methods))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2180c5e = (_dispatch, elt_methods))" % __pyx_checksum)
 *     __pyx_result = TupleCheckOnlyMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TupleCheckOnlyMethod__set_state(<TupleCheckOnlyMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_TupleCheckOnlyMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x2180c5e = (_dispatch, elt_methods))" % __pyx_checksum)
 *     __pyx_result = TupleCheckOnlyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TupleCheckOnlyMethod__set_state(<TupleCheckOnlyMethod> __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 = TupleCheckOnlyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TupleCheckOnlyMethod__set_state(<TupleCheckOnlyMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleCheckOnlyMethod__set_state(TupleCheckOnlyMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TupleCheckOnlyMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x2180c5e = (_dispatch, elt_methods))" % __pyx_checksum)
 *     __pyx_result = TupleCheckOnlyMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TupleCheckOnlyMethod__set_state(<TupleCheckOnlyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TupleCheckOnlyMethod__set_state(<TupleCheckOnlyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TupleCheckOnlyMethod__set_state(TupleCheckOnlyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.elt_methods = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TupleCheckOnlyMethod(__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("apischema.serialization.methods.__pyx_unpickle_TupleCheckOnlyMethod", __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_TupleCheckOnlyMethod__set_state(<TupleCheckOnlyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleCheckOnlyMethod__set_state(TupleCheckOnlyMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.elt_methods = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TupleCheckOnlyMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleCheckOnlyMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleCheckOnlyMethod__set_state(TupleCheckOnlyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.elt_methods = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->elt_methods);
  __Pyx_DECREF(__pyx_v___pyx_result->elt_methods);
  __pyx_v___pyx_result->elt_methods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TupleCheckOnlyMethod__set_state(TupleCheckOnlyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.elt_methods = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.elt_methods = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TupleCheckOnlyMethod__set_state(TupleCheckOnlyMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.elt_methods = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TupleCheckOnlyMethod__set_state(<TupleCheckOnlyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleCheckOnlyMethod__set_state(TupleCheckOnlyMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.elt_methods = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_TupleCheckOnlyMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TupleMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_71__pyx_unpickle_TupleMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_71__pyx_unpickle_TupleMethod = {"__pyx_unpickle_TupleMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_71__pyx_unpickle_TupleMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_71__pyx_unpickle_TupleMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleMethod (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_TupleMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TupleMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_TupleMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TupleMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_TupleMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_70__pyx_unpickle_TupleMethod(__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_9apischema_13serialization_7methods_70__pyx_unpickle_TupleMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x2180c5e:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2180c5e = (_dispatch, elt_methods))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x2180c5e) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x2180c5e:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2180c5e = (_dispatch, elt_methods))" % __pyx_checksum)
 *     __pyx_result = TupleMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x2180c5e:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2180c5e = (_dispatch, elt_methods))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = TupleMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x21, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x2180c5e:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2180c5e = (_dispatch, elt_methods))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2180c5e = (_dispatch, elt_methods))" % __pyx_checksum)
 *     __pyx_result = TupleMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TupleMethod__set_state(<TupleMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_TupleMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x2180c5e = (_dispatch, elt_methods))" % __pyx_checksum)
 *     __pyx_result = TupleMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TupleMethod__set_state(<TupleMethod> __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 = TupleMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TupleMethod__set_state(<TupleMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleMethod__set_state(TupleMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TupleMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x2180c5e = (_dispatch, elt_methods))" % __pyx_checksum)
 *     __pyx_result = TupleMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TupleMethod__set_state(<TupleMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TupleMethod__set_state(<TupleMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TupleMethod__set_state(TupleMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.elt_methods = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TupleMethod(__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("apischema.serialization.methods.__pyx_unpickle_TupleMethod", __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_TupleMethod__set_state(<TupleMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleMethod__set_state(TupleMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.elt_methods = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_TupleMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleMethod__set_state(TupleMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.elt_methods = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->elt_methods);
  __Pyx_DECREF(__pyx_v___pyx_result->elt_methods);
  __pyx_v___pyx_result->elt_methods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TupleMethod__set_state(TupleMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.elt_methods = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.elt_methods = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TupleMethod__set_state(TupleMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.elt_methods = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TupleMethod__set_state(<TupleMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleMethod__set_state(TupleMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.elt_methods = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_TupleMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_CheckedTupleMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_73__pyx_unpickle_CheckedTupleMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_73__pyx_unpickle_CheckedTupleMethod = {"__pyx_unpickle_CheckedTupleMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_73__pyx_unpickle_CheckedTupleMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_73__pyx_unpickle_CheckedTupleMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_CheckedTupleMethod (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_CheckedTupleMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CheckedTupleMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CheckedTupleMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CheckedTupleMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_CheckedTupleMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_72__pyx_unpickle_CheckedTupleMethod(__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_9apischema_13serialization_7methods_72__pyx_unpickle_CheckedTupleMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CheckedTupleMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x336f605:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x336f605 = (_dispatch, method, nb_elts))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x336f605) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x336f605:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x336f605 = (_dispatch, method, nb_elts))" % __pyx_checksum)
 *     __pyx_result = CheckedTupleMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x336f605:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x336f605 = (_dispatch, method, nb_elts))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CheckedTupleMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x33, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x336f605:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x336f605 = (_dispatch, method, nb_elts))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x336f605 = (_dispatch, method, nb_elts))" % __pyx_checksum)
 *     __pyx_result = CheckedTupleMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CheckedTupleMethod__set_state(<CheckedTupleMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_CheckedTupleMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x336f605 = (_dispatch, method, nb_elts))" % __pyx_checksum)
 *     __pyx_result = CheckedTupleMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CheckedTupleMethod__set_state(<CheckedTupleMethod> __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 = CheckedTupleMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CheckedTupleMethod__set_state(<CheckedTupleMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_CheckedTupleMethod__set_state(CheckedTupleMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_CheckedTupleMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x336f605 = (_dispatch, method, nb_elts))" % __pyx_checksum)
 *     __pyx_result = CheckedTupleMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CheckedTupleMethod__set_state(<CheckedTupleMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CheckedTupleMethod__set_state(<CheckedTupleMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_CheckedTupleMethod__set_state(CheckedTupleMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.method = __pyx_state[1]; __pyx_result.nb_elts = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CheckedTupleMethod(__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("apischema.serialization.methods.__pyx_unpickle_CheckedTupleMethod", __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_CheckedTupleMethod__set_state(<CheckedTupleMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CheckedTupleMethod__set_state(CheckedTupleMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.method = __pyx_state[1]; __pyx_result.nb_elts = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_CheckedTupleMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  long __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CheckedTupleMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_CheckedTupleMethod__set_state(CheckedTupleMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.method = __pyx_state[1]; __pyx_result.nb_elts = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->method));
  __pyx_v___pyx_result->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->nb_elts = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_CheckedTupleMethod__set_state(CheckedTupleMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.method = __pyx_state[1]; __pyx_result.nb_elts = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_5 > 3) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_4 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.method = __pyx_state[1]; __pyx_result.nb_elts = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __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_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_CheckedTupleMethod__set_state(CheckedTupleMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.method = __pyx_state[1]; __pyx_result.nb_elts = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_CheckedTupleMethod__set_state(<CheckedTupleMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CheckedTupleMethod__set_state(CheckedTupleMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.method = __pyx_state[1]; __pyx_result.nb_elts = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_CheckedTupleMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_OptionalMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_75__pyx_unpickle_OptionalMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_75__pyx_unpickle_OptionalMethod = {"__pyx_unpickle_OptionalMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_75__pyx_unpickle_OptionalMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_75__pyx_unpickle_OptionalMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_OptionalMethod (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_OptionalMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_OptionalMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_OptionalMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_OptionalMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_OptionalMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_74__pyx_unpickle_OptionalMethod(__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_9apischema_13serialization_7methods_74__pyx_unpickle_OptionalMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_OptionalMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x6f73d86:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x6f73d86) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x6f73d86:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 *     __pyx_result = OptionalMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x6f73d86:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = OptionalMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x6f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x6f73d86:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 *     __pyx_result = OptionalMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_OptionalMethod__set_state(<OptionalMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_OptionalMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 *     __pyx_result = OptionalMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_OptionalMethod__set_state(<OptionalMethod> __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 = OptionalMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_OptionalMethod__set_state(<OptionalMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_OptionalMethod__set_state(OptionalMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_OptionalMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x6f73d86 = (_dispatch, value_method))" % __pyx_checksum)
 *     __pyx_result = OptionalMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_OptionalMethod__set_state(<OptionalMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_OptionalMethod__set_state(<OptionalMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_OptionalMethod__set_state(OptionalMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_OptionalMethod(__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("apischema.serialization.methods.__pyx_unpickle_OptionalMethod", __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_OptionalMethod__set_state(<OptionalMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_OptionalMethod__set_state(OptionalMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_OptionalMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_OptionalMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_OptionalMethod__set_state(OptionalMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->value_method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->value_method));
  __pyx_v___pyx_result->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_OptionalMethod__set_state(OptionalMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_OptionalMethod__set_state(OptionalMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_OptionalMethod__set_state(<OptionalMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_OptionalMethod__set_state(OptionalMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_OptionalMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_UnionAlternative(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_77__pyx_unpickle_UnionAlternative(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_77__pyx_unpickle_UnionAlternative = {"__pyx_unpickle_UnionAlternative", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_77__pyx_unpickle_UnionAlternative, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_77__pyx_unpickle_UnionAlternative(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_UnionAlternative (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_UnionAlternative", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_UnionAlternative", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_UnionAlternative") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_UnionAlternative", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_UnionAlternative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_76__pyx_unpickle_UnionAlternative(__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_9apischema_13serialization_7methods_76__pyx_unpickle_UnionAlternative(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_UnionAlternative", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xa61373f:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xa61373f = (_dispatch, cls, method))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xa61373f) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xa61373f:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xa61373f = (_dispatch, cls, method))" % __pyx_checksum)
 *     __pyx_result = UnionAlternative.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xa61373f:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xa61373f = (_dispatch, cls, method))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = UnionAlternative.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xa6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xa61373f:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xa61373f = (_dispatch, cls, method))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xa61373f = (_dispatch, cls, method))" % __pyx_checksum)
 *     __pyx_result = UnionAlternative.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_UnionAlternative__set_state(<UnionAlternative> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_UnionAlternative), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xa61373f = (_dispatch, cls, method))" % __pyx_checksum)
 *     __pyx_result = UnionAlternative.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_UnionAlternative__set_state(<UnionAlternative> __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 = UnionAlternative.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_UnionAlternative__set_state(<UnionAlternative> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_UnionAlternative__set_state(UnionAlternative __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_UnionAlternative__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xa61373f = (_dispatch, cls, method))" % __pyx_checksum)
 *     __pyx_result = UnionAlternative.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_UnionAlternative__set_state(<UnionAlternative> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_UnionAlternative__set_state(<UnionAlternative> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_UnionAlternative__set_state(UnionAlternative __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_UnionAlternative(__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("apischema.serialization.methods.__pyx_unpickle_UnionAlternative", __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_UnionAlternative__set_state(<UnionAlternative> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_UnionAlternative__set_state(UnionAlternative __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_UnionAlternative__set_state(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_UnionAlternative__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_UnionAlternative__set_state(UnionAlternative __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]; __pyx_result.method = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->cls);
  __Pyx_DECREF(__pyx_v___pyx_result->cls);
  __pyx_v___pyx_result->cls = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->method));
  __pyx_v___pyx_result->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_UnionAlternative__set_state(UnionAlternative __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 3) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_UnionAlternative__set_state(UnionAlternative __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_UnionAlternative__set_state(<UnionAlternative> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_UnionAlternative__set_state(UnionAlternative __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_UnionAlternative__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DiscriminatedAlternative(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_79__pyx_unpickle_DiscriminatedAlternative(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_79__pyx_unpickle_DiscriminatedAlternative = {"__pyx_unpickle_DiscriminatedAlternative", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_79__pyx_unpickle_DiscriminatedAlternative, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_79__pyx_unpickle_DiscriminatedAlternative(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_DiscriminatedAlternative (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_DiscriminatedAlternative", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DiscriminatedAlternative", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DiscriminatedAlternative") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DiscriminatedAlternative", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_DiscriminatedAlternative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_78__pyx_unpickle_DiscriminatedAlternative(__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_9apischema_13serialization_7methods_78__pyx_unpickle_DiscriminatedAlternative(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DiscriminatedAlternative", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xae0e92f:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xae0e92f = (_dispatch, alias, cls, key, method))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xae0e92f) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xae0e92f:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xae0e92f = (_dispatch, alias, cls, key, method))" % __pyx_checksum)
 *     __pyx_result = DiscriminatedAlternative.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xae0e92f:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xae0e92f = (_dispatch, alias, cls, key, method))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = DiscriminatedAlternative.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xae, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xae0e92f:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xae0e92f = (_dispatch, alias, cls, key, method))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xae0e92f = (_dispatch, alias, cls, key, method))" % __pyx_checksum)
 *     __pyx_result = DiscriminatedAlternative.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DiscriminatedAlternative__set_state(<DiscriminatedAlternative> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_DiscriminatedAlternative), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xae0e92f = (_dispatch, alias, cls, key, method))" % __pyx_checksum)
 *     __pyx_result = DiscriminatedAlternative.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DiscriminatedAlternative__set_state(<DiscriminatedAlternative> __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 = DiscriminatedAlternative.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DiscriminatedAlternative__set_state(<DiscriminatedAlternative> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DiscriminatedAlternative__set_state(DiscriminatedAlternative __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_DiscriminatedAlternative__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xae0e92f = (_dispatch, alias, cls, key, method))" % __pyx_checksum)
 *     __pyx_result = DiscriminatedAlternative.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DiscriminatedAlternative__set_state(<DiscriminatedAlternative> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DiscriminatedAlternative__set_state(<DiscriminatedAlternative> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DiscriminatedAlternative__set_state(DiscriminatedAlternative __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.key = __pyx_state[3]; __pyx_result.method = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DiscriminatedAlternative(__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("apischema.serialization.methods.__pyx_unpickle_DiscriminatedAlternative", __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_DiscriminatedAlternative__set_state(<DiscriminatedAlternative> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DiscriminatedAlternative__set_state(DiscriminatedAlternative __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.key = __pyx_state[3]; __pyx_result.method = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_DiscriminatedAlternative__set_state(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DiscriminatedAlternative__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DiscriminatedAlternative__set_state(DiscriminatedAlternative __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.key = __pyx_state[3]; __pyx_result.method = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base.__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->alias);
  __Pyx_DECREF(__pyx_v___pyx_result->alias);
  __pyx_v___pyx_result->alias = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.cls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.cls);
  __pyx_v___pyx_result->__pyx_base.cls = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->key);
  __Pyx_DECREF(__pyx_v___pyx_result->key);
  __pyx_v___pyx_result->key = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.method));
  __pyx_v___pyx_result->__pyx_base.method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_DiscriminatedAlternative__set_state(DiscriminatedAlternative __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.key = __pyx_state[3]; __pyx_result.method = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 5) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.key = __pyx_state[3]; __pyx_result.method = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DiscriminatedAlternative__set_state(DiscriminatedAlternative __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.key = __pyx_state[3]; __pyx_result.method = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DiscriminatedAlternative__set_state(<DiscriminatedAlternative> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DiscriminatedAlternative__set_state(DiscriminatedAlternative __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.cls = __pyx_state[2]; __pyx_result.key = __pyx_state[3]; __pyx_result.method = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_DiscriminatedAlternative__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_UnionMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_81__pyx_unpickle_UnionMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_81__pyx_unpickle_UnionMethod = {"__pyx_unpickle_UnionMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_81__pyx_unpickle_UnionMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_81__pyx_unpickle_UnionMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_UnionMethod (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_UnionMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_UnionMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_UnionMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_UnionMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_UnionMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_80__pyx_unpickle_UnionMethod(__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_9apischema_13serialization_7methods_80__pyx_unpickle_UnionMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_UnionMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdfc9cea:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdfc9cea = (_dispatch, alternatives, fallback))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xdfc9cea) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdfc9cea:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdfc9cea = (_dispatch, alternatives, fallback))" % __pyx_checksum)
 *     __pyx_result = UnionMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xdfc9cea:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdfc9cea = (_dispatch, alternatives, fallback))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = UnionMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xdf, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xdfc9cea:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdfc9cea = (_dispatch, alternatives, fallback))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xdfc9cea = (_dispatch, alternatives, fallback))" % __pyx_checksum)
 *     __pyx_result = UnionMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_UnionMethod__set_state(<UnionMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_UnionMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xdfc9cea = (_dispatch, alternatives, fallback))" % __pyx_checksum)
 *     __pyx_result = UnionMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_UnionMethod__set_state(<UnionMethod> __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 = UnionMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_UnionMethod__set_state(<UnionMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_UnionMethod__set_state(UnionMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_UnionMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xdfc9cea = (_dispatch, alternatives, fallback))" % __pyx_checksum)
 *     __pyx_result = UnionMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_UnionMethod__set_state(<UnionMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_UnionMethod__set_state(<UnionMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_UnionMethod__set_state(UnionMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alternatives = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_UnionMethod(__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("apischema.serialization.methods.__pyx_unpickle_UnionMethod", __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_UnionMethod__set_state(<UnionMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_UnionMethod__set_state(UnionMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alternatives = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_UnionMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_UnionMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_UnionMethod__set_state(UnionMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alternatives = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->alternatives);
  __Pyx_DECREF(__pyx_v___pyx_result->alternatives);
  __pyx_v___pyx_result->alternatives = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_Fallback))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->fallback);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->fallback));
  __pyx_v___pyx_result->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_UnionMethod__set_state(UnionMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alternatives = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 3) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alternatives = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_UnionMethod__set_state(UnionMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alternatives = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_UnionMethod__set_state(<UnionMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_UnionMethod__set_state(UnionMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alternatives = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_UnionMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_WrapperMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_83__pyx_unpickle_WrapperMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_83__pyx_unpickle_WrapperMethod = {"__pyx_unpickle_WrapperMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_83__pyx_unpickle_WrapperMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_83__pyx_unpickle_WrapperMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_WrapperMethod (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_WrapperMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_WrapperMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_WrapperMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_WrapperMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_WrapperMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_82__pyx_unpickle_WrapperMethod(__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_9apischema_13serialization_7methods_82__pyx_unpickle_WrapperMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_WrapperMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x0b01ca9:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x0b01ca9 = (_dispatch, wrapped))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0b01ca9) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x0b01ca9:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x0b01ca9 = (_dispatch, wrapped))" % __pyx_checksum)
 *     __pyx_result = WrapperMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0x0b01ca9:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x0b01ca9 = (_dispatch, wrapped))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = WrapperMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x0b, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x0b01ca9:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x0b01ca9 = (_dispatch, wrapped))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x0b01ca9 = (_dispatch, wrapped))" % __pyx_checksum)
 *     __pyx_result = WrapperMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_WrapperMethod__set_state(<WrapperMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_WrapperMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0x0b01ca9 = (_dispatch, wrapped))" % __pyx_checksum)
 *     __pyx_result = WrapperMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_WrapperMethod__set_state(<WrapperMethod> __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 = WrapperMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_WrapperMethod__set_state(<WrapperMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_WrapperMethod__set_state(WrapperMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_WrapperMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0x0b01ca9 = (_dispatch, wrapped))" % __pyx_checksum)
 *     __pyx_result = WrapperMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_WrapperMethod__set_state(<WrapperMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_WrapperMethod__set_state(<WrapperMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_WrapperMethod__set_state(WrapperMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.wrapped = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_WrapperMethod(__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("apischema.serialization.methods.__pyx_unpickle_WrapperMethod", __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_WrapperMethod__set_state(<WrapperMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_WrapperMethod__set_state(WrapperMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.wrapped = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_WrapperMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_WrapperMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_WrapperMethod__set_state(WrapperMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.wrapped = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->wrapped);
  __Pyx_DECREF(__pyx_v___pyx_result->wrapped);
  __pyx_v___pyx_result->wrapped = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_WrapperMethod__set_state(WrapperMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.wrapped = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 2) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.wrapped = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_WrapperMethod__set_state(WrapperMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.wrapped = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_WrapperMethod__set_state(<WrapperMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_WrapperMethod__set_state(WrapperMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.wrapped = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_WrapperMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_ConversionMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_85__pyx_unpickle_ConversionMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_85__pyx_unpickle_ConversionMethod = {"__pyx_unpickle_ConversionMethod", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_85__pyx_unpickle_ConversionMethod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_85__pyx_unpickle_ConversionMethod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_ConversionMethod (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_ConversionMethod", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ConversionMethod", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ConversionMethod") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ConversionMethod", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_ConversionMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_84__pyx_unpickle_ConversionMethod(__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_9apischema_13serialization_7methods_84__pyx_unpickle_ConversionMethod(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ConversionMethod", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xf60e9e9:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xf60e9e9 = (_dispatch, converter, method))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xf60e9e9) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xf60e9e9:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xf60e9e9 = (_dispatch, converter, method))" % __pyx_checksum)
 *     __pyx_result = ConversionMethod.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xf60e9e9:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xf60e9e9 = (_dispatch, converter, method))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = ConversionMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xf6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xf60e9e9:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xf60e9e9 = (_dispatch, converter, method))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xf60e9e9 = (_dispatch, converter, method))" % __pyx_checksum)
 *     __pyx_result = ConversionMethod.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ConversionMethod__set_state(<ConversionMethod> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_ConversionMethod), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xf60e9e9 = (_dispatch, converter, method))" % __pyx_checksum)
 *     __pyx_result = ConversionMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ConversionMethod__set_state(<ConversionMethod> __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 = ConversionMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ConversionMethod__set_state(<ConversionMethod> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_ConversionMethod__set_state(ConversionMethod __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ConversionMethod__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xf60e9e9 = (_dispatch, converter, method))" % __pyx_checksum)
 *     __pyx_result = ConversionMethod.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ConversionMethod__set_state(<ConversionMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ConversionMethod__set_state(<ConversionMethod> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_ConversionMethod__set_state(ConversionMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.converter = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ConversionMethod(__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("apischema.serialization.methods.__pyx_unpickle_ConversionMethod", __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_ConversionMethod__set_state(<ConversionMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ConversionMethod__set_state(ConversionMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.converter = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_ConversionMethod__set_state(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ConversionMethod__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_ConversionMethod__set_state(ConversionMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.converter = __pyx_state[1]; __pyx_result.method = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->converter);
  __Pyx_DECREF(__pyx_v___pyx_result->converter);
  __pyx_v___pyx_result->converter = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->method);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->method));
  __pyx_v___pyx_result->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_ConversionMethod__set_state(ConversionMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.converter = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 3) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.converter = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_ConversionMethod__set_state(ConversionMethod __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.converter = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_ConversionMethod__set_state(<ConversionMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ConversionMethod__set_state(ConversionMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.converter = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_ConversionMethod__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DiscriminateTypedDict(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9apischema_13serialization_7methods_87__pyx_unpickle_DiscriminateTypedDict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9apischema_13serialization_7methods_87__pyx_unpickle_DiscriminateTypedDict = {"__pyx_unpickle_DiscriminateTypedDict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_87__pyx_unpickle_DiscriminateTypedDict, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9apischema_13serialization_7methods_87__pyx_unpickle_DiscriminateTypedDict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_DiscriminateTypedDict (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_DiscriminateTypedDict", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DiscriminateTypedDict", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DiscriminateTypedDict") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DiscriminateTypedDict", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_DiscriminateTypedDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9apischema_13serialization_7methods_86__pyx_unpickle_DiscriminateTypedDict(__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_9apischema_13serialization_7methods_86__pyx_unpickle_DiscriminateTypedDict(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DiscriminateTypedDict", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xddc0fd7:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xddc0fd7 = (_dispatch, fallback, field_name, mapping))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xddc0fd7) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xddc0fd7:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xddc0fd7 = (_dispatch, fallback, field_name, mapping))" % __pyx_checksum)
 *     __pyx_result = DiscriminateTypedDict.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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(1, 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 != 0xddc0fd7:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xddc0fd7 = (_dispatch, fallback, field_name, mapping))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = DiscriminateTypedDict.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xdd, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xddc0fd7:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xddc0fd7 = (_dispatch, fallback, field_name, mapping))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xddc0fd7 = (_dispatch, fallback, field_name, mapping))" % __pyx_checksum)
 *     __pyx_result = DiscriminateTypedDict.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DiscriminateTypedDict__set_state(<DiscriminateTypedDict> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9apischema_13serialization_7methods_DiscriminateTypedDict), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 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 0xddc0fd7 = (_dispatch, fallback, field_name, mapping))" % __pyx_checksum)
 *     __pyx_result = DiscriminateTypedDict.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DiscriminateTypedDict__set_state(<DiscriminateTypedDict> __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 = DiscriminateTypedDict.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DiscriminateTypedDict__set_state(<DiscriminateTypedDict> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DiscriminateTypedDict__set_state(DiscriminateTypedDict __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9apischema_13serialization_7methods___pyx_unpickle_DiscriminateTypedDict__set_state(((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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 0xddc0fd7 = (_dispatch, fallback, field_name, mapping))" % __pyx_checksum)
 *     __pyx_result = DiscriminateTypedDict.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DiscriminateTypedDict__set_state(<DiscriminateTypedDict> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DiscriminateTypedDict__set_state(<DiscriminateTypedDict> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DiscriminateTypedDict__set_state(DiscriminateTypedDict __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fallback = __pyx_state[1]; __pyx_result.field_name = __pyx_state[2]; __pyx_result.mapping = __pyx_state[3]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DiscriminateTypedDict(__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("apischema.serialization.methods.__pyx_unpickle_DiscriminateTypedDict", __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_DiscriminateTypedDict__set_state(<DiscriminateTypedDict> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DiscriminateTypedDict__set_state(DiscriminateTypedDict __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fallback = __pyx_state[1]; __pyx_result.field_name = __pyx_state[2]; __pyx_result.mapping = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9apischema_13serialization_7methods___pyx_unpickle_DiscriminateTypedDict__set_state(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DiscriminateTypedDict__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DiscriminateTypedDict__set_state(DiscriminateTypedDict __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fallback = __pyx_state[1]; __pyx_result.field_name = __pyx_state[2]; __pyx_result.mapping = __pyx_state[3]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._dispatch = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9apischema_13serialization_7methods_Fallback))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->fallback);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->fallback));
  __pyx_v___pyx_result->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->field_name);
  __Pyx_DECREF(__pyx_v___pyx_result->field_name);
  __pyx_v___pyx_result->field_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->mapping);
  __Pyx_DECREF(__pyx_v___pyx_result->mapping);
  __pyx_v___pyx_result->mapping = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_DiscriminateTypedDict__set_state(DiscriminateTypedDict __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fallback = __pyx_state[1]; __pyx_result.field_name = __pyx_state[2]; __pyx_result.mapping = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 4) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fallback = __pyx_state[1]; __pyx_result.field_name = __pyx_state[2]; __pyx_result.mapping = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DiscriminateTypedDict__set_state(DiscriminateTypedDict __pyx_result, tuple __pyx_state):
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fallback = __pyx_state[1]; __pyx_result.field_name = __pyx_state[2]; __pyx_result.mapping = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DiscriminateTypedDict__set_state(<DiscriminateTypedDict> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DiscriminateTypedDict__set_state(DiscriminateTypedDict __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fallback = __pyx_state[1]; __pyx_result.field_name = __pyx_state[2]; __pyx_result.mapping = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apischema.serialization.methods.__pyx_unpickle_DiscriminateTypedDict__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  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;
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_SerializationMethod[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_19SerializationMethod_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_19SerializationMethod_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_SerializationMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.SerializationMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_SerializationMethod, /*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_9apischema_13serialization_7methods_SerializationMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_IdentityMethod __pyx_vtable_9apischema_13serialization_7methods_IdentityMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_IdentityMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_IdentityMethod;
  return o;
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_IdentityMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_14IdentityMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_14IdentityMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_14IdentityMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_IdentityMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.IdentityMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_IdentityMethod, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_14IdentityMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_IdentityMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_ListMethod __pyx_vtable_9apischema_13serialization_7methods_ListMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_ListMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_ListMethod;
  return o;
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_ListMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_10ListMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_10ListMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_10ListMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_ListMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.ListMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_ListMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_ListMethod, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_10ListMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_ListMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_DictMethod __pyx_vtable_9apischema_13serialization_7methods_DictMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_DictMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_DictMethod;
  return o;
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_DictMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_10DictMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_10DictMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_10DictMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_DictMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.DictMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_DictMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_DictMethod, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_10DictMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_DictMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_StrMethod __pyx_vtable_9apischema_13serialization_7methods_StrMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_StrMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_StrMethod;
  return o;
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_StrMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_9StrMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_9StrMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_9StrMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_StrMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.StrMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_StrMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_StrMethod, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_9StrMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_StrMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_IntMethod __pyx_vtable_9apischema_13serialization_7methods_IntMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_IntMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_IntMethod;
  return o;
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_IntMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_9IntMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_9IntMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_9IntMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_IntMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.IntMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_IntMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_IntMethod, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_9IntMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_IntMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_BoolMethod __pyx_vtable_9apischema_13serialization_7methods_BoolMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_BoolMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_BoolMethod;
  return o;
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_BoolMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_10BoolMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_10BoolMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_10BoolMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_BoolMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.BoolMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_BoolMethod, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_10BoolMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_BoolMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_FloatMethod __pyx_vtable_9apischema_13serialization_7methods_FloatMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_FloatMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_FloatMethod;
  return o;
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_FloatMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_11FloatMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_11FloatMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_11FloatMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_FloatMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.FloatMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_FloatMethod, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_11FloatMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_FloatMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_NoneMethod __pyx_vtable_9apischema_13serialization_7methods_NoneMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_NoneMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_NoneMethod;
  return o;
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_NoneMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_10NoneMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_10NoneMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_10NoneMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_NoneMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.NoneMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_NoneMethod, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_10NoneMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_NoneMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_RecMethod __pyx_vtable_9apischema_13serialization_7methods_RecMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_RecMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_RecMethod;
  p->lazy = Py_None; Py_INCREF(Py_None);
  p->method = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_RecMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *)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->lazy);
  Py_CLEAR(p->method);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_RecMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_RecMethod)); if (e) return e;
  if (p->lazy) {
    e = (*v)(p->lazy, a); if (e) return e;
  }
  if (p->method) {
    e = (*v)(p->method, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_RecMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_RecMethod);
  tmp = ((PyObject*)p->lazy);
  p->lazy = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->method);
  p->method = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_9RecMethod_lazy(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_9RecMethod_4lazy_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_9RecMethod_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_9RecMethod_6method_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_RecMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_9RecMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_9RecMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_9RecMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_RecMethod[] = {
  {(char *)"lazy", __pyx_getprop_9apischema_13serialization_7methods_9RecMethod_lazy, 0, (char *)0, 0},
  {(char *)"method", __pyx_getprop_9apischema_13serialization_7methods_9RecMethod_method, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_RecMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.RecMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_RecMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_RecMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_RecMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_RecMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_RecMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_9RecMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_RecMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_AnyMethod __pyx_vtable_9apischema_13serialization_7methods_AnyMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_AnyMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_AnyMethod;
  p->factory = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_AnyMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *)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->factory);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_AnyMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_AnyMethod)); if (e) return e;
  if (p->factory) {
    e = (*v)(p->factory, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_AnyMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_AnyMethod);
  tmp = ((PyObject*)p->factory);
  p->factory = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_9AnyMethod_factory(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_9AnyMethod_7factory_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_AnyMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_9AnyMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_9AnyMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_9AnyMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_AnyMethod[] = {
  {(char *)"factory", __pyx_getprop_9apischema_13serialization_7methods_9AnyMethod_factory, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_AnyMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.AnyMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_AnyMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_AnyMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_AnyMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_AnyMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_AnyMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_9AnyMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_AnyMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_Fallback(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  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;
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_Fallback(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_Fallback[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_8Fallback_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_8Fallback_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_Fallback = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.Fallback", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_Fallback), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_Fallback, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_Fallback, /*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_9apischema_13serialization_7methods_Fallback, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_NoFallback __pyx_vtable_9apischema_13serialization_7methods_NoFallback;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_NoFallback(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_Fallback(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_NoFallback;
  p->tp = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_NoFallback(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *p = (struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *)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->tp);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_Fallback(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_NoFallback(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *p = (struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_Fallback)) ? ((__pyx_ptype_9apischema_13serialization_7methods_Fallback->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_Fallback->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_NoFallback)); if (e) return e;
  if (p->tp) {
    e = (*v)(p->tp, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_NoFallback(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *p = (struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_Fallback)) { if (__pyx_ptype_9apischema_13serialization_7methods_Fallback->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_Fallback->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_NoFallback);
  tmp = ((PyObject*)p->tp);
  p->tp = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_10NoFallback_tp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_10NoFallback_2tp_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_NoFallback[] = {
  {"fall_back", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_10NoFallback_1fall_back, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_10NoFallback_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_10NoFallback_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_NoFallback[] = {
  {(char *)"tp", __pyx_getprop_9apischema_13serialization_7methods_10NoFallback_tp, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_NoFallback = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.NoFallback", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_NoFallback, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_NoFallback, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_NoFallback, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_NoFallback, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_NoFallback, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_10NoFallback_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_NoFallback, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_AnyFallback __pyx_vtable_9apischema_13serialization_7methods_AnyFallback;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_AnyFallback(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_Fallback(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_AnyFallback;
  p->any_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_AnyFallback(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *p = (struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *)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->any_method);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_Fallback(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_AnyFallback(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *p = (struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_Fallback)) ? ((__pyx_ptype_9apischema_13serialization_7methods_Fallback->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_Fallback->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_AnyFallback)); if (e) return e;
  if (p->any_method) {
    e = (*v)(((PyObject *)p->any_method), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_AnyFallback(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *p = (struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_Fallback)) { if (__pyx_ptype_9apischema_13serialization_7methods_Fallback->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_Fallback->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_AnyFallback);
  tmp = ((PyObject*)p->any_method);
  p->any_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_11AnyFallback_any_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_11AnyFallback_10any_method_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_AnyFallback[] = {
  {"fall_back", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_11AnyFallback_1fall_back, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_11AnyFallback_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_11AnyFallback_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_AnyFallback[] = {
  {(char *)"any_method", __pyx_getprop_9apischema_13serialization_7methods_11AnyFallback_any_method, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_AnyFallback = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.AnyFallback", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_AnyFallback, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_AnyFallback, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_AnyFallback, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_AnyFallback, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_AnyFallback, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_11AnyFallback_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_AnyFallback, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypeCheckIdentityMethod __pyx_vtable_9apischema_13serialization_7methods_TypeCheckIdentityMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_TypeCheckIdentityMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_TypeCheckIdentityMethod;
  p->expected = Py_None; Py_INCREF(Py_None);
  p->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_TypeCheckIdentityMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *)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->expected);
  Py_CLEAR(p->fallback);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_TypeCheckIdentityMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_TypeCheckIdentityMethod)); if (e) return e;
  if (p->expected) {
    e = (*v)(p->expected, a); if (e) return e;
  }
  if (p->fallback) {
    e = (*v)(((PyObject *)p->fallback), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_TypeCheckIdentityMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_TypeCheckIdentityMethod);
  tmp = ((PyObject*)p->expected);
  p->expected = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->fallback);
  p->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_expected(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_8expected_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_fallback(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_8fallback_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_TypeCheckIdentityMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_TypeCheckIdentityMethod[] = {
  {(char *)"expected", __pyx_getprop_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_expected, 0, (char *)0, 0},
  {(char *)"fallback", __pyx_getprop_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_fallback, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_TypeCheckIdentityMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.TypeCheckIdentityMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_TypeCheckIdentityMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_TypeCheckIdentityMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_TypeCheckIdentityMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_TypeCheckIdentityMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_TypeCheckIdentityMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_TypeCheckIdentityMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypeCheckMethod __pyx_vtable_9apischema_13serialization_7methods_TypeCheckMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_TypeCheckMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_TypeCheckMethod;
  p->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  p->expected = Py_None; Py_INCREF(Py_None);
  p->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_TypeCheckMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *)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->method);
  Py_CLEAR(p->expected);
  Py_CLEAR(p->fallback);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_TypeCheckMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_TypeCheckMethod)); if (e) return e;
  if (p->method) {
    e = (*v)(((PyObject *)p->method), a); if (e) return e;
  }
  if (p->expected) {
    e = (*v)(p->expected, a); if (e) return e;
  }
  if (p->fallback) {
    e = (*v)(((PyObject *)p->fallback), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_TypeCheckMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_TypeCheckMethod);
  tmp = ((PyObject*)p->method);
  p->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->expected);
  p->expected = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->fallback);
  p->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_15TypeCheckMethod_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_6method_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_15TypeCheckMethod_expected(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_8expected_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_15TypeCheckMethod_fallback(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_8fallback_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_TypeCheckMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_TypeCheckMethod[] = {
  {(char *)"method", __pyx_getprop_9apischema_13serialization_7methods_15TypeCheckMethod_method, 0, (char *)0, 0},
  {(char *)"expected", __pyx_getprop_9apischema_13serialization_7methods_15TypeCheckMethod_expected, 0, (char *)0, 0},
  {(char *)"fallback", __pyx_getprop_9apischema_13serialization_7methods_15TypeCheckMethod_fallback, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_TypeCheckMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.TypeCheckMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_TypeCheckMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_TypeCheckMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_TypeCheckMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_TypeCheckMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_TypeCheckMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_15TypeCheckMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_TypeCheckMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_CollectionCheckOnlyMethod __pyx_vtable_9apischema_13serialization_7methods_CollectionCheckOnlyMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_CollectionCheckOnlyMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_CollectionCheckOnlyMethod;
  p->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_CollectionCheckOnlyMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->value_method);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_CollectionCheckOnlyMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_CollectionCheckOnlyMethod)); if (e) return e;
  if (p->value_method) {
    e = (*v)(((PyObject *)p->value_method), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_CollectionCheckOnlyMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_CollectionCheckOnlyMethod);
  tmp = ((PyObject*)p->value_method);
  p->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_value_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_12value_method_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_CollectionCheckOnlyMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_CollectionCheckOnlyMethod[] = {
  {(char *)"value_method", __pyx_getprop_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_value_method, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_CollectionCheckOnlyMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.CollectionCheckOnlyMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_CollectionCheckOnlyMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_CollectionCheckOnlyMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_CollectionCheckOnlyMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_CollectionCheckOnlyMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_CollectionCheckOnlyMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_CollectionCheckOnlyMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_CollectionMethod __pyx_vtable_9apischema_13serialization_7methods_CollectionMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_CollectionMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_CollectionMethod;
  p->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_CollectionMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->value_method);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_CollectionMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_CollectionMethod)); if (e) return e;
  if (p->value_method) {
    e = (*v)(((PyObject *)p->value_method), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_CollectionMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_CollectionMethod);
  tmp = ((PyObject*)p->value_method);
  p->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_16CollectionMethod_value_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_12value_method_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_CollectionMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_CollectionMethod[] = {
  {(char *)"value_method", __pyx_getprop_9apischema_13serialization_7methods_16CollectionMethod_value_method, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_CollectionMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.CollectionMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_CollectionMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_CollectionMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_CollectionMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_CollectionMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_CollectionMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_16CollectionMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_CollectionMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_ValueMethod __pyx_vtable_9apischema_13serialization_7methods_ValueMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_ValueMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_ValueMethod;
  return o;
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_ValueMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_11ValueMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_11ValueMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_11ValueMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_ValueMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.ValueMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_ValueMethod, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_11ValueMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_ValueMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_EnumMethod __pyx_vtable_9apischema_13serialization_7methods_EnumMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_EnumMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_EnumMethod;
  p->any_method = ((struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_EnumMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *)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->any_method);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_EnumMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_EnumMethod)); if (e) return e;
  if (p->any_method) {
    e = (*v)(((PyObject *)p->any_method), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_EnumMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_EnumMethod);
  tmp = ((PyObject*)p->any_method);
  p->any_method = ((struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_10EnumMethod_any_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_10EnumMethod_10any_method_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_EnumMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_10EnumMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_10EnumMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_10EnumMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_EnumMethod[] = {
  {(char *)"any_method", __pyx_getprop_9apischema_13serialization_7methods_10EnumMethod_any_method, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_EnumMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.EnumMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_EnumMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_EnumMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_EnumMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_EnumMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_EnumMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_10EnumMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_EnumMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_MappingCheckOnlyMethod __pyx_vtable_9apischema_13serialization_7methods_MappingCheckOnlyMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_MappingCheckOnlyMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_MappingCheckOnlyMethod;
  p->key_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  p->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_MappingCheckOnlyMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *)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->key_method);
  Py_CLEAR(p->value_method);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_MappingCheckOnlyMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_MappingCheckOnlyMethod)); if (e) return e;
  if (p->key_method) {
    e = (*v)(((PyObject *)p->key_method), a); if (e) return e;
  }
  if (p->value_method) {
    e = (*v)(((PyObject *)p->value_method), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_MappingCheckOnlyMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_MappingCheckOnlyMethod);
  tmp = ((PyObject*)p->key_method);
  p->key_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->value_method);
  p->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_key_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_10key_method_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_value_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_12value_method_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_MappingCheckOnlyMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_MappingCheckOnlyMethod[] = {
  {(char *)"key_method", __pyx_getprop_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_key_method, 0, (char *)0, 0},
  {(char *)"value_method", __pyx_getprop_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_value_method, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_MappingCheckOnlyMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.MappingCheckOnlyMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_MappingCheckOnlyMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_MappingCheckOnlyMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_MappingCheckOnlyMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_MappingCheckOnlyMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_MappingCheckOnlyMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_MappingCheckOnlyMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_MappingMethod __pyx_vtable_9apischema_13serialization_7methods_MappingMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_MappingMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_MappingMethod;
  p->key_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  p->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_MappingMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *)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->key_method);
  Py_CLEAR(p->value_method);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_MappingMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_MappingMethod)); if (e) return e;
  if (p->key_method) {
    e = (*v)(((PyObject *)p->key_method), a); if (e) return e;
  }
  if (p->value_method) {
    e = (*v)(((PyObject *)p->value_method), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_MappingMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_MappingMethod);
  tmp = ((PyObject*)p->key_method);
  p->key_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->value_method);
  p->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_13MappingMethod_key_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_13MappingMethod_10key_method_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_13MappingMethod_value_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_13MappingMethod_12value_method_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_MappingMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_13MappingMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_13MappingMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_13MappingMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_MappingMethod[] = {
  {(char *)"key_method", __pyx_getprop_9apischema_13serialization_7methods_13MappingMethod_key_method, 0, (char *)0, 0},
  {(char *)"value_method", __pyx_getprop_9apischema_13serialization_7methods_13MappingMethod_value_method, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_MappingMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.MappingMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_MappingMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_MappingMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_MappingMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_MappingMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_MappingMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_13MappingMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_MappingMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_BaseField(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  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;
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_BaseField(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_BaseField[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_9BaseField_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_9BaseField_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_BaseField = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.BaseField", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_BaseField), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_BaseField, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_BaseField, /*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_9apischema_13serialization_7methods_BaseField, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_IdentityField __pyx_vtable_9apischema_13serialization_7methods_IdentityField;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_IdentityField(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_BaseField(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_IdentityField;
  p->name = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->alias = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_IdentityField(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *p = (struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *)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->name);
  Py_CLEAR(p->alias);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_BaseField(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_13IdentityField_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_13IdentityField_4name_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_13IdentityField_alias(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_13IdentityField_5alias_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_13IdentityField_required(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_13IdentityField_8required_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_IdentityField[] = {
  {"update_result", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_13IdentityField_1update_result, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_13IdentityField_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_13IdentityField_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_IdentityField[] = {
  {(char *)"name", __pyx_getprop_9apischema_13serialization_7methods_13IdentityField_name, 0, (char *)0, 0},
  {(char *)"alias", __pyx_getprop_9apischema_13serialization_7methods_13IdentityField_alias, 0, (char *)0, 0},
  {(char *)"required", __pyx_getprop_9apischema_13serialization_7methods_13IdentityField_required, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_IdentityField = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.IdentityField", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_IdentityField, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_IdentityField, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_IdentityField, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_13IdentityField_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_IdentityField, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_SimpleField __pyx_vtable_9apischema_13serialization_7methods_SimpleField;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_SimpleField(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_IdentityField(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9apischema_13serialization_7methods_IdentityField*)__pyx_vtabptr_9apischema_13serialization_7methods_SimpleField;
  p->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_SimpleField(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *p = (struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *)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->method);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_IdentityField(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_SimpleField(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *p = (struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_IdentityField)) ? ((__pyx_ptype_9apischema_13serialization_7methods_IdentityField->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_IdentityField->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_SimpleField)); if (e) return e;
  if (p->method) {
    e = (*v)(((PyObject *)p->method), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_SimpleField(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *p = (struct __pyx_obj_9apischema_13serialization_7methods_SimpleField *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_IdentityField)) { if (__pyx_ptype_9apischema_13serialization_7methods_IdentityField->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_IdentityField->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_SimpleField);
  tmp = ((PyObject*)p->method);
  p->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_11SimpleField_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_11SimpleField_6method_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_SimpleField[] = {
  {"update_result", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_11SimpleField_1update_result, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_11SimpleField_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_11SimpleField_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_SimpleField[] = {
  {(char *)"method", __pyx_getprop_9apischema_13serialization_7methods_11SimpleField_method, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_SimpleField = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.SimpleField", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_SimpleField), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SimpleField, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_SimpleField, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_SimpleField, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_SimpleField, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_SimpleField, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_11SimpleField_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_SimpleField, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_ComplexField __pyx_vtable_9apischema_13serialization_7methods_ComplexField;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_ComplexField(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SimpleField(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9apischema_13serialization_7methods_IdentityField*)__pyx_vtabptr_9apischema_13serialization_7methods_ComplexField;
  p->skip_if = Py_None; Py_INCREF(Py_None);
  p->default_value = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_ComplexField(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *p = (struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)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->skip_if);
  Py_CLEAR(p->default_value);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SimpleField(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_ComplexField(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *p = (struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)o;
  e = __pyx_tp_traverse_9apischema_13serialization_7methods_SimpleField(o, v, a); if (e) return e;
  if (p->skip_if) {
    e = (*v)(p->skip_if, a); if (e) return e;
  }
  if (p->default_value) {
    e = (*v)(p->default_value, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_ComplexField(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *p = (struct __pyx_obj_9apischema_13serialization_7methods_ComplexField *)o;
  __pyx_tp_clear_9apischema_13serialization_7methods_SimpleField(o);
  tmp = ((PyObject*)p->skip_if);
  p->skip_if = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->default_value);
  p->default_value = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_12ComplexField_skip_if(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_12ComplexField_7skip_if_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_12ComplexField_undefined(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_12ComplexField_9undefined_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_12ComplexField_skip_none(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_12ComplexField_9skip_none_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_12ComplexField_skip_default(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_12ComplexField_12skip_default_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_12ComplexField_default_value(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_12ComplexField_13default_value_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_12ComplexField_skippable(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_12ComplexField_9skippable_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_ComplexField[] = {
  {"update_result", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_12ComplexField_1update_result, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_12ComplexField_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_12ComplexField_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_ComplexField[] = {
  {(char *)"skip_if", __pyx_getprop_9apischema_13serialization_7methods_12ComplexField_skip_if, 0, (char *)0, 0},
  {(char *)"undefined", __pyx_getprop_9apischema_13serialization_7methods_12ComplexField_undefined, 0, (char *)0, 0},
  {(char *)"skip_none", __pyx_getprop_9apischema_13serialization_7methods_12ComplexField_skip_none, 0, (char *)0, 0},
  {(char *)"skip_default", __pyx_getprop_9apischema_13serialization_7methods_12ComplexField_skip_default, 0, (char *)0, 0},
  {(char *)"default_value", __pyx_getprop_9apischema_13serialization_7methods_12ComplexField_default_value, 0, (char *)0, 0},
  {(char *)"skippable", __pyx_getprop_9apischema_13serialization_7methods_12ComplexField_skippable, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_ComplexField = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.ComplexField", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_ComplexField), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_ComplexField, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_ComplexField, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_ComplexField, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_ComplexField, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_ComplexField, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_12ComplexField_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_ComplexField, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_SerializedField __pyx_vtable_9apischema_13serialization_7methods_SerializedField;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_SerializedField(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_BaseField(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_SerializedField;
  p->alias = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->func = Py_None; Py_INCREF(Py_None);
  p->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializedField(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *p = (struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *)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->alias);
  Py_CLEAR(p->func);
  Py_CLEAR(p->method);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_BaseField(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_SerializedField(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *p = (struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_BaseField)) ? ((__pyx_ptype_9apischema_13serialization_7methods_BaseField->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_BaseField->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_SerializedField)); if (e) return e;
  if (p->func) {
    e = (*v)(p->func, a); if (e) return e;
  }
  if (p->method) {
    e = (*v)(((PyObject *)p->method), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_SerializedField(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *p = (struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_BaseField)) { if (__pyx_ptype_9apischema_13serialization_7methods_BaseField->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_BaseField->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_SerializedField);
  tmp = ((PyObject*)p->func);
  p->func = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->method);
  p->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_15SerializedField_alias(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_15SerializedField_5alias_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_15SerializedField_func(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_15SerializedField_4func_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_15SerializedField_undefined(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_15SerializedField_9undefined_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_15SerializedField_skip_none(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_15SerializedField_9skip_none_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_15SerializedField_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_15SerializedField_6method_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_SerializedField[] = {
  {"update_result", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_15SerializedField_1update_result, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_15SerializedField_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_15SerializedField_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_SerializedField[] = {
  {(char *)"alias", __pyx_getprop_9apischema_13serialization_7methods_15SerializedField_alias, 0, (char *)0, 0},
  {(char *)"func", __pyx_getprop_9apischema_13serialization_7methods_15SerializedField_func, 0, (char *)0, 0},
  {(char *)"undefined", __pyx_getprop_9apischema_13serialization_7methods_15SerializedField_undefined, 0, (char *)0, 0},
  {(char *)"skip_none", __pyx_getprop_9apischema_13serialization_7methods_15SerializedField_skip_none, 0, (char *)0, 0},
  {(char *)"method", __pyx_getprop_9apischema_13serialization_7methods_15SerializedField_method, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_SerializedField = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.SerializedField", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializedField, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_SerializedField, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_SerializedField, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_SerializedField, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_SerializedField, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_15SerializedField_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_SerializedField, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_ObjectMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *)o);
  p->fields = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_ObjectMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *)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->fields);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_ObjectMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_ObjectMethod)); if (e) return e;
  if (p->fields) {
    e = (*v)(p->fields, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_ObjectMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_ObjectMethod);
  tmp = ((PyObject*)p->fields);
  p->fields = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_12ObjectMethod_fields(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_12ObjectMethod_6fields_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_ObjectMethod[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_12ObjectMethod_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_12ObjectMethod_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_ObjectMethod[] = {
  {(char *)"fields", __pyx_getprop_9apischema_13serialization_7methods_12ObjectMethod_fields, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_ObjectMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.ObjectMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_ObjectMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_ObjectMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_ObjectMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_ObjectMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_ObjectMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_ObjectMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_12ObjectMethod_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_ObjectMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_ClassMethod __pyx_vtable_9apischema_13serialization_7methods_ClassMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_ClassMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_ObjectMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_ClassMethod;
  return o;
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_ClassMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_11ClassMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_11ClassMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_11ClassMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_ClassMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.ClassMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_ObjectMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_ObjectMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_ObjectMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_ClassMethod, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_11ClassMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_ClassMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_ClassWithFieldsSetMethod __pyx_vtable_9apischema_13serialization_7methods_ClassWithFieldsSetMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_ClassWithFieldsSetMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_ObjectMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_ClassWithFieldsSetMethod;
  return o;
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_ClassWithFieldsSetMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_ClassWithFieldsSetMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.ClassWithFieldsSetMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_ObjectMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_ObjectMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_ObjectMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_ClassWithFieldsSetMethod, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_ClassWithFieldsSetMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypedDictMethod __pyx_vtable_9apischema_13serialization_7methods_TypedDictMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_TypedDictMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_ObjectMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_TypedDictMethod;
  return o;
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_TypedDictMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_15TypedDictMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_15TypedDictMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_15TypedDictMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_TypedDictMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.TypedDictMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_ObjectMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_ObjectMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_ObjectMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_TypedDictMethod, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_15TypedDictMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_TypedDictMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod __pyx_vtable_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_TypedDictMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9apischema_13serialization_7methods_TypedDictMethod*)__pyx_vtabptr_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod;
  p->field_names = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->any_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *)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->field_names);
  Py_CLEAR(p->any_method);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_ObjectMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *)o;
  e = __pyx_tp_traverse_9apischema_13serialization_7methods_ObjectMethod(o, v, a); if (e) return e;
  if (p->field_names) {
    e = (*v)(p->field_names, a); if (e) return e;
  }
  if (p->any_method) {
    e = (*v)(((PyObject *)p->any_method), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod *)o;
  __pyx_tp_clear_9apischema_13serialization_7methods_ObjectMethod(o);
  tmp = ((PyObject*)p->field_names);
  p->field_names = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->any_method);
  p->any_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_field_names(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_11field_names_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_any_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_10any_method_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod[] = {
  {(char *)"field_names", __pyx_getprop_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_field_names, 0, (char *)0, 0},
  {(char *)"any_method", __pyx_getprop_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_any_method, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.TypedDictWithAdditionalMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_TupleCheckOnlyMethod __pyx_vtable_9apischema_13serialization_7methods_TupleCheckOnlyMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_TupleCheckOnlyMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_TupleCheckOnlyMethod;
  p->elt_methods = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_TupleCheckOnlyMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *)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->elt_methods);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_TupleCheckOnlyMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_TupleCheckOnlyMethod)); if (e) return e;
  if (p->elt_methods) {
    e = (*v)(p->elt_methods, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_TupleCheckOnlyMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_TupleCheckOnlyMethod);
  tmp = ((PyObject*)p->elt_methods);
  p->elt_methods = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_elt_methods(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_11elt_methods_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_TupleCheckOnlyMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_TupleCheckOnlyMethod[] = {
  {(char *)"elt_methods", __pyx_getprop_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_elt_methods, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_TupleCheckOnlyMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.TupleCheckOnlyMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_TupleCheckOnlyMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_TupleCheckOnlyMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_TupleCheckOnlyMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_TupleCheckOnlyMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_TupleCheckOnlyMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_TupleCheckOnlyMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_TupleMethod __pyx_vtable_9apischema_13serialization_7methods_TupleMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_TupleMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_TupleMethod;
  p->elt_methods = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_TupleMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *)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->elt_methods);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_TupleMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_TupleMethod)); if (e) return e;
  if (p->elt_methods) {
    e = (*v)(p->elt_methods, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_TupleMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_TupleMethod);
  tmp = ((PyObject*)p->elt_methods);
  p->elt_methods = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_11TupleMethod_elt_methods(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_11TupleMethod_11elt_methods_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_TupleMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_11TupleMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_11TupleMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_11TupleMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_TupleMethod[] = {
  {(char *)"elt_methods", __pyx_getprop_9apischema_13serialization_7methods_11TupleMethod_elt_methods, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_TupleMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.TupleMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_TupleMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_TupleMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_TupleMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_TupleMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_TupleMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_11TupleMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_TupleMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_CheckedTupleMethod __pyx_vtable_9apischema_13serialization_7methods_CheckedTupleMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_CheckedTupleMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_CheckedTupleMethod;
  p->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_CheckedTupleMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *)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->method);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_CheckedTupleMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_CheckedTupleMethod)); if (e) return e;
  if (p->method) {
    e = (*v)(((PyObject *)p->method), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_CheckedTupleMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_CheckedTupleMethod);
  tmp = ((PyObject*)p->method);
  p->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_18CheckedTupleMethod_nb_elts(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_7nb_elts_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_18CheckedTupleMethod_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_6method_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_CheckedTupleMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_CheckedTupleMethod[] = {
  {(char *)"nb_elts", __pyx_getprop_9apischema_13serialization_7methods_18CheckedTupleMethod_nb_elts, 0, (char *)0, 0},
  {(char *)"method", __pyx_getprop_9apischema_13serialization_7methods_18CheckedTupleMethod_method, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_CheckedTupleMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.CheckedTupleMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_CheckedTupleMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_CheckedTupleMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_CheckedTupleMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_CheckedTupleMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_CheckedTupleMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_18CheckedTupleMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_CheckedTupleMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_OptionalMethod __pyx_vtable_9apischema_13serialization_7methods_OptionalMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_OptionalMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_OptionalMethod;
  p->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_OptionalMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->value_method);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_OptionalMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_OptionalMethod)); if (e) return e;
  if (p->value_method) {
    e = (*v)(((PyObject *)p->value_method), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_OptionalMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_OptionalMethod);
  tmp = ((PyObject*)p->value_method);
  p->value_method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_14OptionalMethod_value_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_12value_method_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_OptionalMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_OptionalMethod[] = {
  {(char *)"value_method", __pyx_getprop_9apischema_13serialization_7methods_14OptionalMethod_value_method, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_OptionalMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.OptionalMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_OptionalMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_OptionalMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_OptionalMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_OptionalMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_OptionalMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_14OptionalMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_OptionalMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_UnionAlternative __pyx_vtable_9apischema_13serialization_7methods_UnionAlternative;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_UnionAlternative(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_UnionAlternative;
  p->cls = Py_None; Py_INCREF(Py_None);
  p->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_UnionAlternative(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *p = (struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *)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->cls);
  Py_CLEAR(p->method);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_UnionAlternative(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *p = (struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_UnionAlternative)); if (e) return e;
  if (p->cls) {
    e = (*v)(p->cls, a); if (e) return e;
  }
  if (p->method) {
    e = (*v)(((PyObject *)p->method), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_UnionAlternative(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *p = (struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_UnionAlternative);
  tmp = ((PyObject*)p->cls);
  p->cls = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->method);
  p->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_16UnionAlternative_cls(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_3cls_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_16UnionAlternative_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_6method_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_UnionAlternative[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_UnionAlternative[] = {
  {(char *)"cls", __pyx_getprop_9apischema_13serialization_7methods_16UnionAlternative_cls, 0, (char *)0, 0},
  {(char *)"method", __pyx_getprop_9apischema_13serialization_7methods_16UnionAlternative_method, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_UnionAlternative = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.UnionAlternative", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_UnionAlternative, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_UnionAlternative, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_UnionAlternative, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_UnionAlternative, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_UnionAlternative, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_16UnionAlternative_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_UnionAlternative, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_DiscriminatedAlternative __pyx_vtable_9apischema_13serialization_7methods_DiscriminatedAlternative;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_DiscriminatedAlternative(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_UnionAlternative(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9apischema_13serialization_7methods_UnionAlternative*)__pyx_vtabptr_9apischema_13serialization_7methods_DiscriminatedAlternative;
  p->alias = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->key = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_DiscriminatedAlternative(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *p = (struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative *)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->alias);
  Py_CLEAR(p->key);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_UnionAlternative(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_24DiscriminatedAlternative_alias(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_5alias_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_24DiscriminatedAlternative_key(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_3key_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_DiscriminatedAlternative[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_DiscriminatedAlternative[] = {
  {(char *)"alias", __pyx_getprop_9apischema_13serialization_7methods_24DiscriminatedAlternative_alias, 0, (char *)0, 0},
  {(char *)"key", __pyx_getprop_9apischema_13serialization_7methods_24DiscriminatedAlternative_key, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_DiscriminatedAlternative = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.DiscriminatedAlternative", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminatedAlternative), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_DiscriminatedAlternative, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_UnionAlternative, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_UnionAlternative, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_DiscriminatedAlternative, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_DiscriminatedAlternative, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_24DiscriminatedAlternative_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_DiscriminatedAlternative, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_UnionMethod __pyx_vtable_9apischema_13serialization_7methods_UnionMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_UnionMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_UnionMethod;
  p->alternatives = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_UnionMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *)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->alternatives);
  Py_CLEAR(p->fallback);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_UnionMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_UnionMethod)); if (e) return e;
  if (p->alternatives) {
    e = (*v)(p->alternatives, a); if (e) return e;
  }
  if (p->fallback) {
    e = (*v)(((PyObject *)p->fallback), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_UnionMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_UnionMethod);
  tmp = ((PyObject*)p->alternatives);
  p->alternatives = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->fallback);
  p->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_11UnionMethod_alternatives(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_11UnionMethod_12alternatives_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_11UnionMethod_fallback(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_11UnionMethod_8fallback_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_UnionMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_11UnionMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_11UnionMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_11UnionMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_UnionMethod[] = {
  {(char *)"alternatives", __pyx_getprop_9apischema_13serialization_7methods_11UnionMethod_alternatives, 0, (char *)0, 0},
  {(char *)"fallback", __pyx_getprop_9apischema_13serialization_7methods_11UnionMethod_fallback, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_UnionMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.UnionMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_UnionMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_UnionMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_UnionMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_UnionMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_UnionMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_11UnionMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_UnionMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_WrapperMethod __pyx_vtable_9apischema_13serialization_7methods_WrapperMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_WrapperMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_WrapperMethod;
  p->wrapped = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_WrapperMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *)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->wrapped);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_WrapperMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_WrapperMethod)); if (e) return e;
  if (p->wrapped) {
    e = (*v)(p->wrapped, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_WrapperMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_WrapperMethod);
  tmp = ((PyObject*)p->wrapped);
  p->wrapped = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_13WrapperMethod_wrapped(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_7wrapped_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_WrapperMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_WrapperMethod[] = {
  {(char *)"wrapped", __pyx_getprop_9apischema_13serialization_7methods_13WrapperMethod_wrapped, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_WrapperMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.WrapperMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_WrapperMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_WrapperMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_WrapperMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_WrapperMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_WrapperMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_13WrapperMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_WrapperMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_ConversionMethod __pyx_vtable_9apischema_13serialization_7methods_ConversionMethod;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_ConversionMethod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_ConversionMethod;
  p->converter = Py_None; Py_INCREF(Py_None);
  p->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_ConversionMethod(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *)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->converter);
  Py_CLEAR(p->method);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_ConversionMethod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_ConversionMethod)); if (e) return e;
  if (p->converter) {
    e = (*v)(p->converter, a); if (e) return e;
  }
  if (p->method) {
    e = (*v)(((PyObject *)p->method), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_ConversionMethod(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *p = (struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_ConversionMethod);
  tmp = ((PyObject*)p->converter);
  p->converter = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->method);
  p->method = ((struct __pyx_obj_9apischema_13serialization_7methods_SerializationMethod *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_16ConversionMethod_converter(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_9converter_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_16ConversionMethod_method(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_6method_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_ConversionMethod[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_ConversionMethod[] = {
  {(char *)"converter", __pyx_getprop_9apischema_13serialization_7methods_16ConversionMethod_converter, 0, (char *)0, 0},
  {(char *)"method", __pyx_getprop_9apischema_13serialization_7methods_16ConversionMethod_method, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_ConversionMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.ConversionMethod", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_ConversionMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_ConversionMethod, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_ConversionMethod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_ConversionMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_ConversionMethod, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_16ConversionMethod_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_ConversionMethod, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_9apischema_13serialization_7methods_DiscriminateTypedDict __pyx_vtable_9apischema_13serialization_7methods_DiscriminateTypedDict;

static PyObject *__pyx_tp_new_9apischema_13serialization_7methods_DiscriminateTypedDict(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *p;
  PyObject *o = __pyx_tp_new_9apischema_13serialization_7methods_SerializationMethod(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *)o);
  p->__pyx_vtab = __pyx_vtabptr_9apischema_13serialization_7methods_DiscriminateTypedDict;
  p->field_name = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->mapping = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9apischema_13serialization_7methods_DiscriminateTypedDict(PyObject *o) {
  struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *p = (struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *)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->field_name);
  Py_CLEAR(p->mapping);
  Py_CLEAR(p->fallback);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9apischema_13serialization_7methods_SerializationMethod(o);
}

static int __pyx_tp_traverse_9apischema_13serialization_7methods_DiscriminateTypedDict(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *p = (struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *)o;
  e = ((likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) ? ((__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse) ? __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_9apischema_13serialization_7methods_DiscriminateTypedDict)); if (e) return e;
  if (p->mapping) {
    e = (*v)(p->mapping, a); if (e) return e;
  }
  if (p->fallback) {
    e = (*v)(((PyObject *)p->fallback), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9apischema_13serialization_7methods_DiscriminateTypedDict(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *p = (struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *)o;
  if (likely(__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod)) { if (__pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear) __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_9apischema_13serialization_7methods_DiscriminateTypedDict);
  tmp = ((PyObject*)p->mapping);
  p->mapping = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->fallback);
  p->fallback = ((struct __pyx_obj_9apischema_13serialization_7methods_Fallback *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_21DiscriminateTypedDict_field_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_10field_name_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_21DiscriminateTypedDict_mapping(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_7mapping_1__get__(o);
}

static PyObject *__pyx_getprop_9apischema_13serialization_7methods_21DiscriminateTypedDict_fallback(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_8fallback_1__get__(o);
}

static PyMethodDef __pyx_methods_9apischema_13serialization_7methods_DiscriminateTypedDict[] = {
  {"serialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_1serialize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9apischema_13serialization_7methods_DiscriminateTypedDict[] = {
  {(char *)"field_name", __pyx_getprop_9apischema_13serialization_7methods_21DiscriminateTypedDict_field_name, 0, (char *)0, 0},
  {(char *)"mapping", __pyx_getprop_9apischema_13serialization_7methods_21DiscriminateTypedDict_mapping, 0, (char *)0, 0},
  {(char *)"fallback", __pyx_getprop_9apischema_13serialization_7methods_21DiscriminateTypedDict_fallback, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9apischema_13serialization_7methods_DiscriminateTypedDict = {
  PyVarObject_HEAD_INIT(0, 0)
  "apischema.serialization.methods.DiscriminateTypedDict", /*tp_name*/
  sizeof(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9apischema_13serialization_7methods_DiscriminateTypedDict, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9apischema_13serialization_7methods_DiscriminateTypedDict, /*tp_traverse*/
  __pyx_tp_clear_9apischema_13serialization_7methods_DiscriminateTypedDict, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9apischema_13serialization_7methods_DiscriminateTypedDict, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9apischema_13serialization_7methods_DiscriminateTypedDict, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9apischema_13serialization_7methods_21DiscriminateTypedDict_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9apischema_13serialization_7methods_DiscriminateTypedDict, /*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
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {"serialize_field", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_1serialize_field, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_field_value", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9apischema_13serialization_7methods_3get_field_value, METH_VARARGS|METH_KEYWORDS, 0},
  {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_methods(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_methods},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "methods",
    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_n_s_AbstractSet, __pyx_k_AbstractSet, sizeof(__pyx_k_AbstractSet), 0, 0, 1, 1},
  {&__pyx_n_s_Any, __pyx_k_Any, sizeof(__pyx_k_Any), 0, 0, 1, 1},
  {&__pyx_n_s_AnyFallback, __pyx_k_AnyFallback, sizeof(__pyx_k_AnyFallback), 0, 0, 1, 1},
  {&__pyx_n_s_AnyMethod, __pyx_k_AnyMethod, sizeof(__pyx_k_AnyMethod), 0, 0, 1, 1},
  {&__pyx_n_s_AnyType, __pyx_k_AnyType, sizeof(__pyx_k_AnyType), 0, 0, 1, 1},
  {&__pyx_n_s_BaseField, __pyx_k_BaseField, sizeof(__pyx_k_BaseField), 0, 0, 1, 1},
  {&__pyx_n_s_BoolMethod, __pyx_k_BoolMethod, sizeof(__pyx_k_BoolMethod), 0, 0, 1, 1},
  {&__pyx_n_s_Callable, __pyx_k_Callable, sizeof(__pyx_k_Callable), 0, 0, 1, 1},
  {&__pyx_n_s_CheckedTupleMethod, __pyx_k_CheckedTupleMethod, sizeof(__pyx_k_CheckedTupleMethod), 0, 0, 1, 1},
  {&__pyx_n_s_ClassMethod, __pyx_k_ClassMethod, sizeof(__pyx_k_ClassMethod), 0, 0, 1, 1},
  {&__pyx_n_s_ClassWithFieldsSetMethod, __pyx_k_ClassWithFieldsSetMethod, sizeof(__pyx_k_ClassWithFieldsSetMethod), 0, 0, 1, 1},
  {&__pyx_n_s_CollectionCheckOnlyMethod, __pyx_k_CollectionCheckOnlyMethod, sizeof(__pyx_k_CollectionCheckOnlyMethod), 0, 0, 1, 1},
  {&__pyx_n_s_CollectionMethod, __pyx_k_CollectionMethod, sizeof(__pyx_k_CollectionMethod), 0, 0, 1, 1},
  {&__pyx_n_s_ComplexField, __pyx_k_ComplexField, sizeof(__pyx_k_ComplexField), 0, 0, 1, 1},
  {&__pyx_n_s_ConversionMethod, __pyx_k_ConversionMethod, sizeof(__pyx_k_ConversionMethod), 0, 0, 1, 1},
  {&__pyx_n_s_Converter, __pyx_k_Converter, sizeof(__pyx_k_Converter), 0, 0, 1, 1},
  {&__pyx_n_s_Dict, __pyx_k_Dict, sizeof(__pyx_k_Dict), 0, 0, 1, 1},
  {&__pyx_n_s_DictMethod, __pyx_k_DictMethod, sizeof(__pyx_k_DictMethod), 0, 0, 1, 1},
  {&__pyx_n_s_DiscriminateTypedDict, __pyx_k_DiscriminateTypedDict, sizeof(__pyx_k_DiscriminateTypedDict), 0, 0, 1, 1},
  {&__pyx_n_s_DiscriminatedAlternative, __pyx_k_DiscriminatedAlternative, sizeof(__pyx_k_DiscriminatedAlternative), 0, 0, 1, 1},
  {&__pyx_n_s_EnumMethod, __pyx_k_EnumMethod, sizeof(__pyx_k_EnumMethod), 0, 0, 1, 1},
  {&__pyx_kp_u_Expected, __pyx_k_Expected, sizeof(__pyx_k_Expected), 0, 1, 0, 0},
  {&__pyx_n_s_FIELDS_SET_ATTR, __pyx_k_FIELDS_SET_ATTR, sizeof(__pyx_k_FIELDS_SET_ATTR), 0, 0, 1, 1},
  {&__pyx_n_s_Fallback, __pyx_k_Fallback, sizeof(__pyx_k_Fallback), 0, 0, 1, 1},
  {&__pyx_n_s_FloatMethod, __pyx_k_FloatMethod, sizeof(__pyx_k_FloatMethod), 0, 0, 1, 1},
  {&__pyx_n_s_IdentityField, __pyx_k_IdentityField, sizeof(__pyx_k_IdentityField), 0, 0, 1, 1},
  {&__pyx_n_s_IdentityMethod, __pyx_k_IdentityMethod, sizeof(__pyx_k_IdentityMethod), 0, 0, 1, 1},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_k_Incompatible_checksums_s_vs_0x05, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x05), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x0b, __pyx_k_Incompatible_checksums_s_vs_0x0b, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x0b), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x21, __pyx_k_Incompatible_checksums_s_vs_0x21, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x21), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x29, __pyx_k_Incompatible_checksums_s_vs_0x29, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x29), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x33, __pyx_k_Incompatible_checksums_s_vs_0x33, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x33), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x4d, __pyx_k_Incompatible_checksums_s_vs_0x4d, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x4d), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x64, __pyx_k_Incompatible_checksums_s_vs_0x64, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x64), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x6f, __pyx_k_Incompatible_checksums_s_vs_0x6f, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x6f), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x93, __pyx_k_Incompatible_checksums_s_vs_0x93, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x93), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x95, __pyx_k_Incompatible_checksums_s_vs_0x95, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x95), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xa6, __pyx_k_Incompatible_checksums_s_vs_0xa6, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xa6), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xae, __pyx_k_Incompatible_checksums_s_vs_0xae, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xae), 0, 0, 1, 0},
  {&__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_kp_s_Incompatible_checksums_s_vs_0xb9, __pyx_k_Incompatible_checksums_s_vs_0xb9, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xb9), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xbb, __pyx_k_Incompatible_checksums_s_vs_0xbb, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xbb), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xbc, __pyx_k_Incompatible_checksums_s_vs_0xbc, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xbc), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_k_Incompatible_checksums_s_vs_0xd4, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd4), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xdb, __pyx_k_Incompatible_checksums_s_vs_0xdb, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xdb), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xdd, __pyx_k_Incompatible_checksums_s_vs_0xdd, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xdd), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xde, __pyx_k_Incompatible_checksums_s_vs_0xde, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xde), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xdf, __pyx_k_Incompatible_checksums_s_vs_0xdf, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xdf), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xf6, __pyx_k_Incompatible_checksums_s_vs_0xf6, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xf6), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xfb, __pyx_k_Incompatible_checksums_s_vs_0xfb, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xfb), 0, 0, 1, 0},
  {&__pyx_n_s_IntMethod, __pyx_k_IntMethod, sizeof(__pyx_k_IntMethod), 0, 0, 1, 1},
  {&__pyx_n_s_Lazy, __pyx_k_Lazy, sizeof(__pyx_k_Lazy), 0, 0, 1, 1},
  {&__pyx_n_s_ListMethod, __pyx_k_ListMethod, sizeof(__pyx_k_ListMethod), 0, 0, 1, 1},
  {&__pyx_n_s_MappingCheckOnlyMethod, __pyx_k_MappingCheckOnlyMethod, sizeof(__pyx_k_MappingCheckOnlyMethod), 0, 0, 1, 1},
  {&__pyx_n_s_MappingMethod, __pyx_k_MappingMethod, sizeof(__pyx_k_MappingMethod), 0, 0, 1, 1},
  {&__pyx_n_s_NoFallback, __pyx_k_NoFallback, sizeof(__pyx_k_NoFallback), 0, 0, 1, 1},
  {&__pyx_n_s_NoneMethod, __pyx_k_NoneMethod, sizeof(__pyx_k_NoneMethod), 0, 0, 1, 1},
  {&__pyx_n_s_ObjectMethod, __pyx_k_ObjectMethod, sizeof(__pyx_k_ObjectMethod), 0, 0, 1, 1},
  {&__pyx_n_s_Optional, __pyx_k_Optional, sizeof(__pyx_k_Optional), 0, 0, 1, 1},
  {&__pyx_n_s_OptionalMethod, __pyx_k_OptionalMethod, sizeof(__pyx_k_OptionalMethod), 0, 0, 1, 1},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_RecMethod, __pyx_k_RecMethod, sizeof(__pyx_k_RecMethod), 0, 0, 1, 1},
  {&__pyx_n_s_SerializationMethod, __pyx_k_SerializationMethod, sizeof(__pyx_k_SerializationMethod), 0, 0, 1, 1},
  {&__pyx_n_s_SerializedField, __pyx_k_SerializedField, sizeof(__pyx_k_SerializedField), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleField, __pyx_k_SimpleField, sizeof(__pyx_k_SimpleField), 0, 0, 1, 1},
  {&__pyx_n_s_StrMethod, __pyx_k_StrMethod, sizeof(__pyx_k_StrMethod), 0, 0, 1, 1},
  {&__pyx_n_s_Tuple, __pyx_k_Tuple, sizeof(__pyx_k_Tuple), 0, 0, 1, 1},
  {&__pyx_n_s_TupleCheckOnlyMethod, __pyx_k_TupleCheckOnlyMethod, sizeof(__pyx_k_TupleCheckOnlyMethod), 0, 0, 1, 1},
  {&__pyx_n_s_TupleMethod, __pyx_k_TupleMethod, sizeof(__pyx_k_TupleMethod), 0, 0, 1, 1},
  {&__pyx_n_s_TypeCheckError, __pyx_k_TypeCheckError, sizeof(__pyx_k_TypeCheckError), 0, 0, 1, 1},
  {&__pyx_n_s_TypeCheckIdentityMethod, __pyx_k_TypeCheckIdentityMethod, sizeof(__pyx_k_TypeCheckIdentityMethod), 0, 0, 1, 1},
  {&__pyx_n_s_TypeCheckMethod, __pyx_k_TypeCheckMethod, sizeof(__pyx_k_TypeCheckMethod), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_TypedDictMethod, __pyx_k_TypedDictMethod, sizeof(__pyx_k_TypedDictMethod), 0, 0, 1, 1},
  {&__pyx_n_s_TypedDictWithAdditionalMethod, __pyx_k_TypedDictWithAdditionalMethod, sizeof(__pyx_k_TypedDictWithAdditionalMethod), 0, 0, 1, 1},
  {&__pyx_n_s_Undefined, __pyx_k_Undefined, sizeof(__pyx_k_Undefined), 0, 0, 1, 1},
  {&__pyx_n_s_Union, __pyx_k_Union, sizeof(__pyx_k_Union), 0, 0, 1, 1},
  {&__pyx_n_s_UnionAlternative, __pyx_k_UnionAlternative, sizeof(__pyx_k_UnionAlternative), 0, 0, 1, 1},
  {&__pyx_n_s_UnionMethod, __pyx_k_UnionMethod, sizeof(__pyx_k_UnionMethod), 0, 0, 1, 1},
  {&__pyx_n_s_ValueMethod, __pyx_k_ValueMethod, sizeof(__pyx_k_ValueMethod), 0, 0, 1, 1},
  {&__pyx_n_s_WrapperMethod, __pyx_k_WrapperMethod, sizeof(__pyx_k_WrapperMethod), 0, 0, 1, 1},
  {&__pyx_n_s_alias, __pyx_k_alias, sizeof(__pyx_k_alias), 0, 0, 1, 1},
  {&__pyx_n_s_alternatives, __pyx_k_alternatives, sizeof(__pyx_k_alternatives), 0, 0, 1, 1},
  {&__pyx_n_s_any_method, __pyx_k_any_method, sizeof(__pyx_k_any_method), 0, 0, 1, 1},
  {&__pyx_n_s_apischema_conversions_utils, __pyx_k_apischema_conversions_utils, sizeof(__pyx_k_apischema_conversions_utils), 0, 0, 1, 1},
  {&__pyx_n_s_apischema_fields, __pyx_k_apischema_fields, sizeof(__pyx_k_apischema_fields), 0, 0, 1, 1},
  {&__pyx_n_s_apischema_serialization_errors, __pyx_k_apischema_serialization_errors, sizeof(__pyx_k_apischema_serialization_errors), 0, 0, 1, 1},
  {&__pyx_n_s_apischema_serialization_methods, __pyx_k_apischema_serialization_methods, sizeof(__pyx_k_apischema_serialization_methods), 0, 0, 1, 1},
  {&__pyx_n_s_apischema_types, __pyx_k_apischema_types, sizeof(__pyx_k_apischema_types), 0, 0, 1, 1},
  {&__pyx_n_s_apischema_utils, __pyx_k_apischema_utils, sizeof(__pyx_k_apischema_utils), 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_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
  {&__pyx_n_s_converter, __pyx_k_converter, sizeof(__pyx_k_converter), 0, 0, 1, 1},
  {&__pyx_n_s_dataclass, __pyx_k_dataclass, sizeof(__pyx_k_dataclass), 0, 0, 1, 1},
  {&__pyx_n_s_dataclasses, __pyx_k_dataclasses, sizeof(__pyx_k_dataclasses), 0, 0, 1, 1},
  {&__pyx_n_s_default_value, __pyx_k_default_value, sizeof(__pyx_k_default_value), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_elt_methods, __pyx_k_elt_methods, sizeof(__pyx_k_elt_methods), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_exclude_unset, __pyx_k_exclude_unset, sizeof(__pyx_k_exclude_unset), 0, 0, 1, 1},
  {&__pyx_n_s_expected, __pyx_k_expected, sizeof(__pyx_k_expected), 0, 0, 1, 1},
  {&__pyx_n_s_factory, __pyx_k_factory, sizeof(__pyx_k_factory), 0, 0, 1, 1},
  {&__pyx_n_s_fall_back, __pyx_k_fall_back, sizeof(__pyx_k_fall_back), 0, 0, 1, 1},
  {&__pyx_n_s_fallback, __pyx_k_fallback, sizeof(__pyx_k_fallback), 0, 0, 1, 1},
  {&__pyx_n_s_field, __pyx_k_field, sizeof(__pyx_k_field), 0, 0, 1, 1},
  {&__pyx_n_s_field_name, __pyx_k_field_name, sizeof(__pyx_k_field_name), 0, 0, 1, 1},
  {&__pyx_n_s_field_names, __pyx_k_field_names, sizeof(__pyx_k_field_names), 0, 0, 1, 1},
  {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1},
  {&__pyx_kp_u_found, __pyx_k_found, sizeof(__pyx_k_found), 0, 1, 0, 0},
  {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_key_method, __pyx_k_key_method, sizeof(__pyx_k_key_method), 0, 0, 1, 1},
  {&__pyx_n_s_lazy, __pyx_k_lazy, sizeof(__pyx_k_lazy), 0, 0, 1, 1},
  {&__pyx_n_s_loc, __pyx_k_loc, sizeof(__pyx_k_loc), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_mapping, __pyx_k_mapping, sizeof(__pyx_k_mapping), 0, 0, 1, 1},
  {&__pyx_n_s_method, __pyx_k_method, sizeof(__pyx_k_method), 0, 0, 1, 1},
  {&__pyx_n_s_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 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_nb_elts, __pyx_k_nb_elts, sizeof(__pyx_k_nb_elts), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 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_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_AnyFallback, __pyx_k_pyx_unpickle_AnyFallback, sizeof(__pyx_k_pyx_unpickle_AnyFallback), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_AnyMethod, __pyx_k_pyx_unpickle_AnyMethod, sizeof(__pyx_k_pyx_unpickle_AnyMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_BaseField, __pyx_k_pyx_unpickle_BaseField, sizeof(__pyx_k_pyx_unpickle_BaseField), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_BoolMethod, __pyx_k_pyx_unpickle_BoolMethod, sizeof(__pyx_k_pyx_unpickle_BoolMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_CheckedTupleMetho, __pyx_k_pyx_unpickle_CheckedTupleMetho, sizeof(__pyx_k_pyx_unpickle_CheckedTupleMetho), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_ClassMethod, __pyx_k_pyx_unpickle_ClassMethod, sizeof(__pyx_k_pyx_unpickle_ClassMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_ClassWithFieldsSe, __pyx_k_pyx_unpickle_ClassWithFieldsSe, sizeof(__pyx_k_pyx_unpickle_ClassWithFieldsSe), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_CollectionCheckOn, __pyx_k_pyx_unpickle_CollectionCheckOn, sizeof(__pyx_k_pyx_unpickle_CollectionCheckOn), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_CollectionMethod, __pyx_k_pyx_unpickle_CollectionMethod, sizeof(__pyx_k_pyx_unpickle_CollectionMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_ComplexField, __pyx_k_pyx_unpickle_ComplexField, sizeof(__pyx_k_pyx_unpickle_ComplexField), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_ConversionMethod, __pyx_k_pyx_unpickle_ConversionMethod, sizeof(__pyx_k_pyx_unpickle_ConversionMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DictMethod, __pyx_k_pyx_unpickle_DictMethod, sizeof(__pyx_k_pyx_unpickle_DictMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DiscriminateTyped, __pyx_k_pyx_unpickle_DiscriminateTyped, sizeof(__pyx_k_pyx_unpickle_DiscriminateTyped), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DiscriminatedAlte, __pyx_k_pyx_unpickle_DiscriminatedAlte, sizeof(__pyx_k_pyx_unpickle_DiscriminatedAlte), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_EnumMethod, __pyx_k_pyx_unpickle_EnumMethod, sizeof(__pyx_k_pyx_unpickle_EnumMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Fallback, __pyx_k_pyx_unpickle_Fallback, sizeof(__pyx_k_pyx_unpickle_Fallback), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_FloatMethod, __pyx_k_pyx_unpickle_FloatMethod, sizeof(__pyx_k_pyx_unpickle_FloatMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_IdentityField, __pyx_k_pyx_unpickle_IdentityField, sizeof(__pyx_k_pyx_unpickle_IdentityField), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_IdentityMethod, __pyx_k_pyx_unpickle_IdentityMethod, sizeof(__pyx_k_pyx_unpickle_IdentityMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_IntMethod, __pyx_k_pyx_unpickle_IntMethod, sizeof(__pyx_k_pyx_unpickle_IntMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_ListMethod, __pyx_k_pyx_unpickle_ListMethod, sizeof(__pyx_k_pyx_unpickle_ListMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_MappingCheckOnlyM, __pyx_k_pyx_unpickle_MappingCheckOnlyM, sizeof(__pyx_k_pyx_unpickle_MappingCheckOnlyM), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_MappingMethod, __pyx_k_pyx_unpickle_MappingMethod, sizeof(__pyx_k_pyx_unpickle_MappingMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_NoFallback, __pyx_k_pyx_unpickle_NoFallback, sizeof(__pyx_k_pyx_unpickle_NoFallback), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_NoneMethod, __pyx_k_pyx_unpickle_NoneMethod, sizeof(__pyx_k_pyx_unpickle_NoneMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_ObjectMethod, __pyx_k_pyx_unpickle_ObjectMethod, sizeof(__pyx_k_pyx_unpickle_ObjectMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_OptionalMethod, __pyx_k_pyx_unpickle_OptionalMethod, sizeof(__pyx_k_pyx_unpickle_OptionalMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_RecMethod, __pyx_k_pyx_unpickle_RecMethod, sizeof(__pyx_k_pyx_unpickle_RecMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_SerializationMeth, __pyx_k_pyx_unpickle_SerializationMeth, sizeof(__pyx_k_pyx_unpickle_SerializationMeth), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_SerializedField, __pyx_k_pyx_unpickle_SerializedField, sizeof(__pyx_k_pyx_unpickle_SerializedField), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_SimpleField, __pyx_k_pyx_unpickle_SimpleField, sizeof(__pyx_k_pyx_unpickle_SimpleField), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_StrMethod, __pyx_k_pyx_unpickle_StrMethod, sizeof(__pyx_k_pyx_unpickle_StrMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TupleCheckOnlyMet, __pyx_k_pyx_unpickle_TupleCheckOnlyMet, sizeof(__pyx_k_pyx_unpickle_TupleCheckOnlyMet), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TupleMethod, __pyx_k_pyx_unpickle_TupleMethod, sizeof(__pyx_k_pyx_unpickle_TupleMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TypeCheckIdentity, __pyx_k_pyx_unpickle_TypeCheckIdentity, sizeof(__pyx_k_pyx_unpickle_TypeCheckIdentity), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TypeCheckMethod, __pyx_k_pyx_unpickle_TypeCheckMethod, sizeof(__pyx_k_pyx_unpickle_TypeCheckMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TypedDictMethod, __pyx_k_pyx_unpickle_TypedDictMethod, sizeof(__pyx_k_pyx_unpickle_TypedDictMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TypedDictWithAddi, __pyx_k_pyx_unpickle_TypedDictWithAddi, sizeof(__pyx_k_pyx_unpickle_TypedDictWithAddi), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_UnionAlternative, __pyx_k_pyx_unpickle_UnionAlternative, sizeof(__pyx_k_pyx_unpickle_UnionAlternative), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_UnionMethod, __pyx_k_pyx_unpickle_UnionMethod, sizeof(__pyx_k_pyx_unpickle_UnionMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_ValueMethod, __pyx_k_pyx_unpickle_ValueMethod, sizeof(__pyx_k_pyx_unpickle_ValueMethod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_WrapperMethod, __pyx_k_pyx_unpickle_WrapperMethod, sizeof(__pyx_k_pyx_unpickle_WrapperMethod), 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_range, __pyx_k_range, sizeof(__pyx_k_range), 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_required, __pyx_k_required, sizeof(__pyx_k_required), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_serialize, __pyx_k_serialize, sizeof(__pyx_k_serialize), 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_skip_default, __pyx_k_skip_default, sizeof(__pyx_k_skip_default), 0, 0, 1, 1},
  {&__pyx_n_s_skip_if, __pyx_k_skip_if, sizeof(__pyx_k_skip_if), 0, 0, 1, 1},
  {&__pyx_n_s_skip_none, __pyx_k_skip_none, sizeof(__pyx_k_skip_none), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_tp, __pyx_k_tp, sizeof(__pyx_k_tp), 0, 0, 1, 1},
  {&__pyx_kp_u_tuple, __pyx_k_tuple, sizeof(__pyx_k_tuple), 0, 1, 0, 0},
  {&__pyx_kp_u_tuple_found, __pyx_k_tuple_found, sizeof(__pyx_k_tuple_found), 0, 1, 0, 0},
  {&__pyx_n_s_typed_dict, __pyx_k_typed_dict, sizeof(__pyx_k_typed_dict), 0, 0, 1, 1},
  {&__pyx_n_s_typing, __pyx_k_typing, sizeof(__pyx_k_typing), 0, 0, 1, 1},
  {&__pyx_n_s_undefined, __pyx_k_undefined, sizeof(__pyx_k_undefined), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_update_result, __pyx_k_update_result, sizeof(__pyx_k_update_result), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_value_method, __pyx_k_value_method, sizeof(__pyx_k_value_method), 0, 0, 1, 1},
  {&__pyx_n_s_wrapped, __pyx_k_wrapped, sizeof(__pyx_k_wrapped), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 510, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 537, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 578, __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);

  /* "(tree fragment)":1
 * def __pyx_unpickle_SerializationMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple_ = 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_)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);
  __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SerializationMeth, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__3 = 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__3)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);
  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_IdentityMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__5 = 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__5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);
  __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ListMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__7 = 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__7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);
  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DictMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__9 = 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__9)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);
  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_StrMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__11 = 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__11)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);
  __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_IntMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__13 = 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__13)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);
  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BoolMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__15 = 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__15)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);
  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FloatMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__17 = 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__17)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);
  __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_NoneMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__19 = 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__19)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);
  __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_RecMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__21 = 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__21)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);
  __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AnyMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__23 = 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__23)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);
  __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Fallback, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__25 = 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__25)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);
  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_NoFallback, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__27 = 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__27)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);
  __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AnyFallback, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__29 = 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__29)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);
  __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_TypeCheckIdentity, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__31 = 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__31)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);
  __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_TypeCheckMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__33 = 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__33)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);
  __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_CollectionCheckOn, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__35 = 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__35)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);
  __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_CollectionMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__37 = 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__37)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);
  __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_ValueMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__39 = 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__39)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);
  __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_EnumMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__41 = 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__41)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);
  __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_MappingCheckOnlyM, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__43 = 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__43)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);
  __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_MappingMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__45 = 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__45)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);
  __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BaseField, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__47 = 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__47)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);
  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_IdentityField, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__49 = 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__49)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);
  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SimpleField, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__51 = 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__51)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);
  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_ComplexField, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__53 = 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__53)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);
  __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_SerializedField, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__55 = 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__55)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);
  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_ObjectMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__57 = 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__57)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);
  __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_ClassMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__59 = 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__59)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);
  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ClassWithFieldsSe, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__61 = 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__61)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);
  __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TypedDictMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__63 = 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__63)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);
  __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TypedDictWithAddi, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__65 = 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__65)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);
  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TupleCheckOnlyMet, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__67 = 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__67)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);
  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TupleMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__69 = 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__69)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);
  __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CheckedTupleMetho, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__71 = 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__71)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_OptionalMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__73 = 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__73)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);
  __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_UnionAlternative, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__75 = 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__75)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);
  __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DiscriminatedAlte, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__77 = 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__77)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_UnionMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__79 = 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__79)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_WrapperMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__81 = 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__81)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_ConversionMethod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__83 = 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__83)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DiscriminateTyped, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyDict_Type_update.type = (PyObject*)&PyDict_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5409203 = PyInt_FromLong(5409203L); if (unlikely(!__pyx_int_5409203)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_11541673 = PyInt_FromLong(11541673L); if (unlikely(!__pyx_int_11541673)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_35130462 = PyInt_FromLong(35130462L); if (unlikely(!__pyx_int_35130462)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_43145208 = PyInt_FromLong(43145208L); if (unlikely(!__pyx_int_43145208)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_53933573 = PyInt_FromLong(53933573L); if (unlikely(!__pyx_int_53933573)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_81520499 = PyInt_FromLong(81520499L); if (unlikely(!__pyx_int_81520499)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_105653666 = PyInt_FromLong(105653666L); if (unlikely(!__pyx_int_105653666)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_116866438 = PyInt_FromLong(116866438L); if (unlikely(!__pyx_int_116866438)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_154713286 = PyInt_FromLong(154713286L); if (unlikely(!__pyx_int_154713286)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_156396561 = PyInt_FromLong(156396561L); if (unlikely(!__pyx_int_156396561)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_174143295 = PyInt_FromLong(174143295L); if (unlikely(!__pyx_int_174143295)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_182511919 = PyInt_FromLong(182511919L); if (unlikely(!__pyx_int_182511919)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_184665373 = PyInt_FromLong(184665373L); if (unlikely(!__pyx_int_184665373)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_194641702 = PyInt_FromLong(194641702L); if (unlikely(!__pyx_int_194641702)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_196591457 = PyInt_FromLong(196591457L); if (unlikely(!__pyx_int_196591457)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_198137430 = PyInt_FromLong(198137430L); if (unlikely(!__pyx_int_198137430)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_222851131 = PyInt_FromLong(222851131L); if (unlikely(!__pyx_int_222851131)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_230527516 = PyInt_FromLong(230527516L); if (unlikely(!__pyx_int_230527516)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_232525783 = PyInt_FromLong(232525783L); if (unlikely(!__pyx_int_232525783)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_233695972 = PyInt_FromLong(233695972L); if (unlikely(!__pyx_int_233695972)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_234659050 = PyInt_FromLong(234659050L); if (unlikely(!__pyx_int_234659050)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_258009577 = PyInt_FromLong(258009577L); if (unlikely(!__pyx_int_258009577)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_264121134 = PyInt_FromLong(264121134L); if (unlikely(!__pyx_int_264121134)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_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
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_SerializationMethod) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_SerializationMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_SerializationMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_SerializationMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_SerializationMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SerializationMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_SerializationMethod) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_SerializationMethod) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod = &__pyx_type_9apischema_13serialization_7methods_SerializationMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_IdentityMethod = &__pyx_vtable_9apischema_13serialization_7methods_IdentityMethod;
  __pyx_vtable_9apischema_13serialization_7methods_IdentityMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_IdentityMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_14IdentityMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_14IdentityMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_IdentityMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_IdentityMethod) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_IdentityMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_IdentityMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_IdentityMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_IdentityMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_IdentityMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_IdentityMethod) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IdentityMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_IdentityMethod) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_IdentityMethod) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_IdentityMethod = &__pyx_type_9apischema_13serialization_7methods_IdentityMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_ListMethod = &__pyx_vtable_9apischema_13serialization_7methods_ListMethod;
  __pyx_vtable_9apischema_13serialization_7methods_ListMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_ListMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10ListMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_10ListMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_ListMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_ListMethod) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_ListMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_ListMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_ListMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_ListMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_ListMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_ListMethod) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ListMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_ListMethod) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_ListMethod) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_ListMethod = &__pyx_type_9apischema_13serialization_7methods_ListMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_DictMethod = &__pyx_vtable_9apischema_13serialization_7methods_DictMethod;
  __pyx_vtable_9apischema_13serialization_7methods_DictMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_DictMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10DictMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_10DictMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_DictMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_DictMethod) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_DictMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_DictMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_DictMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_DictMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_DictMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_DictMethod) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DictMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_DictMethod) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_DictMethod) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_DictMethod = &__pyx_type_9apischema_13serialization_7methods_DictMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_StrMethod = &__pyx_vtable_9apischema_13serialization_7methods_StrMethod;
  __pyx_vtable_9apischema_13serialization_7methods_StrMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_StrMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9StrMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_9StrMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_StrMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_StrMethod) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_StrMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_StrMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_StrMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_StrMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_StrMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_StrMethod) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StrMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_StrMethod) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_StrMethod) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_StrMethod = &__pyx_type_9apischema_13serialization_7methods_StrMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_IntMethod = &__pyx_vtable_9apischema_13serialization_7methods_IntMethod;
  __pyx_vtable_9apischema_13serialization_7methods_IntMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_IntMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9IntMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_9IntMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_IntMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_IntMethod) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_IntMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_IntMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_IntMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_IntMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_IntMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_IntMethod) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IntMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_IntMethod) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_IntMethod) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_IntMethod = &__pyx_type_9apischema_13serialization_7methods_IntMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_BoolMethod = &__pyx_vtable_9apischema_13serialization_7methods_BoolMethod;
  __pyx_vtable_9apischema_13serialization_7methods_BoolMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_BoolMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10BoolMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_10BoolMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_BoolMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_BoolMethod) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_BoolMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_BoolMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_BoolMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_BoolMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_BoolMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_BoolMethod) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BoolMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_BoolMethod) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_BoolMethod) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_BoolMethod = &__pyx_type_9apischema_13serialization_7methods_BoolMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_FloatMethod = &__pyx_vtable_9apischema_13serialization_7methods_FloatMethod;
  __pyx_vtable_9apischema_13serialization_7methods_FloatMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_FloatMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11FloatMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_11FloatMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_FloatMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_FloatMethod) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_FloatMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_FloatMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_FloatMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_FloatMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_FloatMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_FloatMethod) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FloatMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_FloatMethod) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_FloatMethod) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_FloatMethod = &__pyx_type_9apischema_13serialization_7methods_FloatMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_NoneMethod = &__pyx_vtable_9apischema_13serialization_7methods_NoneMethod;
  __pyx_vtable_9apischema_13serialization_7methods_NoneMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_NoneMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10NoneMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_10NoneMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_NoneMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_NoneMethod) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_NoneMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_NoneMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_NoneMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_NoneMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_NoneMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_NoneMethod) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NoneMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_NoneMethod) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_NoneMethod) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_NoneMethod = &__pyx_type_9apischema_13serialization_7methods_NoneMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_RecMethod = &__pyx_vtable_9apischema_13serialization_7methods_RecMethod;
  __pyx_vtable_9apischema_13serialization_7methods_RecMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_RecMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9RecMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_9RecMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_RecMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_RecMethod) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_RecMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_RecMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_RecMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_RecMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_RecMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_RecMethod) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RecMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_RecMethod) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_RecMethod) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_RecMethod = &__pyx_type_9apischema_13serialization_7methods_RecMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_AnyMethod = &__pyx_vtable_9apischema_13serialization_7methods_AnyMethod;
  __pyx_vtable_9apischema_13serialization_7methods_AnyMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_AnyMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_9AnyMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_9AnyMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_AnyMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_AnyMethod) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_AnyMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_AnyMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_AnyMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_AnyMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_AnyMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_AnyMethod) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AnyMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_AnyMethod) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_AnyMethod) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_AnyMethod = &__pyx_type_9apischema_13serialization_7methods_AnyMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_Fallback) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_Fallback.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_Fallback.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_Fallback.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_Fallback.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Fallback, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_Fallback) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_Fallback) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_Fallback = &__pyx_type_9apischema_13serialization_7methods_Fallback;
  __pyx_vtabptr_9apischema_13serialization_7methods_NoFallback = &__pyx_vtable_9apischema_13serialization_7methods_NoFallback;
  __pyx_vtable_9apischema_13serialization_7methods_NoFallback.fall_back = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_NoFallback *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9apischema_13serialization_7methods_10NoFallback_fall_back;
  __pyx_type_9apischema_13serialization_7methods_NoFallback.tp_base = __pyx_ptype_9apischema_13serialization_7methods_Fallback;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_NoFallback) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_NoFallback.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_NoFallback.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_NoFallback.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_NoFallback.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_NoFallback.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_NoFallback) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NoFallback, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_NoFallback) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_NoFallback) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_NoFallback = &__pyx_type_9apischema_13serialization_7methods_NoFallback;
  __pyx_vtabptr_9apischema_13serialization_7methods_AnyFallback = &__pyx_vtable_9apischema_13serialization_7methods_AnyFallback;
  __pyx_vtable_9apischema_13serialization_7methods_AnyFallback.fall_back = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_AnyFallback *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9apischema_13serialization_7methods_11AnyFallback_fall_back;
  __pyx_type_9apischema_13serialization_7methods_AnyFallback.tp_base = __pyx_ptype_9apischema_13serialization_7methods_Fallback;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_AnyFallback) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_AnyFallback.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_AnyFallback.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_AnyFallback.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_AnyFallback.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_AnyFallback.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_AnyFallback) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AnyFallback, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_AnyFallback) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_AnyFallback) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_AnyFallback = &__pyx_type_9apischema_13serialization_7methods_AnyFallback;
  __pyx_vtabptr_9apischema_13serialization_7methods_TypeCheckIdentityMethod = &__pyx_vtable_9apischema_13serialization_7methods_TypeCheckIdentityMethod;
  __pyx_vtable_9apischema_13serialization_7methods_TypeCheckIdentityMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckIdentityMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_23TypeCheckIdentityMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_TypeCheckIdentityMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_TypeCheckIdentityMethod) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_TypeCheckIdentityMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_TypeCheckIdentityMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_TypeCheckIdentityMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_TypeCheckIdentityMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_TypeCheckIdentityMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_TypeCheckIdentityMethod) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TypeCheckIdentityMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_TypeCheckIdentityMethod) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_TypeCheckIdentityMethod) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_TypeCheckIdentityMethod = &__pyx_type_9apischema_13serialization_7methods_TypeCheckIdentityMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_TypeCheckMethod = &__pyx_vtable_9apischema_13serialization_7methods_TypeCheckMethod;
  __pyx_vtable_9apischema_13serialization_7methods_TypeCheckMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_TypeCheckMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_15TypeCheckMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_15TypeCheckMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_TypeCheckMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_TypeCheckMethod) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_TypeCheckMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_TypeCheckMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_TypeCheckMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_TypeCheckMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_TypeCheckMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_TypeCheckMethod) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TypeCheckMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_TypeCheckMethod) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_TypeCheckMethod) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_TypeCheckMethod = &__pyx_type_9apischema_13serialization_7methods_TypeCheckMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_CollectionCheckOnlyMethod = &__pyx_vtable_9apischema_13serialization_7methods_CollectionCheckOnlyMethod;
  __pyx_vtable_9apischema_13serialization_7methods_CollectionCheckOnlyMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_CollectionCheckOnlyMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_25CollectionCheckOnlyMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_CollectionCheckOnlyMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_CollectionCheckOnlyMethod) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_CollectionCheckOnlyMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_CollectionCheckOnlyMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_CollectionCheckOnlyMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_CollectionCheckOnlyMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_CollectionCheckOnlyMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_CollectionCheckOnlyMethod) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CollectionCheckOnlyMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_CollectionCheckOnlyMethod) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_CollectionCheckOnlyMethod) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_CollectionCheckOnlyMethod = &__pyx_type_9apischema_13serialization_7methods_CollectionCheckOnlyMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_CollectionMethod = &__pyx_vtable_9apischema_13serialization_7methods_CollectionMethod;
  __pyx_vtable_9apischema_13serialization_7methods_CollectionMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_CollectionMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_16CollectionMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_16CollectionMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_CollectionMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_CollectionMethod) < 0) __PYX_ERR(0, 160, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_CollectionMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_CollectionMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_CollectionMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_CollectionMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_CollectionMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_CollectionMethod) < 0) __PYX_ERR(0, 160, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CollectionMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_CollectionMethod) < 0) __PYX_ERR(0, 160, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_CollectionMethod) < 0) __PYX_ERR(0, 160, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_CollectionMethod = &__pyx_type_9apischema_13serialization_7methods_CollectionMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_ValueMethod = &__pyx_vtable_9apischema_13serialization_7methods_ValueMethod;
  __pyx_vtable_9apischema_13serialization_7methods_ValueMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_ValueMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11ValueMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_11ValueMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_ValueMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_ValueMethod) < 0) __PYX_ERR(0, 170, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_ValueMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_ValueMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_ValueMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_ValueMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_ValueMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_ValueMethod) < 0) __PYX_ERR(0, 170, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ValueMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_ValueMethod) < 0) __PYX_ERR(0, 170, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_ValueMethod) < 0) __PYX_ERR(0, 170, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_ValueMethod = &__pyx_type_9apischema_13serialization_7methods_ValueMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_EnumMethod = &__pyx_vtable_9apischema_13serialization_7methods_EnumMethod;
  __pyx_vtable_9apischema_13serialization_7methods_EnumMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_EnumMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_10EnumMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_10EnumMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_EnumMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_EnumMethod) < 0) __PYX_ERR(0, 178, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_EnumMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_EnumMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_EnumMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_EnumMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_EnumMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_EnumMethod) < 0) __PYX_ERR(0, 178, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EnumMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_EnumMethod) < 0) __PYX_ERR(0, 178, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_EnumMethod) < 0) __PYX_ERR(0, 178, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_EnumMethod = &__pyx_type_9apischema_13serialization_7methods_EnumMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_MappingCheckOnlyMethod = &__pyx_vtable_9apischema_13serialization_7methods_MappingCheckOnlyMethod;
  __pyx_vtable_9apischema_13serialization_7methods_MappingCheckOnlyMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_MappingCheckOnlyMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_22MappingCheckOnlyMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_MappingCheckOnlyMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_MappingCheckOnlyMethod) < 0) __PYX_ERR(0, 188, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_MappingCheckOnlyMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_MappingCheckOnlyMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_MappingCheckOnlyMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_MappingCheckOnlyMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_MappingCheckOnlyMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_MappingCheckOnlyMethod) < 0) __PYX_ERR(0, 188, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MappingCheckOnlyMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_MappingCheckOnlyMethod) < 0) __PYX_ERR(0, 188, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_MappingCheckOnlyMethod) < 0) __PYX_ERR(0, 188, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_MappingCheckOnlyMethod = &__pyx_type_9apischema_13serialization_7methods_MappingCheckOnlyMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_MappingMethod = &__pyx_vtable_9apischema_13serialization_7methods_MappingMethod;
  __pyx_vtable_9apischema_13serialization_7methods_MappingMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_MappingMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_13MappingMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_13MappingMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_MappingMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_MappingMethod) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_MappingMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_MappingMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_MappingMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_MappingMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_MappingMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_MappingMethod) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MappingMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_MappingMethod) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_MappingMethod) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_MappingMethod = &__pyx_type_9apischema_13serialization_7methods_MappingMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_BaseField) < 0) __PYX_ERR(0, 212, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_BaseField.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_BaseField.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_BaseField.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_BaseField.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseField, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_BaseField) < 0) __PYX_ERR(0, 212, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_BaseField) < 0) __PYX_ERR(0, 212, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_BaseField = &__pyx_type_9apischema_13serialization_7methods_BaseField;
  __pyx_vtabptr_9apischema_13serialization_7methods_IdentityField = &__pyx_vtable_9apischema_13serialization_7methods_IdentityField;
  __pyx_vtable_9apischema_13serialization_7methods_IdentityField.update_result = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *, PyObject *, PyObject *, int, int, int __pyx_skip_dispatch))__pyx_f_9apischema_13serialization_7methods_13IdentityField_update_result;
  __pyx_type_9apischema_13serialization_7methods_IdentityField.tp_base = __pyx_ptype_9apischema_13serialization_7methods_BaseField;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_IdentityField) < 0) __PYX_ERR(0, 215, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_IdentityField.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_IdentityField.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_IdentityField.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_IdentityField.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_IdentityField.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_IdentityField) < 0) __PYX_ERR(0, 215, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IdentityField, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_IdentityField) < 0) __PYX_ERR(0, 215, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_IdentityField) < 0) __PYX_ERR(0, 215, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_IdentityField = &__pyx_type_9apischema_13serialization_7methods_IdentityField;
  __pyx_vtabptr_9apischema_13serialization_7methods_SimpleField = &__pyx_vtable_9apischema_13serialization_7methods_SimpleField;
  __pyx_vtable_9apischema_13serialization_7methods_SimpleField.__pyx_base = *__pyx_vtabptr_9apischema_13serialization_7methods_IdentityField;
  __pyx_vtable_9apischema_13serialization_7methods_SimpleField.__pyx_base.update_result = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *, PyObject *, PyObject *, int, int, int __pyx_skip_dispatch))__pyx_f_9apischema_13serialization_7methods_11SimpleField_update_result;
  __pyx_type_9apischema_13serialization_7methods_SimpleField.tp_base = __pyx_ptype_9apischema_13serialization_7methods_IdentityField;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_SimpleField) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_SimpleField.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_SimpleField.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_SimpleField.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_SimpleField.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_SimpleField.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_SimpleField) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SimpleField, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_SimpleField) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_SimpleField) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_SimpleField = &__pyx_type_9apischema_13serialization_7methods_SimpleField;
  __pyx_vtabptr_9apischema_13serialization_7methods_ComplexField = &__pyx_vtable_9apischema_13serialization_7methods_ComplexField;
  __pyx_vtable_9apischema_13serialization_7methods_ComplexField.__pyx_base = *__pyx_vtabptr_9apischema_13serialization_7methods_SimpleField;
  __pyx_vtable_9apischema_13serialization_7methods_ComplexField.__pyx_base.__pyx_base.update_result = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_IdentityField *, PyObject *, PyObject *, int, int, int __pyx_skip_dispatch))__pyx_f_9apischema_13serialization_7methods_12ComplexField_update_result;
  __pyx_type_9apischema_13serialization_7methods_ComplexField.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SimpleField;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_ComplexField) < 0) __PYX_ERR(0, 242, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_ComplexField.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_ComplexField.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_ComplexField.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_ComplexField.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_ComplexField.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_ComplexField) < 0) __PYX_ERR(0, 242, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ComplexField, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_ComplexField) < 0) __PYX_ERR(0, 242, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_ComplexField) < 0) __PYX_ERR(0, 242, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_ComplexField = &__pyx_type_9apischema_13serialization_7methods_ComplexField;
  __pyx_vtabptr_9apischema_13serialization_7methods_SerializedField = &__pyx_vtable_9apischema_13serialization_7methods_SerializedField;
  __pyx_vtable_9apischema_13serialization_7methods_SerializedField.update_result = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_SerializedField *, PyObject *, PyObject *, int, int, int __pyx_skip_dispatch))__pyx_f_9apischema_13serialization_7methods_15SerializedField_update_result;
  __pyx_type_9apischema_13serialization_7methods_SerializedField.tp_base = __pyx_ptype_9apischema_13serialization_7methods_BaseField;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_SerializedField) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_SerializedField.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_SerializedField.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_SerializedField.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_SerializedField.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_SerializedField.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_SerializedField) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SerializedField, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_SerializedField) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_SerializedField) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_SerializedField = &__pyx_type_9apischema_13serialization_7methods_SerializedField;
  __pyx_type_9apischema_13serialization_7methods_ObjectMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_ObjectMethod) < 0) __PYX_ERR(0, 286, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_ObjectMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_ObjectMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_ObjectMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_ObjectMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ObjectMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_ObjectMethod) < 0) __PYX_ERR(0, 286, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_ObjectMethod) < 0) __PYX_ERR(0, 286, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_ObjectMethod = &__pyx_type_9apischema_13serialization_7methods_ObjectMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_ClassMethod = &__pyx_vtable_9apischema_13serialization_7methods_ClassMethod;
  __pyx_vtable_9apischema_13serialization_7methods_ClassMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_ClassMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11ClassMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_11ClassMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_ClassMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_ObjectMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_ClassMethod) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_ClassMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_ClassMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_ClassMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_ClassMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_ClassMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_ClassMethod) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ClassMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_ClassMethod) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_ClassMethod) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_ClassMethod = &__pyx_type_9apischema_13serialization_7methods_ClassMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_ClassWithFieldsSetMethod = &__pyx_vtable_9apischema_13serialization_7methods_ClassWithFieldsSetMethod;
  __pyx_vtable_9apischema_13serialization_7methods_ClassWithFieldsSetMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_ClassWithFieldsSetMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_24ClassWithFieldsSetMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_ClassWithFieldsSetMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_ObjectMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_ClassWithFieldsSetMethod) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_ClassWithFieldsSetMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_ClassWithFieldsSetMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_ClassWithFieldsSetMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_ClassWithFieldsSetMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_ClassWithFieldsSetMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_ClassWithFieldsSetMethod) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ClassWithFieldsSetMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_ClassWithFieldsSetMethod) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_ClassWithFieldsSetMethod) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_ClassWithFieldsSetMethod = &__pyx_type_9apischema_13serialization_7methods_ClassWithFieldsSetMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_TypedDictMethod = &__pyx_vtable_9apischema_13serialization_7methods_TypedDictMethod;
  __pyx_vtable_9apischema_13serialization_7methods_TypedDictMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_15TypedDictMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_15TypedDictMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_TypedDictMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_ObjectMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_TypedDictMethod) < 0) __PYX_ERR(0, 311, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_TypedDictMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_TypedDictMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_TypedDictMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_TypedDictMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_TypedDictMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_TypedDictMethod) < 0) __PYX_ERR(0, 311, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TypedDictMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_TypedDictMethod) < 0) __PYX_ERR(0, 311, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_TypedDictMethod) < 0) __PYX_ERR(0, 311, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_TypedDictMethod = &__pyx_type_9apischema_13serialization_7methods_TypedDictMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod = &__pyx_vtable_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod;
  __pyx_vtable_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod.__pyx_base = *__pyx_vtabptr_9apischema_13serialization_7methods_TypedDictMethod;
  __pyx_vtable_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod.__pyx_base.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_TypedDictMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_15TypedDictMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_29TypedDictWithAdditionalMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_TypedDictMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod) < 0) __PYX_ERR(0, 320, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod) < 0) __PYX_ERR(0, 320, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TypedDictWithAdditionalMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod) < 0) __PYX_ERR(0, 320, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod) < 0) __PYX_ERR(0, 320, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod = &__pyx_type_9apischema_13serialization_7methods_TypedDictWithAdditionalMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_TupleCheckOnlyMethod = &__pyx_vtable_9apischema_13serialization_7methods_TupleCheckOnlyMethod;
  __pyx_vtable_9apischema_13serialization_7methods_TupleCheckOnlyMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_TupleCheckOnlyMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_20TupleCheckOnlyMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_TupleCheckOnlyMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_TupleCheckOnlyMethod) < 0) __PYX_ERR(0, 333, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_TupleCheckOnlyMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_TupleCheckOnlyMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_TupleCheckOnlyMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_TupleCheckOnlyMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_TupleCheckOnlyMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_TupleCheckOnlyMethod) < 0) __PYX_ERR(0, 333, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TupleCheckOnlyMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_TupleCheckOnlyMethod) < 0) __PYX_ERR(0, 333, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_TupleCheckOnlyMethod) < 0) __PYX_ERR(0, 333, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_TupleCheckOnlyMethod = &__pyx_type_9apischema_13serialization_7methods_TupleCheckOnlyMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_TupleMethod = &__pyx_vtable_9apischema_13serialization_7methods_TupleMethod;
  __pyx_vtable_9apischema_13serialization_7methods_TupleMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_TupleMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11TupleMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_11TupleMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_TupleMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_TupleMethod) < 0) __PYX_ERR(0, 343, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_TupleMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_TupleMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_TupleMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_TupleMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_TupleMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_TupleMethod) < 0) __PYX_ERR(0, 343, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TupleMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_TupleMethod) < 0) __PYX_ERR(0, 343, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_TupleMethod) < 0) __PYX_ERR(0, 343, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_TupleMethod = &__pyx_type_9apischema_13serialization_7methods_TupleMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_CheckedTupleMethod = &__pyx_vtable_9apischema_13serialization_7methods_CheckedTupleMethod;
  __pyx_vtable_9apischema_13serialization_7methods_CheckedTupleMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_CheckedTupleMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_18CheckedTupleMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_18CheckedTupleMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_CheckedTupleMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_CheckedTupleMethod) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_CheckedTupleMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_CheckedTupleMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_CheckedTupleMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_CheckedTupleMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_CheckedTupleMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_CheckedTupleMethod) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CheckedTupleMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_CheckedTupleMethod) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_CheckedTupleMethod) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_CheckedTupleMethod = &__pyx_type_9apischema_13serialization_7methods_CheckedTupleMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_OptionalMethod = &__pyx_vtable_9apischema_13serialization_7methods_OptionalMethod;
  __pyx_vtable_9apischema_13serialization_7methods_OptionalMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_OptionalMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_14OptionalMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_14OptionalMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_OptionalMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_OptionalMethod) < 0) __PYX_ERR(0, 365, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_OptionalMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_OptionalMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_OptionalMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_OptionalMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_OptionalMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_OptionalMethod) < 0) __PYX_ERR(0, 365, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OptionalMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_OptionalMethod) < 0) __PYX_ERR(0, 365, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_OptionalMethod) < 0) __PYX_ERR(0, 365, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_OptionalMethod = &__pyx_type_9apischema_13serialization_7methods_OptionalMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_UnionAlternative = &__pyx_vtable_9apischema_13serialization_7methods_UnionAlternative;
  __pyx_vtable_9apischema_13serialization_7methods_UnionAlternative.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_16UnionAlternative_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_16UnionAlternative_serialize;
  __pyx_type_9apischema_13serialization_7methods_UnionAlternative.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_UnionAlternative) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_UnionAlternative.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_UnionAlternative.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_UnionAlternative.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_UnionAlternative.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_UnionAlternative.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_UnionAlternative) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UnionAlternative, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_UnionAlternative) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_UnionAlternative) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_UnionAlternative = &__pyx_type_9apischema_13serialization_7methods_UnionAlternative;
  __pyx_vtabptr_9apischema_13serialization_7methods_DiscriminatedAlternative = &__pyx_vtable_9apischema_13serialization_7methods_DiscriminatedAlternative;
  __pyx_vtable_9apischema_13serialization_7methods_DiscriminatedAlternative.__pyx_base = *__pyx_vtabptr_9apischema_13serialization_7methods_UnionAlternative;
  __pyx_vtable_9apischema_13serialization_7methods_DiscriminatedAlternative.__pyx_base.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_UnionAlternative *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_16UnionAlternative_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_24DiscriminatedAlternative_serialize;
  __pyx_type_9apischema_13serialization_7methods_DiscriminatedAlternative.tp_base = __pyx_ptype_9apischema_13serialization_7methods_UnionAlternative;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_DiscriminatedAlternative) < 0) __PYX_ERR(0, 387, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_DiscriminatedAlternative.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_DiscriminatedAlternative.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_DiscriminatedAlternative.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_DiscriminatedAlternative.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_DiscriminatedAlternative.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_DiscriminatedAlternative) < 0) __PYX_ERR(0, 387, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DiscriminatedAlternative, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_DiscriminatedAlternative) < 0) __PYX_ERR(0, 387, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_DiscriminatedAlternative) < 0) __PYX_ERR(0, 387, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_DiscriminatedAlternative = &__pyx_type_9apischema_13serialization_7methods_DiscriminatedAlternative;
  __pyx_vtabptr_9apischema_13serialization_7methods_UnionMethod = &__pyx_vtable_9apischema_13serialization_7methods_UnionMethod;
  __pyx_vtable_9apischema_13serialization_7methods_UnionMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_UnionMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_11UnionMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_11UnionMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_UnionMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_UnionMethod) < 0) __PYX_ERR(0, 401, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_UnionMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_UnionMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_UnionMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_UnionMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_UnionMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_UnionMethod) < 0) __PYX_ERR(0, 401, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UnionMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_UnionMethod) < 0) __PYX_ERR(0, 401, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_UnionMethod) < 0) __PYX_ERR(0, 401, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_UnionMethod = &__pyx_type_9apischema_13serialization_7methods_UnionMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_WrapperMethod = &__pyx_vtable_9apischema_13serialization_7methods_WrapperMethod;
  __pyx_vtable_9apischema_13serialization_7methods_WrapperMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_WrapperMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_13WrapperMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_13WrapperMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_WrapperMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_WrapperMethod) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_WrapperMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_WrapperMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_WrapperMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_WrapperMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_WrapperMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_WrapperMethod) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_WrapperMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_WrapperMethod) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_WrapperMethod) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_WrapperMethod = &__pyx_type_9apischema_13serialization_7methods_WrapperMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_ConversionMethod = &__pyx_vtable_9apischema_13serialization_7methods_ConversionMethod;
  __pyx_vtable_9apischema_13serialization_7methods_ConversionMethod.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_ConversionMethod *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_16ConversionMethod_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_16ConversionMethod_serialize;
  __pyx_type_9apischema_13serialization_7methods_ConversionMethod.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_ConversionMethod) < 0) __PYX_ERR(0, 423, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_ConversionMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_ConversionMethod.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_ConversionMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_ConversionMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_ConversionMethod.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_ConversionMethod) < 0) __PYX_ERR(0, 423, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ConversionMethod, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_ConversionMethod) < 0) __PYX_ERR(0, 423, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_ConversionMethod) < 0) __PYX_ERR(0, 423, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_ConversionMethod = &__pyx_type_9apischema_13serialization_7methods_ConversionMethod;
  __pyx_vtabptr_9apischema_13serialization_7methods_DiscriminateTypedDict = &__pyx_vtable_9apischema_13serialization_7methods_DiscriminateTypedDict;
  __pyx_vtable_9apischema_13serialization_7methods_DiscriminateTypedDict.serialize = (PyObject *(*)(struct __pyx_obj_9apischema_13serialization_7methods_DiscriminateTypedDict *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9apischema_13serialization_7methods_21DiscriminateTypedDict_serialize *__pyx_optional_args))__pyx_f_9apischema_13serialization_7methods_21DiscriminateTypedDict_serialize;
  __pyx_type_9apischema_13serialization_7methods_DiscriminateTypedDict.tp_base = __pyx_ptype_9apischema_13serialization_7methods_SerializationMethod;
  if (PyType_Ready(&__pyx_type_9apischema_13serialization_7methods_DiscriminateTypedDict) < 0) __PYX_ERR(0, 435, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9apischema_13serialization_7methods_DiscriminateTypedDict.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9apischema_13serialization_7methods_DiscriminateTypedDict.tp_dictoffset && __pyx_type_9apischema_13serialization_7methods_DiscriminateTypedDict.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9apischema_13serialization_7methods_DiscriminateTypedDict.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9apischema_13serialization_7methods_DiscriminateTypedDict.tp_dict, __pyx_vtabptr_9apischema_13serialization_7methods_DiscriminateTypedDict) < 0) __PYX_ERR(0, 435, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DiscriminateTypedDict, (PyObject *)&__pyx_type_9apischema_13serialization_7methods_DiscriminateTypedDict) < 0) __PYX_ERR(0, 435, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9apischema_13serialization_7methods_DiscriminateTypedDict) < 0) __PYX_ERR(0, 435, __pyx_L1_error)
  __pyx_ptype_9apischema_13serialization_7methods_DiscriminateTypedDict = &__pyx_type_9apischema_13serialization_7methods_DiscriminateTypedDict;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initmethods(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initmethods(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_methods(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_methods(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_methods(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'methods' 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_methods(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("methods", __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_apischema__serialization__methods) {
    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, "apischema.serialization.methods")) {
      if (unlikely(PyDict_SetItemString(modules, "apischema.serialization.methods", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "apischema/serialization/methods.pyx":2
 * cimport cython
 * from dataclasses import dataclass, field             # <<<<<<<<<<<<<<
 * from typing import AbstractSet, Any, Callable, Dict, Optional, Tuple, Union
 * 
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_dataclass);
  __Pyx_GIVEREF(__pyx_n_s_dataclass);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_dataclass);
  __Pyx_INCREF(__pyx_n_s_field);
  __Pyx_GIVEREF(__pyx_n_s_field);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_field);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_dataclasses, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_dataclass); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_dataclass, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_field, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apischema/serialization/methods.pyx":3
 * cimport cython
 * from dataclasses import dataclass, field
 * from typing import AbstractSet, Any, Callable, Dict, Optional, Tuple, Union             # <<<<<<<<<<<<<<
 * 
 * from apischema.conversions.utils import Converter
 */
  __pyx_t_2 = PyList_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_AbstractSet);
  __Pyx_GIVEREF(__pyx_n_s_AbstractSet);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_AbstractSet);
  __Pyx_INCREF(__pyx_n_s_Any);
  __Pyx_GIVEREF(__pyx_n_s_Any);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Any);
  __Pyx_INCREF(__pyx_n_s_Callable);
  __Pyx_GIVEREF(__pyx_n_s_Callable);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_Callable);
  __Pyx_INCREF(__pyx_n_s_Dict);
  __Pyx_GIVEREF(__pyx_n_s_Dict);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_Dict);
  __Pyx_INCREF(__pyx_n_s_Optional);
  __Pyx_GIVEREF(__pyx_n_s_Optional);
  PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_Optional);
  __Pyx_INCREF(__pyx_n_s_Tuple);
  __Pyx_GIVEREF(__pyx_n_s_Tuple);
  PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_Tuple);
  __Pyx_INCREF(__pyx_n_s_Union);
  __Pyx_GIVEREF(__pyx_n_s_Union);
  PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_Union);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_AbstractSet); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AbstractSet, __pyx_t_2) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Any, __pyx_t_2) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Callable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Callable, __pyx_t_2) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Dict, __pyx_t_2) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Optional); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Optional, __pyx_t_2) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Tuple, __pyx_t_2) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Union); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Union, __pyx_t_2) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":5
 * from typing import AbstractSet, Any, Callable, Dict, Optional, Tuple, Union
 * 
 * from apischema.conversions.utils import Converter             # <<<<<<<<<<<<<<
 * from apischema.fields import FIELDS_SET_ATTR
 * from apischema.serialization.errors import TypeCheckError
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Converter);
  __Pyx_GIVEREF(__pyx_n_s_Converter);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Converter);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apischema_conversions_utils, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Converter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Converter, __pyx_t_1) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apischema/serialization/methods.pyx":6
 * 
 * from apischema.conversions.utils import Converter
 * from apischema.fields import FIELDS_SET_ATTR             # <<<<<<<<<<<<<<
 * from apischema.serialization.errors import TypeCheckError
 * from apischema.types import AnyType, Undefined
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_FIELDS_SET_ATTR);
  __Pyx_GIVEREF(__pyx_n_s_FIELDS_SET_ATTR);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_FIELDS_SET_ATTR);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apischema_fields, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_FIELDS_SET_ATTR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FIELDS_SET_ATTR, __pyx_t_2) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":7
 * from apischema.conversions.utils import Converter
 * from apischema.fields import FIELDS_SET_ATTR
 * from apischema.serialization.errors import TypeCheckError             # <<<<<<<<<<<<<<
 * from apischema.types import AnyType, Undefined
 * from apischema.utils import Lazy
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_TypeCheckError);
  __Pyx_GIVEREF(__pyx_n_s_TypeCheckError);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_TypeCheckError);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apischema_serialization_errors, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_TypeCheckError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TypeCheckError, __pyx_t_1) < 0) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apischema/serialization/methods.pyx":8
 * from apischema.fields import FIELDS_SET_ATTR
 * from apischema.serialization.errors import TypeCheckError
 * from apischema.types import AnyType, Undefined             # <<<<<<<<<<<<<<
 * from apischema.utils import Lazy
 * 
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_AnyType);
  __Pyx_GIVEREF(__pyx_n_s_AnyType);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_AnyType);
  __Pyx_INCREF(__pyx_n_s_Undefined);
  __Pyx_GIVEREF(__pyx_n_s_Undefined);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Undefined);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apischema_types, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_AnyType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AnyType, __pyx_t_2) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Undefined, __pyx_t_2) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apischema/serialization/methods.pyx":9
 * from apischema.serialization.errors import TypeCheckError
 * from apischema.types import AnyType, Undefined
 * from apischema.utils import Lazy             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Lazy);
  __Pyx_GIVEREF(__pyx_n_s_Lazy);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Lazy);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apischema_utils, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Lazy); 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_Lazy, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_SerializationMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_5__pyx_unpickle_SerializationMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SerializationMeth, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_SerializationMethod__set_state(<SerializationMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SerializationMethod__set_state(SerializationMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_7__pyx_unpickle_IdentityMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_IdentityMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ListMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_9__pyx_unpickle_ListMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ListMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_ListMethod__set_state(<ListMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ListMethod__set_state(ListMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_11__pyx_unpickle_DictMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DictMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_StrMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_13__pyx_unpickle_StrMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_StrMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_StrMethod__set_state(<StrMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_StrMethod__set_state(StrMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_15__pyx_unpickle_IntMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_IntMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BoolMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_17__pyx_unpickle_BoolMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BoolMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_BoolMethod__set_state(<BoolMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BoolMethod__set_state(BoolMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_19__pyx_unpickle_FloatMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FloatMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_NoneMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_21__pyx_unpickle_NoneMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_NoneMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_NoneMethod__set_state(<NoneMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NoneMethod__set_state(NoneMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_23__pyx_unpickle_RecMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_RecMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_AnyMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_25__pyx_unpickle_AnyMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_AnyMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_AnyMethod__set_state(<AnyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_AnyMethod__set_state(AnyMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.factory = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_27__pyx_unpickle_Fallback, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Fallback, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_NoFallback(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_29__pyx_unpickle_NoFallback, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_NoFallback, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_NoFallback__set_state(<NoFallback> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_NoFallback__set_state(NoFallback __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.tp = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_31__pyx_unpickle_AnyFallback, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_AnyFallback, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TypeCheckIdentityMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_33__pyx_unpickle_TypeCheckIdentityMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TypeCheckIdentity, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_TypeCheckIdentityMethod__set_state(<TypeCheckIdentityMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TypeCheckIdentityMethod__set_state(TypeCheckIdentityMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.expected = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_35__pyx_unpickle_TypeCheckMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TypeCheckMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CollectionCheckOnlyMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_37__pyx_unpickle_CollectionCheckOnlyMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CollectionCheckOn, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_CollectionCheckOnlyMethod__set_state(<CollectionCheckOnlyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CollectionCheckOnlyMethod__set_state(CollectionCheckOnlyMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.value_method = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_39__pyx_unpickle_CollectionMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CollectionMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ValueMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_41__pyx_unpickle_ValueMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ValueMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_ValueMethod__set_state(<ValueMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ValueMethod__set_state(ValueMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_43__pyx_unpickle_EnumMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_EnumMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_MappingCheckOnlyMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_45__pyx_unpickle_MappingCheckOnlyMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_MappingCheckOnlyM, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_MappingCheckOnlyMethod__set_state(<MappingCheckOnlyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_MappingCheckOnlyMethod__set_state(MappingCheckOnlyMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.key_method = __pyx_state[1]; __pyx_result.value_method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_47__pyx_unpickle_MappingMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_MappingMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BaseField(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_49__pyx_unpickle_BaseField, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BaseField, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_BaseField__set_state(<BaseField> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BaseField__set_state(BaseField __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_51__pyx_unpickle_IdentityField, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_IdentityField, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_SimpleField(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_53__pyx_unpickle_SimpleField, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SimpleField, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_SimpleField__set_state(<SimpleField> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SimpleField__set_state(SimpleField __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.method = __pyx_state[2]; __pyx_result.name = __pyx_state[3]; __pyx_result.required = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_55__pyx_unpickle_ComplexField, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ComplexField, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_SerializedField(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_57__pyx_unpickle_SerializedField, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SerializedField, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_SerializedField__set_state(<SerializedField> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SerializedField__set_state(SerializedField __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alias = __pyx_state[1]; __pyx_result.func = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.skip_none = __pyx_state[4]; __pyx_result.undefined = __pyx_state[5]
 *     if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_59__pyx_unpickle_ObjectMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ObjectMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ClassMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_61__pyx_unpickle_ClassMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ClassMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_ClassMethod__set_state(<ClassMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ClassMethod__set_state(ClassMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_63__pyx_unpickle_ClassWithFieldsSetMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ClassWithFieldsSe, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TypedDictMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_65__pyx_unpickle_TypedDictMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TypedDictMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_TypedDictMethod__set_state(<TypedDictMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TypedDictMethod__set_state(TypedDictMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.fields = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_67__pyx_unpickle_TypedDictWithAdditionalMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TypedDictWithAddi, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TupleCheckOnlyMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_69__pyx_unpickle_TupleCheckOnlyMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TupleCheckOnlyMet, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_TupleCheckOnlyMethod__set_state(<TupleCheckOnlyMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleCheckOnlyMethod__set_state(TupleCheckOnlyMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.elt_methods = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_71__pyx_unpickle_TupleMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TupleMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CheckedTupleMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_73__pyx_unpickle_CheckedTupleMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CheckedTupleMetho, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_CheckedTupleMethod__set_state(<CheckedTupleMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CheckedTupleMethod__set_state(CheckedTupleMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.method = __pyx_state[1]; __pyx_result.nb_elts = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_75__pyx_unpickle_OptionalMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_OptionalMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_UnionAlternative(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_77__pyx_unpickle_UnionAlternative, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_UnionAlternative, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_UnionAlternative__set_state(<UnionAlternative> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_UnionAlternative__set_state(UnionAlternative __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.cls = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_79__pyx_unpickle_DiscriminatedAlternative, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DiscriminatedAlte, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_UnionMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_81__pyx_unpickle_UnionMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_UnionMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_UnionMethod__set_state(<UnionMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_UnionMethod__set_state(UnionMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.alternatives = __pyx_state[1]; __pyx_result.fallback = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_83__pyx_unpickle_WrapperMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_WrapperMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ConversionMethod(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_85__pyx_unpickle_ConversionMethod, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ConversionMethod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_ConversionMethod__set_state(<ConversionMethod> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ConversionMethod__set_state(ConversionMethod __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._dispatch = __pyx_state[0]; __pyx_result.converter = __pyx_state[1]; __pyx_result.method = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9apischema_13serialization_7methods_87__pyx_unpickle_DiscriminateTypedDict, NULL, __pyx_n_s_apischema_serialization_methods); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DiscriminateTyped, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apischema/serialization/methods.pyx":1
 * cimport cython             # <<<<<<<<<<<<<<
 * from dataclasses import dataclass, field
 * from typing import AbstractSet, Any, Callable, Dict, Optional, Tuple, Union
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init apischema.serialization.methods", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init apischema.serialization.methods");
  }
  __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;
}

/* 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

/* 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

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* 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

/* 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);
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* 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;
}

/* 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;
}

/* 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;
}

/* 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

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (__Pyx_PyFastCFunction_Check(func)) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#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

/* 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;
}

/* 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

/* 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

/* 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;
}

/* 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

/* 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

/* 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

/* 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
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = Py_TYPE(iter)->tp_iternext;
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* 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));
}

/* pyfrozenset_new */
static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) {
    if (it) {
        PyObject* result;
#if CYTHON_COMPILING_IN_PYPY
        PyObject* args;
        args = PyTuple_Pack(1, it);
        if (unlikely(!args))
            return NULL;
        result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL);
        Py_DECREF(args);
        return result;
#else
        if (PyFrozenSet_CheckExact(it)) {
            Py_INCREF(it);
            return it;
        }
        result = PyFrozenSet_New(it);
        if (unlikely(!result))
            return NULL;
        if ((PY_VERSION_HEX >= 0x031000A1) || likely(PySet_GET_SIZE(result)))
            return result;
        Py_DECREF(result);
#endif
    }
#if CYTHON_USE_TYPE_SLOTS
    return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
#else
    return PyObject_Call((PyObject*)&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
#endif
}

/* PySetContains */
static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) {
    int result = -1;
    if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) {
        PyObject *tmpkey;
        PyErr_Clear();
        tmpkey = __Pyx_PyFrozenSet_New(key);
        if (tmpkey != NULL) {
            result = PySet_Contains(set, tmpkey);
            Py_DECREF(tmpkey);
        }
    }
    return result;
}
static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) {
    int result = PySet_Contains(set, key);
    if (unlikely(result < 0)) {
        result = __Pyx_PySet_ContainsUnhashable(set, key);
    }
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
#else
    if (is_list || PySequence_Check(o))
#endif
    {
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

/* CIntToDigits */
static const char DIGIT_PAIRS_10[2*10*10+1] = {
    "00010203040506070809"
    "10111213141516171819"
    "20212223242526272829"
    "30313233343536373839"
    "40414243444546474849"
    "50515253545556575859"
    "60616263646566676869"
    "70717273747576777879"
    "80818283848586878889"
    "90919293949596979899"
};
static const char DIGIT_PAIRS_8[2*8*8+1] = {
    "0001020304050607"
    "1011121314151617"
    "2021222324252627"
    "3031323334353637"
    "4041424344454647"
    "5051525354555657"
    "6061626364656667"
    "7071727374757677"
};
static const char DIGITS_HEX[2*16+1] = {
    "0123456789abcdef"
    "0123456789ABCDEF"
};

/* BuildPyUnicode */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char) {
    PyObject *uval;
    Py_ssize_t uoffset = ulength - clength;
#if CYTHON_USE_UNICODE_INTERNALS
    Py_ssize_t i;
#if CYTHON_PEP393_ENABLED
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
#else
    Py_UNICODE *udata;
    uval = PyUnicode_FromUnicode(NULL, ulength);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_AS_UNICODE(uval);
#endif
    if (uoffset > 0) {
        i = 0;
        if (prepend_sign) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
            i++;
        }
        for (; i < uoffset; i++) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
        }
    }
    for (i=0; i < clength; i++) {
        __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
    }
#else
    {
        PyObject *sign = NULL, *padding = NULL;
        uval = NULL;
        if (uoffset > 0) {
            prepend_sign = !!prepend_sign;
            if (uoffset > prepend_sign) {
                padding = PyUnicode_FromOrdinal(padding_char);
                if (likely(padding) && uoffset > prepend_sign + 1) {
                    PyObject *tmp;
                    PyObject *repeat = PyInt_FromSize_t(uoffset - prepend_sign);
                    if (unlikely(!repeat)) goto done_or_error;
                    tmp = PyNumber_Multiply(padding, repeat);
                    Py_DECREF(repeat);
                    Py_DECREF(padding);
                    padding = tmp;
                }
                if (unlikely(!padding)) goto done_or_error;
            }
            if (prepend_sign) {
                sign = PyUnicode_FromOrdinal('-');
                if (unlikely(!sign)) goto done_or_error;
            }
        }
        uval = PyUnicode_DecodeASCII(chars, clength, NULL);
        if (likely(uval) && padding) {
            PyObject *tmp = PyNumber_Add(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyNumber_Add(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(long)*3+2];
    char *dpos, *end = digits + sizeof(long)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    long remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (long) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (long) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (long) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    if (last_one_off) {
        assert(*dpos == '0');
        dpos++;
    }
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(Py_ssize_t)*3+2];
    char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    Py_ssize_t remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (Py_ssize_t) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (Py_ssize_t) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (Py_ssize_t) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    if (last_one_off) {
        assert(*dpos == '0');
        dpos++;
    }
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      CYTHON_UNUSED Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind;
    Py_ssize_t i, char_pos;
    void *result_udata;
#if CYTHON_PEP393_ENABLED
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    result_udata = PyUnicode_DATA(result_uval);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        if (unlikely(!ulength))
            continue;
        if (unlikely(char_pos + ulength < 0))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind));
        } else {
            #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    result_ulength++;
    value_count++;
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
            if (PY_VERSION_HEX >= 0x030700A0) {
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            } else {
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            }
        } 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;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* 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;
    }
}

/* CallNextTpTraverse */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_traverse != current_tp_traverse)
        type = type->tp_base;
    while (type && type->tp_traverse == current_tp_traverse)
        type = type->tp_base;
    if (type && type->tp_traverse)
        return type->tp_traverse(obj, v, a);
    return 0;
}

/* CallNextTpClear */
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_clear != current_tp_clear)
        type = type->tp_base;
    while (type && type->tp_clear == current_tp_clear)
        type = type->tp_base;
    if (type && type->tp_clear)
        type->tp_clear(obj);
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_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_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* 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;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            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;
}

/* 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;
}

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
